Scaling LLM Inference: Innovations in Tensor Parallelism, Context Parallelism, and Expert Parallelism
Meta scales LLM inference with three parallelism techniques aimed at latency targets of under 350ms time-to-first-token and under 25ms per incremental token. For tensor parallelism, custom direct-data-access allreduce algorithms (flat and tree) cut communication latency, beating RCCL by 10-50% on decode and bringing AMD MI300X to parity with H100. Context parallelism via ring attention, in Pass-KV and Pass-Q variants, enables 1M-token prefill in under a minute on one H100 host and near-linear scaling for Llama 3 405B (128K tokens in 3.8s over 16 nodes). Expert parallelism for MoE models relies on all-to-all token exchange that costs 10-30% of latency, and Meta is moving toward N-D parallelism with disaggregated prefill and decode tiers on heterogeneous hardware.
Related posts
- Reinforcement learning is an infrastructure problem
Modal mediumAdept
RL post-training of LLMs is bottlenecked by infrastructure rather than algorithms: training engines, rollout inference and isolated environments must all scale together, and once training goes multi-node, trainer-to-rollout weight sync dominates. Measured estimates show RDMA cutting weight transfer roughly 60x versus TCP (e.g. GLM 4.7 from 115 s to 1.8 s per step), and delta compression shrinking WAN transfers for disaggregated setups by about 98%. Teams commonly struggle with glue code, cluster queueing and GPUs starved by environments; the guidance is to keep at least one sandbox per rollout plus headroom for failures. Modal recommends building on open-source frameworks like slime and verl, upstreams improvements such as delta compression, and introduces Modal Dojo, an experimental library for defining RL jobs in under 100 lines.
- Keep the Tokens Flowing: Lessons from 16 Open-Source RL Libraries
Hugging Face hardMasterAsync RL post-training libraries have converged on one architecture: disaggregate inference and training onto separate GPU pools, connect them with a rollout buffer, and push weights asynchronously so generation never stops and training never waits. A survey of 16 open-source libraries (verl, AReaL, SLIME, PRIME-RL, NeMo-RL and others) compares them on seven axes: orchestration, buffer design, weight sync, staleness management, partial rollouts, LoRA support and training parallelism. Ray dominates orchestration, NCCL broadcast is the default weight-transfer method, staleness handling ranges from dropping samples to importance-sampling correction, LoRA support is sparse, and distributed MoE support is emerging as the differentiator. Throughput math shows why this matters, with 32K-token rollouts on a 32B model taking hours per step on one H100. The findings shape TRL's new async trainer, which uses a bounded queue with per-token model versions, packed NCCL weight sync and partial rollout support.
- Benchmarking inference at scale: coding agents
Together AI hardMasterOn a long-context, high-concurrency coding agent workload (prompts ~45k–200k tokens, ~450-token outputs, EAGLE speculative decoding) running Kimi K2.5 on B200 GPUs, Together Inference Engine delivers 31% more per-user TPS than TensorRT-LLM at 2.5M TPM. It holds p50 TTFT at 0.71s, versus 1.1s for TensorRT-LLM and 5.1s for SGLang, which needed 8 GPUs instead of 4 due to EAGLE memory overhead. The gains are attributed to ThunderMLA, a fused megakernel for Multi-head Latent Attention reported as 20–35% faster than FlashMLA, plus custom kernels found through end-to-end profiling. The post argues that prefill-heavy, concurrent long-context load and TTFT under saturation matter more than single-user benchmarks, and closes with vendor cost comparisons against Claude Opus.
- Optimizing inference speed and costs: Lessons learned from large-scale deployments
Together AI easyNoviceLower LLM inference latency and cost come mainly from how inference runs rather than from buying more GPUs. The levers covered are FP8/FP4 quantization (claimed 20–40% throughput gains), distilled models like DeepSeek-R1 variants (2–5× lower cost), regional proxies that cut 50–100 ms of TTFT, removing GPU stalls via kernel fusion, MoE execution and scheduling, and speculative decoding or MTP (20–50% faster decode). It also covers Blackwell-class hardware with tensor or expert parallelism and dynamically shifting GPU capacity between endpoints. A starting checklist: measure TTFT, decode TPS and network RTT, then add proxies, continuous batching and decoding optimizations.
- Mixture of Experts (MoEs) in Transformers
Hugging Face hardMasterHugging Face transformers v5 reworks its internals to treat Mixture of Experts models as first-class: a WeightConverter pipeline packs per-expert checkpoint tensors into contiguous runtime tensors with async, lazy materialization, cutting Qwen1.5-110B load time from ~66s to ~21s (10s with tensor parallelism) on an A100. A pluggable Experts Backend dispatches tokens via eager, batched_mm (torch.bmm) or grouped_mm (torch._grouped_mm) strategies, suited respectively to debugging, small-batch and large-batch/memory-constrained workloads. Expert parallelism shards experts across GPUs with a single config flag, and a collaboration with Unsloth using Triton grouped-GEMM + LoRA kernels yields ~12× faster MoE training with >35% less VRAM.