SpecZip: Efficient Speculative Drafter Training on Compressed Hidden-State Caches
Abstract
Recent speculative-decoding drafters such as EAGLE-3 and DFlash learn from the hidden states of the target model. Offline training computes and caches these hidden states once, and therefore needs 2-3x less GPU time than online training, which recomputes the hidden states at every step. For a standard training corpus, however, the BF16 cache takes 34-55 TB and does not fit on the local disk of an 8-GPU node. The cache can be compressed with methods developed for KV caches, but quantizers that spread bits equally across dimensions substantially shorten the acceptance length of the drafter. We trace this 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, and compression must therefore allocate bits by variance. Second, unlike a KV cache, the cache is training data: the drafter learns without the low-variance components but receives the full hidden states at serving, causing a train-serve mismatch. Based on these observations, we propose SpecZip, a system for training drafters on a compressed cache. SpecZip compresses the cache with PCA and reverse water-filling (PCA-RWF), which allocates bits by variance without per-token scales and thus keeps more components at the same size, and can additionally project the removed components out of the first layer of the drafter. Because SpecZip decodes only the kept components on the GPU and overlaps the decoding with training, decompression adds almost no time to a training step. A 16x cache of 2.2-3.4 TB fits on a single node, and 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.
Community
Why is training speculative decoding drafters so expensive?
Say you train for 10 epochs.
- Online — 10 epochs of prefill, 10 epochs of training, 0 storage
- Offline — 1 epoch of prefill, 10 epochs of training, 34–55 TB of hidden-state cache
Online wastes compute. Offline wastes storage. This setup is made for compression, so we compressed it.
What SpecZip gets
- 16× compression shrinks the hidden-state cache to 2.2–3.4 TB, small enough for a single node.
- Drafters trained on the compressed cache keep 99–101% of the BF16 drafter's acceptance length across four target models.
- Even at 64× compression, SpecZip keeps 97.37% of the acceptance length on Qwen3.5-122B-A10B.
- Training throughput is 1.95–3.25× higher than online training.
Key idea
Treat the hidden-state cache like a compressible KV cache, but with one important difference. This cache is training data, so simply discarding low-variance components creates a train–serve mismatch. SpecZip allocates bits with PCA + reverse water-filling (PCA-RWF) and projects out the unseen components in the drafter's first layer.
Get this paper in your agent:
hf papers read 2611.35534 Don't have the latest CLI?
curl -LsSf https://hf.co/cli/install.sh | bash Models citing this paper 0
No model linking this paper
Datasets citing this paper 0
No dataset linking this paper
Spaces citing this paper 0
No Space linking this paper
Collections including this paper 0
No Collection including this paper