Slow interconnect dominates
Detect: Communication spans exceed useful compute time.
Recover: Change placement, parallel degree, or model configuration.
Distribute model weights, activations, and attention state across devices with an explicit communication and failure model.
Distributed memory architectures in model infrastructure address the memory required to execute a model across multiple accelerators or memory tiers. Tensor parallelism partitions tensor computation, pipeline parallelism partitions layers, and other schemes distribute experts or separate prefill from decoding. This topic concerns model execution memory, distinct from an agent’s durable conversational memory.
Memory does not become a free shared pool. Partitioning introduces communication, synchronization, topology constraints, and coordinated failure. CPU offload or remote cache transfer trades scarce accelerator memory for bandwidth and latency. Choose a strategy after estimating weights, activations, key-value cache, and runtime overhead for the target context and concurrency.
A prototype inventories memory components and tests whether quantization or smaller batches can meet the requirement on one device.
Production selects a supported partitioning strategy, benchmarks communication, and treats distributed workers as a coordinated serving group.
Enterprise scale plans topology-aware placement, failure domains, cache movement, and capacity accounting across heterogeneous nodes and workloads.
Maps layers, tensors, or experts to supported device groups.
Hold their assigned weights and execution state.
Carries activations, reductions, or cache transfers between workers.
Coordinates request execution and group-level admission.
Separates weights, cache, activations, offloaded state, and communication overhead.
flowchart LR
Q["Inference request"] --> S["Group scheduler"]
S --> A["Device A model partition"]
A --> B["Device B model partition"]
B --> C["Device C model partition"]
C --> O["Output tokens"]
A --> M["Memory and fabric telemetry"]
B --> M
C --> M
M --> SsequenceDiagram
participant S as Group scheduler
participant A as Device A
participant B as Device B
participant F as Communication fabric
S->>A: Execute token step
S->>B: Execute token step
A->>F: Partial tensor result
B->>F: Partial tensor result
F-->>A: Coordinated reduction result
F-->>B: Coordinated reduction result
A-->>S: Step complete
B-->>S: Step completeEstimate required capacity for the actual precision, context length, and active sequences.
Select tensor, pipeline, expert, or supported disaggregated execution based on the bottleneck.
Use compatible hardware and a network topology adequate for required communication.
Verify partition identities and initialize communication before publishing readiness.
Move required activations or reductions while maintaining consistent sequence state.
On worker failure, stop affected traffic and restart or reconstruct state according to engine support.
Scientific publishing · Illustrative enterprise scenario, not a reported customer outcome.
A research platform needs a model and context configuration that exceed one accelerator’s usable memory.
Naive CPU offload fits the weights but makes interactive analysis too slow.
Select a supported multi-device layout that meets both capacity and latency requirements.
The team profiles weights and cache, then benchmarks partitioned serving on a high-bandwidth worker group.
If one worker fails, the group stops accepting requests and incomplete generations restart under an explicit client policy.
Measure per-request latency, accepted throughput, memory headroom, and communication fraction; adding devices can increase cost without improving latency.
| Decision | Benefit | Cost |
|---|---|---|
| Tensor parallelism | Distributes large tensor operations and weight memory. | Requires frequent communication and compatible partition dimensions. |
| Pipeline parallelism | Distributes layers across devices or nodes. | Can introduce pipeline bubbles and stage imbalance. |
| Memory offload | Extends effective capacity beyond accelerator memory. | Adds transfer latency and bandwidth pressure. |
Detect: Communication spans exceed useful compute time.
Recover: Change placement, parallel degree, or model configuration.
Detect: The distributed request can no longer continue consistently.
Recover: Fail the affected generation and recover the coordinated group.
Separate inference partitioning from durable workflow state.
Include KV cache, activations, and runtime overhead.
Benchmark topology and communication under real concurrency.