Research map / Large language models / Instruction and fine-tuning
Calibrated Language Models and How to Find Them with Label Smoothing
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Shows SFT degrades LLM calibration, that label smoothing restores it except for large-vocabulary small-hidden-size models, and provides a memory-efficient Triton cross-entropy kernel supporting label smoothing.
Problem
Instruction tuning (SFT) of LLMs degrades confidence calibration, and label smoothing, which could fix this, becomes ineffective for large-vocabulary models and cannot be computed memory-efficiently in standard fused cross-entropy kernels.
Approach
Argues via entropy bounds that the LM head's minimum entropy grows with vocabulary size and shrinks with hidden size, explaining when label smoothing fails to help, and designs a fused Triton kernel that computes the label-smoothed cross-entropy without materializing the full logit matrix.
Key results
- With label smoothing (beta=0.1) on Tulu3Mixture, Gemma2-2B MMLU ECE drops from 0.341 to 0.020 with accuracy roughly unchanged.
- The proposed kernel uses about 1.1 MB forward memory versus 24000 MB for the PyTorch baseline on a Gemma2-2B batch of 8192 tokens, with forward+backward 72.9 ms vs 104.9 ms.
- Label smoothing gives smaller calibration gains for LLaMA3 1B and 3B than for 8B, consistent with the entropy bound on large-vocabulary small-hidden-size LM heads.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Add label smoothing (β=0.1) during SFT | LLaMA3-8B · MMLU (5-shot; Tulu3Mixture) | ECE: 0.050 -> 0.012 | Helped |
| Add label smoothing (β=0.1) during SFT | Mistral-7B · MMLU (5-shot; Tulu3Mixture) | ECE: 0.096 -> 0.028 | Helped |
| Add label smoothing (β=0.1) during SFT | Gemma2-2B · MMLU (5-shot; Tulu3Mixture) | ECE: 0.341 -> 0.020 | Helped |
| Add label smoothing (β=0.1) during SFT | LLaMA3-8B · MMLU (5-shot; OpenHermes) | ECE: 0.038 -> 0.016 | Helped |
| Add label smoothing (β=0.1) during SFT | Mistral-7B · MMLU (5-shot; OpenHermes) | ECE: 0.071 -> 0.014 | Helped |
| Add label smoothing (β=0.1) during SFT | Gemma2-2B · MMLU (5-shot; OpenHermes) | ECE: 0.353 -> 0.016 | Helped |
| Use the custom kernel instead of torch.compile | Smoothed cross-entropy on Gemma2-2B · Gemma2-2B loss and gradients (β > 0) | forward+backward memory: \qty{16000}{MB} -> \qty{1164}{MB} | Helped |
| Use the custom kernel instead of torch.compile | Smoothed cross-entropy on Gemma2-2B · Gemma2-2B loss and gradients (β > 0) | forward+backward time: \qty{62.3}{ms} -> \qty{72.9}{ms} | Hurt |
| Remove vocabulary sorting (ablation) | Custom smoothed cross-entropy kernel · Gemma2-2B loss and gradients (β > 0) | forward+backward time: \qty{72.9}{ms} -> \qty{86.8}{ms} | Hurt |
| Remove vocabulary sorting (ablation) | Custom smoothed cross-entropy kernel · Gemma2-2B loss and gradients (β > 0) | forward+backward memory: \qty{1164}{MB} -> \qty{1162}{MB} | Helped |
| Remove gradient filtering (ablation) | Custom smoothed cross-entropy kernel · Gemma2-2B loss and gradients (β > 0) | forward+backward time: \qty{72.9}{ms} -> \qty{201.5}{ms} | Hurt |
| Fuse forward and backward passes (ablation) | Custom smoothed cross-entropy kernel · Gemma2-2B loss and gradients (β > 0) | forward+backward time: \qty{72.9}{ms} -> \qty{100.6}{ms} | Hurt |
Surprising findings
- Label smoothing has diminishing effectiveness for smaller large-vocabulary LLMs, because their LM head cannot reach low entropy, so smoothing only penalizes overconfidence that is absent.
- Temperature scaling with T>1 and logit softcapping can change the entropy bound and enable overconfidence in small models, which lets label smoothing work again.
Limitations
- Theoretical entropy bound relies on assumptions (norm constraints on logits) and is motivated rather than fully validated.
- Kernel does not beat torch.compile on time, and label smoothing adds slight overhead in the fused version.
- Experiments are limited to a few model families and MMLU/HellaSwag/Arc-easy with 5-shot evaluation.
Experimental setup
Datasets: Alpaca Tulu3Mixture OpenHermes-2.5
Benchmarks: MMLU HellaSwag Arc-easy
Metrics: accuracy expected calibration error root mean square calibration error peak GPU memory wall-clock time
Baselines: torch.compile torch.nn.CrossEntropyLoss Cut-Cross-Entropy Liger Kernels Chunked Cross Entropy (torchtune)
Builds on: label smoothing Cut-Cross-Entropy Liger Kernels open-instruct
Closest papers by meaning
- Calibrating Large Language Models with Sample Consistency (AAAI 2025 · similarity 0.91)
- Restoring Calibration for Aligned Large Language Models: A Calibration-Aware Fine-Tuning Approach (ICML 2025 · similarity 0.90)
- Thermometer: Towards Universal Calibration for Large Language Models (ICML 2024 · similarity 0.90)
- Beware of Calibration Data for Pruning Large Language Models (ICLR 2025 · similarity 0.89)
- Your Pre-trained LLM is Secretly an Unsupervised Confidence Calibrator (NeurIPS 2025 · similarity 0.89)
- Preserving LLM Capabilities through Calibration Data Curation: From Analysis to Optimization (NeurIPS 2025 · similarity 0.89)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
