From Projection to Prediction: Beyond Logits for Scalable Language Models
Not on the map. Why?
Abstract (arXiv)
Training Large Language Models (LLMs) typically involves a two-stage pipeline at the output layer: hidden states are projected into vocabulary logits via a linear transformation (lm_head), followed by cross-entropy loss computation against target tokens. While conceptually simple, this design incurs substantial overhead. The intermediate logits tensor, with dimensions proportional to batch size, sequence length, and vocabulary size, must be fully materialized in GPU memory, even though only one target token per position is ultimately used. This leads to significant memory footprint and bandwidth comsumption, limiting scalability and slowing training throughput. In this work, we introduce a novel approach to integrates the output projection and loss prediction into a single operation. By directly computing the loss from hidden states and target tokens, our approach bypasses explicit logits materialization. This design reduces memory usage and alleviates bandwidth pressure. Experiments on LLM training demonstrate that our method achieves substantial memory savings and measurable speedups compared to the standard two-stage pipeline, enabling large batch sizes and longer sequences without sacrificing accuracy. Our work highlights the benefits of rethinking the boundary between projection and prediction, offering a practical systems optimization for efficient LLM training.
Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Builds on 10 of its 23 references that are in the map. First posted on arXiv 18 Nov 2025.
Builds on
10 of 23 references.
References · 10
- 2017Attention Is All You Needcited by 60,361
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,673
- 2023FlashAttention-2: Faster Attention with Better Parallelism and Work Partitioningcited by 2,598
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,868
- 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,301
- 2021ZeRO-Infinity: Breaking the GPU Memory Wall for Extreme Scale Deep Learningcited by 256
- 2024A Survey on Recent Advances in LLM-Based Multi-turn Dialogue Systemscited by 170
- 2018Online normalizer calculation for softmaxcited by 162
- 2024Scaling Laws with Vocabulary: Larger Models Deserve Larger Vocabulariescited by 118
- 2024LLMem: Estimating GPU Memory Usage for Fine-Tuning Pre-Trained LLMscited by 12
Built on by
Citing papers per year: 2026: 1.
1 paper.
- 2026FlashSampling: Fast and Memory-Efficient Exact Samplingcited by 3
- 2026FlashSampling: Fast and Memory-Efficient Exact Sampling16 Mar 2026