CPU, GPU AND RAM

ZO2: MeZO offloading, random-state alignment and the VRAM boundary

In this article
THE QUICK TAKE

ZO2 reduces device residency through MeZO-specific scheduling; the host still stores model state, and matching MeZO accuracy is not a universal first-order equivalence.

ZO2 combines zeroth-order optimization with parameter movement between CPU memory and a GPU. Its small VRAM headline comes from changing the training procedure and the placement of model state. It is useful to distinguish those choices before interpreting the result as a general recipe for conventional gradient-based fine-tuning.

Start with the optimization method

The research paper builds on MeZO. It perturbs parameters, evaluates losses through paired forward computations and uses a directional estimate for the update. It does not run the usual backpropagation path that saves a sequence of activations for later gradient computation.

That removes one important memory demand, but forward execution still needs live tensors and workspace. Zeroth-order training also has its own optimization behavior. Alignment with the MeZO baseline is different from proving identical quality or convergence to AdamW or every other first-order optimizer.

Follow the model state across CPU and GPU

The design stores parameters in CPU memory and brings blocks to the GPU for computation. Paired forward work follows the same direction through the model, creating an opportunity to reuse a transferred block. Upload, execution and offload are scheduled to overlap where dependencies permit.

The complete model does not disappear when only a few blocks occupy the GPU. Host capacity, transfer bandwidth, pinned buffers and temporary device allocations remain part of the machine requirement. A measured VRAM footprint therefore does not define the total memory needed to train the model.

Keep random-state alignment in the correctness contract

The update must use the intended perturbation direction. Reordering block execution and fusing updates can otherwise change which random values are associated with particular parameters. The method explicitly manages random-generator states to preserve that relationship.

This is a concrete reproducibility requirement, rather than an optional implementation detail. A custom model with additional stochastic operations needs compatible state handling. A matching seed alone does not establish matching random-number consumption after the execution order changes.

Read the memory headline with the actual testbed

The paper’s performance campaign runs on an A100 with 80GB of device memory. Its large-model result reports roughly 18GB of occupied GPU memory for OPT-175B; that is a usage measurement on the described system, not evidence that every machine with an 18GB card can perform the same experiment.

The performance setup uses a short controlled training run, while the accuracy-alignment section evaluates OPT-13B against MeZO. Those are different experimental cases. The largest capacity demonstration should not inherit every quality result from the smaller model, and a baseline that fails to fit does not provide a measured throughput for calculating a speedup.

Preserve precision and implementation scope

The official repository documentation describes CPU offloading, reusable buffers and supported training examples. It also discusses precision and transfer optimizations. Compute precision, transfer representation and persistent model state are separate choices whose effects need to be recorded.

We read the method, scheduler/RNG description, evaluation setup and documentation without installing the project or training weights. The reproducible-stack guide covers environment records, and the document-split guide covers data separation. ZO2 is a specific way to make MeZO-style training fit a smaller device-memory budget; its usefulness still depends on optimization quality and the complete CPU–GPU resource path.

Sources

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles