mlsanityData to 7 Oct 2026

Cut Your Losses in Large-Vocabulary Language Models

arXiv 2411.09009 ↗First posted 13 Nov 2024cs.LG cs.CLcited by 35

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

  1. 2017Attention Is All You Needcited by 59,932
  2. 2019PyTorch: An Imperative Style, High-Performance Deep Learning Librarycited by 20,160
  3. 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
  4. 2022FlashAttention: Fast and Memory-Efficient Exact Attention with IO-Awarenesscited by 3,611
  5. 2021Efficiently Modeling Long Sequences with Structured State Spacescited by 2,424
  6. 2024Phi-3 Technical Report: A Highly Capable Language Model Locally on Your Phonecited by 1,883
  7. 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,829
  8. 2020Reformer: The Efficient Transformercited by 1,658
  9. 2017Accurate, Large Minibatch SGD: Training ImageNet in 1 Hourcited by 1,479
  10. 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
  11. 2019ZeRO: Memory Optimizations Toward Training Trillion Parameter Modelscited by 1,278
  12. 2016Training Deep Nets with Sublinear Memory Costcited by 825
7 more
  1. 2023MEGABYTE: Predicting Million-byte Sequences with Multiscale Transformerscited by 164
  2. 2018Online normalizer calculation for softmaxcited by 154
  3. 2021Self-attention Does Not Need O(n2) Memorycited by 152
  4. 2021Sequence Parallelism: Long Sequence Training from System Perspectivecited by 125
  5. 2024Scaling Laws with Vocabulary: Larger Models Deserve Larger Vocabulariescited by 113
  6. 2016Efficient softmax approximation for GPUscited by 67
  7. 2023Speed Is All You Need: On-Device Acceleration of Large Diffusion Models via GPU-Aware Optimizationscited by 45

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2025: 15; 2026: 20.

35 papers.

Sort:

By area:

  1. 2025Reinforcement Learning for Long-Horizon Interactive LLM Agentscited by 103
  2. 2025Completed Hyperparameter Transfer across Modules, Width, Depth, Batch and Durationcited by 22
  3. 2025FR-Spec: Accelerating Large-Vocabulary Language Models via Frequency-Ranked Speculative Samplingcited by 20
  4. 2026Arcee Trinity Large Technical Reportcited by 10
  5. 2026Entropy-Preserving Reinforcement Learningcited by 10
  6. 2026OVD: On-policy Verbal Distillationcited by 9
  7. 2025TransAct V2: Lifelong User Action Sequence Modeling on Pinterest Recommendationcited by 8
  8. 2025A Course Correction in Steerability Evaluation: Revealing Miscalibration and Side Effects in LLMscited by 7
  9. 2025Calibrated Language Models and How to Find Them with Label Smoothingcited by 7
  10. 2025Can LLMs Understand Unvoiced Speech? Exploring EMG-to-Text Conversion with LLMscited by 6
  11. 2025Spherical Leech Quantization for Visual Tokenization and Generationcited by 6
  12. 2026The Design Space of Tri-Modal Masked Diffusion Modelscited by 6
23 more
  1. 2026Scaling Categorical Flow Mapscited by 6
  2. 2026CODA: Rewriting Transformer Blocks as GEMM-Epilogue Programscited by 5
  3. 2025DynaSpec: Context-aware Dynamic Speculative Sampling for Large-Vocabulary Language Modelscited by 4
  4. 2025DiSTAR: Diffusion over a Scalable Token Autoregressive Representation for Speech Generationcited by 3
  5. 2025Efficient and Programmable Exploration of Synthesizable Chemical Spacecited by 3
  6. 2026FlashSampling: Fast and Memory-Efficient Exact Samplingcited by 2
  7. 2026FORGE: Fused On-Register Gradient Elimination for Memory-Efficient LLM Trainingcited by 2
  8. 2026Distilled Continuous Diffusion Language Models Can Write Code in Few Steps---or Onecited by 2
  9. 2025ABC: Achieving Better Control of Multimodal Embeddings using VLMscited by 1
  10. 2025Memory-Efficient Backpropagation for Fine-Tuning LLMs on Resource-Constrained Mobile Devicescited by 1
  11. 2025Vocab Diet: Reshaping the Vocabulary of LLMs via Vector Arithmeticcited by 1
  12. 2026NanoQuant: Efficient Sub-1-Bit Quantization of Large Language Modelscited by 1
  13. 2025Adjoint sharding for very long context training of state space modelscited by 0
  14. 2026torchtune: PyTorch native post-training librarycited by 0
  15. 2026Large Byte Model: Teaching Language Models About Compiled Codecited by 0
  16. 2026Spokes: Optimizing for Diverse Pretraining Data Selectioncited by 0
  17. 2026Efficient Knowledge Distillation for LLMs: Offline Top-K Logits and a Fused Chunked KL Losscited by 0
  18. 2026Batch Size or Negatives? A Selection Rule for Memory-Constrained Recommender Trainingcited by 0
  19. 2026Keeping the Index Open: The Recommendation-Side Cost of Shared Search and Recommendationcited by 0
  20. 2026One Simple Trick for Improving the Performance of Energy-Limited Local Inference and Trainingcited by 0
  21. 2026Flattening Every Memory Peak in Long-Context Mixture-of-Experts Trainingcited by 0
  22. 2026Z-Loss Backward Geometry in Dense Output Heads and Sparse Routerscited by 0
  23. 2026Format-Aware Fusion for Fast FP4 Pretrainingcited by 0