Reducing High-Bandwidth Memory Bottlenecks in JAX-Based LLM Training with Host Offloading

AI-generated summary of reporting by NVIDIA Developer Blog. Read the original for the full story.

Why it matters

Teams training very large LLMs in JAX can fit batch sizes four times larger on NVIDIA Grace-Blackwell systems by offloading activations to host memory instead of recomputing them, directly changing memory-versus-throughput tradeoffs.

Read this as

NVIDIA engineers describe a way to train very large AI models without running out of GPU memory. When a model trains, its chip stores lots of intermediate numbers; the technique moves some of those to the computer's main memory instead and fetches them back when needed. On NVIDIA's newest Grace Blackwell machines, the CPU and GPU are connected fast enough that this exchange doesn't slow training. It helped run DeepSeek-V3, a 671-billion-parameter model, with larger batches than otherwise possible.

For organizations training frontier LLMs, GPU memory, not compute, is often the binding constraint. NVIDIA reports that on a 128-GPU GB200 NVL72 system, host offloading let DeepSeek-V3 671B run at 908.2 TFLOPs/s per device, 57% faster than recomputing activations, and made a batch configuration feasible that otherwise ran out of memory. Gains depend on NVIDIA's tight CPU-GPU interconnect; commodity clusters with PCIe may not see the same benefit.

JAX host offloading streams selected activations to pinned host memory during forward pass and reloads them for backward, replacing activation rematerialization. On GB200 NVL72 (128 GPUs, MaxText), DeepSeek-V3 671B hit 908.2 TFLOPs/s/device with LHS and pipelined transfers enabled, versus 578.3 with rematerialization; device-only storage OOMed at micro batch 8/global batch 1024. Llama 3.1 405B gained only 2.9% with QKV offloading. Required flags: --xla_gpu_enable_latency_hiding_scheduler=true, --xla_gpu_enable_pipelined_host_offloading=true, --xla_gpu_experimental_parallel_async_compute_limit=8; validate with Nsight Systems profiling.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

JAX NVIDIA GB200 NVL72 DeepSeek-V3 671B Llama 3.1 405B MaxText NVLink-C2C XLA

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading