SpecZip compresses hidden-state caches 16x to train speculative drafters on one node

SpecZip compresses hidden-state caches 16x to train speculative drafters on one node

Speculative-decoding drafters such as EAGLE-3 and DFlash learn from the hidden states of the target model. There are two ways to feed them. Online training recomputes those hidden states at every step. Offline training computes them once and caches them, which needs 2-3x less GPU time than online training. The catch is size: for a standard training corpus, the BF16 cache takes 34-55 TB and does not fit on the local disk of an 8-GPU node.

The obvious fix is to compress the cache with methods developed for KV caches. The paper says this hurts: quantizers that spread bits equally across dimensions substantially shorten the acceptance length of the drafter. The authors trace the loss to two properties of the cache. First, as in a KV cache, 99% of the variance of target hidden states lies in 32% of the principal components, so compression must allocate bits by variance. Second, unlike a KV cache, this cache is training data. The drafter learns without the low-variance components but receives the full hidden states at serving, which causes a train-serve mismatch.

Based on these observations, the paper proposes SpecZip, a system for training drafters on a compressed cache. It compresses the cache with PCA and reverse water-filling (PCA-RWF). That method allocates bits by variance without per-token scales, so it keeps more components at the same size. SpecZip can additionally project the removed components out of the first layer of the drafter, which addresses the mismatch. It decodes only the kept components on the GPU and overlaps decoding with training, so decompression adds almost no time to a training step.

The reported results: a 16x cache of 2.2-3.4 TB fits on a single node. DFlash drafters trained on this cache retain 99-101% of the BF16 acceptance length across four targets, including a 122B Mixture-of-Experts (MoE) model. SpecZip thus enables offline training from a single local disk, with 1.95-3.25x higher training throughput than online training.

Key facts

  • Offline drafter training needs 2-3x less GPU time than online training, but the BF16 hidden-state cache for a standard corpus is 34-55 TB and does not fit on an 8-GPU node's local disk.
  • 99% of the variance of target hidden states lies in 32% of the principal components, so SpecZip allocates bits by variance using PCA and reverse water-filling (PCA-RWF).
  • The cache is training data, so dropping low-variance components creates a train-serve mismatch; SpecZip can project the removed components out of the drafter's first layer.
  • A 16x cache of 2.2-3.4 TB fits on one node, and DFlash drafters trained on it retain 99-101% of the BF16 acceptance length across four targets, including a 122B MoE model.
  • Training throughput is 1.95-3.25x higher than online training.

Why it matters

Offline training of speculative-decoding drafters is cheaper in GPU time (2-3x less than online training), but the cache of target hidden states is too big for one node's disk at 34-55 TB. The paper's point is that KV-cache-style compression does not carry over directly, because this cache is training data and not just stored context. SpecZip is presented as a way to keep the offline savings while shrinking the cache 16x.

Who it affects

Teams that train drafters like EAGLE-3 or DFlash for their own target models, especially those working on a single 8-GPU node without a large shared storage tier. The paper's evidence covers four target models, one of them a 122B Mixture-of-Experts model.

How to use it

The paper describes a pipeline: cache the target hidden states once, compress them with PCA-RWF, decode only the kept components on the GPU while overlapping decoding with training, and optionally project the removed components out of the drafter's first layer. With a 16x cache of 2.2-3.4 TB, training can run from a single local disk.

How solid is it

This is a preprint listed on Hugging Face papers, and the figures are the authors' own. The acceptance-length result (99-101% of the BF16 level) is reported for DFlash drafters on the 16x cache across four targets; no EAGLE-3 results are given. The 1.95-3.25x throughput gain is measured against online training, not against uncompressed offline training. The four targets are not named, apart from the 122B MoE model, and the source does not say which training corpus the 34-55 TB figure refers to.

Risks and caveats

The central tension is a train-serve mismatch: the drafter trains without low-variance components but sees full hidden states at serving. The authors address it with the optional first-layer projection. Quantizers that spread bits equally across dimensions substantially shorten acceptance length, so the choice of compression method matters. No code release, license or availability of SpecZip is mentioned in the source.