Cut Your Losses in Large-Vocabulary Language Models
Not on the map. Why?
Abstract (arXiv)
As language models grow ever larger, so do their vocabularies. This has shifted the memory footprint of LLMs during training disproportionately to one single layer: the cross-entropy in the loss computation. Cross-entropy builds up a logit matrix with entries for each pair of input tokens and vocabulary items and, for small models, consumes an order of magnitude more memory than the rest of the LLM combined. We propose Cut Cross-Entropy (CCE), a method that computes the cross-entropy loss without materializing the logits for all tokens into global memory. Rather, CCE only computes the logit for the correct token and evaluates the log-sum-exp over all logits on the fly. We implement a custom kernel that performs the matrix multiplications and the log-sum-exp reduction over the vocabulary in flash memory, making global memory consumption for the cross-entropy computation negligible. This has a dramatic effect. Taking the Gemma 2 (2B) model as an example, CCE reduces the memory footprint of the loss computation from 24 GB to 1 MB, and the total training-time memory consumption of the classifier head from 28 GB to 1 GB. To improve the throughput of CCE, we leverage the inherent sparsity of softmax and propose to skip elements of the gradient computation that have a negligible (i.e., below numerical precision) contribution to the gradient. Experiments demonstrate that the dramatic reduction in memory consumption is accomplished without sacrificing training speed or convergence.
Key facts. Cited by 35 papers in the map (data through 7 Oct 2026). Builds on 19 of its 39 references that are in the map. First posted on arXiv 13 Nov 2024.
Builds on
19 of 39 references.
References · 19
- 2017Attention Is All You Needcited by 59,932
- 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
- 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,424
- 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,883
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,829
- 2020Reformer: The Efficient Transformercited by 1,658
- 2017Accurate, Large Minibatch SGD: Training ImageNet in 1 Hourcited by 1,479
- 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
- 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,278
- 2016Training Deep Nets with Sublinear Memory Costcited by 825
7 more
- 2023MEGABYTE: Predicting Million-byte Sequences with Multiscale Transformerscited by 164
- 2018Online normalizer calculation for softmaxcited by 154
- 2021Self-attention Does Not Need O(n2) Memorycited by 152
- 2021Sequence Parallelism: Long Sequence Training from System Perspectivecited by 125
- 2024Scaling Laws with Vocabulary: Larger Models Deserve Larger Vocabulariescited by 113
- 2016Efficient softmax approximation for GPUscited by 67
- 2023Speed Is All You Need: On-Device Acceleration of Large Diffusion Models via GPU-Aware Optimizationscited by 45
Built on by
Citing papers per year: 2025: 15; 2026: 20.
35 papers.
Sort:
By area:
- 2025Reinforcement Learning for Long-Horizon Interactive LLM Agentscited by 103
- 2025Completed Hyperparameter Transfer across Modules, Width, Depth, Batch and Durationcited by 22
- 2025FR-Spec: Accelerating Large-Vocabulary Language Models via Frequency-Ranked Speculative Samplingcited by 20
- 2026Arcee Trinity Large Technical Reportcited by 10
- 2026Entropy-Preserving Reinforcement Learningcited by 10
- 2026OVD: On-policy Verbal Distillationcited by 9
- 2025TransAct V2: Lifelong User Action Sequence Modeling on Pinterest Recommendationcited by 8
- 2025A Course Correction in Steerability Evaluation: Revealing Miscalibration and Side Effects in LLMscited by 7
- 2025Calibrated Language Models and How to Find Them with Label Smoothingcited by 7
- 2025Can LLMs Understand Unvoiced Speech? Exploring EMG-to-Text Conversion with LLMscited by 6
- 2025Spherical Leech Quantization for Visual Tokenization and Generationcited by 6
- 2026The Design Space of Tri-Modal Masked Diffusion Modelscited by 6
23 more
- 2026Scaling Categorical Flow Mapscited by 6
- 2026CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programscited by 5
- 2025DynaSpec: Context-aware Dynamic Speculative Sampling for Large-Vocabulary Language Modelscited by 4
- 2025DiSTAR: Diffusion over a Scalable Token Autoregressive Representation for Speech Generationcited by 3
- 2025Efficient and Programmable Exploration of Synthesizable Chemical Spacecited by 3
- 2026FlashSampling: Fast and Memory-Efficient Exact Samplingcited by 2
- 2026FORGE: Fused On-Register Gradient Elimination for Memory-Efficient LLM Trainingcited by 2
- 2026Distilled Continuous Diffusion Language Models Can Write Code in Few Steps---or Onecited by 2
- 2025ABC: Achieving Better Control of Multimodal Embeddings using VLMscited by 1
- 2025Memory-Efficient Backpropagation for Fine-Tuning LLMs on Resource-Constrained Mobile Devicescited by 1
- 2025Vocab Diet: Reshaping the Vocabulary of LLMs via Vector Arithmeticcited by 1
- 2026NanoQuant: Efficient Sub-1-Bit Quantization of Large Language Modelscited by 1
- 2025Adjoint sharding for very long context training of state space modelscited by 0
- 2026torchtune: PyTorch native post-training librarycited by 0
- 2026Large Byte Model: Teaching Language Models About Compiled Codecited by 0
- 2026Spokes: Optimizing for Diverse Pretraining Data Selectioncited by 0
- 2026Efficient Knowledge Distillation for LLMs: Offline Top-K Logits and a Fused Chunked KL Losscited by 0
- 2026Batch Size or Negatives? A Selection Rule for Memory-Constrained Recommender Trainingcited by 0
- 2026Keeping the Index Open: The Recommendation-Side Cost of Shared Search and Recommendationcited by 0
- 2026One Simple Trick for Improving the Performance of Energy-Limited Local Inference and Trainingcited by 0
- 2026Flattening Every Memory Peak in Long-Context Mixture-of-Experts Trainingcited by 0
- 2026Z-Loss Backward Geometry in Dense Output Heads and Sparse Routerscited by 0
- 2026Format-Aware Fusion for Fast FP4 Pretrainingcited by 0
- 2026Flattening Every Memory Peak in Long-Context Mixture-of-Experts Training13 Sep 2026
- 2026Format-Aware Fusion for Fast FP4 Pretraining4 Sep 2026
- 2026Distilled Continuous Diffusion Language Models Can Write Code in Few Steps---or One3 Sep 2026
- 2026Keeping the Index Open: The Recommendation-Side Cost of Shared Search and Recommendation25 Aug 2026
- 2026Batch Size or Negatives? A Selection Rule for Memory-Constrained Recommender Training11 Aug 2026
- 2026Efficient Knowledge Distillation for LLMs: Offline Top-K Logits and a Fused Chunked KL Loss4 Aug 2026
- 2026Z-Loss Backward Geometry in Dense Output Heads and Sparse Routers31 Jul 2026
- 2026One Simple Trick for Improving the Performance of Energy-Limited Local Inference and Training2 Jul 2026
- 2026FORGE: Fused On-Register Gradient Elimination for Memory-Efficient LLM Training22 Jun 2026
- 2026Spokes: Optimizing for Diverse Pretraining Data Selection13 Jun 2026
- 2026Large Byte Model: Teaching Language Models About Compiled Code1 Jun 2026
- 2026torchtune: PyTorch native post-training library20 May 2026
23 more
- 2026CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs19 May 2026
- 2026Scaling Categorical Flow Maps8 May 2026
- 2026FlashSampling: Fast and Memory-Efficient Exact Sampling16 Mar 2026
- 2026Entropy-Preserving Reinforcement Learning12 Mar 2026
- 2026The Design Space of Tri-Modal Masked Diffusion Models25 Feb 2026
- 2026Arcee Trinity Large Technical Report19 Feb 2026
- 2026NanoQuant: Efficient Sub-1-Bit Quantization of Large Language Models6 Feb 2026
- 2026OVD: On-policy Verbal Distillation29 Jan 2026
- 2025Completed Hyperparameter Transfer across Modules, Width, Depth, Batch and Duration26 Dec 2025
- 2025Spherical Leech Quantization for Visual Tokenization and Generation16 Dec 2025
- 2025Efficient and Programmable Exploration of Synthesizable Chemical Space29 Nov 2025
- 2025Vocab Diet: Reshaping the Vocabulary of LLMs via Vector Arithmetic19 Oct 2025
- 2025DiSTAR: Diffusion over a Scalable Token Autoregressive Representation for Speech Generation14 Oct 2025
- 2025DynaSpec: Context-aware Dynamic Speculative Sampling for Large-Vocabulary Language Models11 Oct 2025
- 2025Memory-Efficient Backpropagation for Fine-Tuning LLMs on Resource-Constrained Mobile Devices3 Oct 2025
- 2025Calibrated Language Models and How to Find Them with Label Smoothing1 Aug 2025
- 2025TransAct V2: Lifelong User Action Sequence Modeling on Pinterest Recommendation2 Jun 2025
- 2025Can LLMs Understand Unvoiced Speech? Exploring EMG-to-Text Conversion with LLMs30 May 2025
- 2025A Course Correction in Steerability Evaluation: Revealing Miscalibration and Side Effects in LLMs27 May 2025
- 2025ABC: Achieving Better Control of Multimodal Embeddings using VLMs1 Mar 2025
- 2025FR-Spec: Accelerating Large-Vocabulary Language Models via Frequency-Ranked Speculative Sampling20 Feb 2025
- 2025Reinforcement Learning for Long-Horizon Interactive LLM Agents3 Feb 2025
- 2025Adjoint sharding for very long context training of state space models1 Jan 2025
- 2026The Design Space of Tri-Modal Masked Diffusion Modelscited by 6
- 2026Scaling Categorical Flow Mapscited by 6
- 2026Distilled Continuous Diffusion Language Models Can Write Code in Few Steps---or Onecited by 2
- 2026Distilled Continuous Diffusion Language Models Can Write Code in Few Steps---or One3 Sep 2026
- 2026Scaling Categorical Flow Maps8 May 2026
- 2026The Design Space of Tri-Modal Masked Diffusion Models25 Feb 2026
- 2026Entropy-Preserving Reinforcement Learningcited by 10
- 2026OVD: On-policy Verbal Distillationcited by 9
- 2025A Course Correction in Steerability Evaluation: Revealing Miscalibration and Side Effects in LLMscited by 7
- 2026Entropy-Preserving Reinforcement Learning12 Mar 2026
- 2026OVD: On-policy Verbal Distillation29 Jan 2026
- 2025A Course Correction in Steerability Evaluation: Revealing Miscalibration and Side Effects in LLMs27 May 2025
- 2026Flattening Every Memory Peak in Long-Context Mixture-of-Experts Training13 Sep 2026
- 2026Z-Loss Backward Geometry in Dense Output Heads and Sparse Routers31 Jul 2026
- 2026Arcee Trinity Large Technical Report19 Feb 2026
- 2025Reinforcement Learning for Long-Horizon Interactive LLM Agentscited by 103
- 2025Completed Hyperparameter Transfer across Modules, Width, Depth, Batch and Durationcited by 22
- 2025TransAct V2: Lifelong User Action Sequence Modeling on Pinterest Recommendationcited by 8
- 2025Calibrated Language Models and How to Find Them with Label Smoothingcited by 7
- 2025Can LLMs Understand Unvoiced Speech? Exploring EMG-to-Text Conversion with LLMscited by 6
- 2025Spherical Leech Quantization for Visual Tokenization and Generationcited by 6
- 2026CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programscited by 5
- 2025DiSTAR: Diffusion over a Scalable Token Autoregressive Representation for Speech Generationcited by 3
- 2025Efficient and Programmable Exploration of Synthesizable Chemical Spacecited by 3
- 2026FlashSampling: Fast and Memory-Efficient Exact Samplingcited by 2
- 2026FORGE: Fused On-Register Gradient Elimination for Memory-Efficient LLM Trainingcited by 2
- 2025ABC: Achieving Better Control of Multimodal Embeddings using VLMscited by 1
- 2025Memory-Efficient Backpropagation for Fine-Tuning LLMs on Resource-Constrained Mobile Devicescited by 1
12 most cited of 23 All 23 (JSON)
- 2026Format-Aware Fusion for Fast FP4 Pretraining4 Sep 2026
- 2026Keeping the Index Open: The Recommendation-Side Cost of Shared Search and Recommendation25 Aug 2026
- 2026Batch Size or Negatives? A Selection Rule for Memory-Constrained Recommender Training11 Aug 2026
- 2026Efficient Knowledge Distillation for LLMs: Offline Top-K Logits and a Fused Chunked KL Loss4 Aug 2026
- 2026One Simple Trick for Improving the Performance of Energy-Limited Local Inference and Training2 Jul 2026
- 2026FORGE: Fused On-Register Gradient Elimination for Memory-Efficient LLM Training22 Jun 2026
- 2026Spokes: Optimizing for Diverse Pretraining Data Selection13 Jun 2026
- 2026Large Byte Model: Teaching Language Models About Compiled Code1 Jun 2026
- 2026torchtune: PyTorch native post-training library20 May 2026
- 2026CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programs19 May 2026
- 2026FlashSampling: Fast and Memory-Efficient Exact Sampling16 Mar 2026
- 2026NanoQuant: Efficient Sub-1-Bit Quantization of Large Language Models6 Feb 2026
12 newest of 23 All 23 (JSON)