arXiv Science⌕ Search

arXiv subjects

Junhee Yoo

Publications and source records attributed to Junhee Yoo.

2 recordsLinked to original sources

SpecZip: Efficient Speculative Drafter Training on Compressed Hidden-State Caches

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.

cs.LG↗

Affine-Scaled Attention: Towards Flexible and Stable Transformer Attention

Transformer attention is typically implemented using softmax normalization, which enforces attention weights with unit sum normalization. While effective in many settings, this constraint can limit flexibility in controlling attention magnitudes and may contribute to overly concentrated or unstable attention patterns during training. Prior work has explored modifications such as attention sinks or gating mechanisms, but these approaches provide only limited or indirect control over attention reweighting. We propose Affine-Scaled Attention, a simple extension to standard attention that introduces input-dependent scaling and a corresponding bias term applied to softmax-normalized attention weights. This design relaxes the strict normalization constraint while maintaining aggregation of value representations, allowing the model to adjust both the relative distribution and the scale of attention in a controlled manner. We empirically evaluate Affine-Scaled Attention in large-scale language model pretraining across multiple model sizes. Experimental results show consistent improvements in training stability, optimization behavior, and downstream task performance compared to standard softmax attention and attention sink baselines. These findings suggest that modest reweighting of attention outputs provides a practical and effective way to improve attention behavior in Transformer models.

cs.CL↗