Pith. sign in

REVIEW 3 cited by

Cut Your Losses in Large-Vocabulary Language Models

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2411.09009 v2 pith:GGNFVPM2 submitted 2024-11-13 cs.LG cs.CL

classification cs.LGcs.CL
keywords memorycross-entropycomputationconsumptionlossmodelscomputesdramatic
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

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.

Discussion (0). Sign in to comment.

Forward citations

Cited by 3 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. Large Byte Model: Teaching Language Models About Compiled Code

    cs.CR 2026-06 unverdicted novelty 7.0 of 10

    Presents a byte-native LLM with bespoke tokenizer achieving 69-98% accuracy on malware family and architecture classification from raw bytes.

  2. Faster and Memory-Efficient Training of Sequential Recommendation Models for Large Catalogs

    cs.IR 2025-08 accept novelty 6.0 of 10

    CCE- is a Triton kernel implementation of cross-entropy loss with negative sampling that reduces memory by more than 10x and accelerates training by up to 2x for large-catalog sequential recommenders.

  3. Towards Generalizable and Efficient Large-Scale Generative Recommenders

    cs.IR 2026-05 unverdicted novelty 4.0 of 10

    Empirical scaling of generative recommenders to 1B parameters shows task-dependent gains and requires targeted adaptations for production constraints like latency and item freshness.

Pith tools