{
  "id": 1465,
  "kind": "paper",
  "title": "The Role of Quantization in Loss Spikes",
  "summary": "Why do some pretraining runs look healthy for most of training and then diverge irreversibly? The paper names these delayed, terminal divergences time-bomb spikes and traces them to finite precision in the LM head. Mechanism: the cross-entropy gradient over the LM head is zero-sum along the vocabulary axis, but Adam's coordinate-wise preconditioning breaks that structure, inducing persistent drift in the mean output embedding and hence growth in output logit magnitude. In exact arithmetic that drift is harmless (a constant logit shift leaves softmax and its gradients unchanged), but in finite precision a large logit scale degrades how precisely the logit differences that determine the predictive distribution can be represented - measured directly, LM-head quantization error (RMS difference between native BF16 logits and FP32 logits recomputed from the same hidden states, plus the KL between the two predictive distributions) grows by orders of magnitude before each failure, and loss diverges soon after. Evidence (JAX/Flax modernized GPT-2 with QK-Norm, FineWeb, elevated learning rates, models 28M-1.4B): 404M models overtrained on 96B tokens (~12x Chinchilla) sit on near-identical loss curves until the higher-LR run time-bombs with accelerating logit growth; 28M models overtrained ~28x Chinchilla (16B tokens, five seeds) fail in strict precision order - BF16-true (weights and optimizer states stored in BF16) first, BF16-mixed later, FP32 LM head stable across the whole horizon - while logit norm grows under every AdamW baseline including FP32, so drift alone does not destabilize; precision decides whether drift becomes error. Mitigation: replace AdamW with SGD with momentum (momentum 0.99, separately tuned head LR) on the LM head only - SGD-M preserves the zero-sum gradient structure, keeps logit norm and quantization error nearly flat, prevents time-bombs even in BF16, stays competitive on final loss across the 404M LR sweep, and stores one fewer optimizer buffer; raising the head's AdamW beta1 to 0.99 closes much of the gap but still diverges at the largest trunk LR. Unifying result: z-loss, mu-centering, higher head precision, and SGD-M all prevent time-bombs and all keep quantization error bounded, suggesting suppressed finite-precision error is the shared mechanism behind previously unrelated mitigations. Costs: an FP32 LM head is the direct fix but the head GEMM is among the largest in the model and FP32 logits double the largest activation tensor; the optimizer-side mitigations keep BF16 and add little overhead. Caveats: demonstrated at 28M-404M scale in the overtraining regime with deliberately elevated LRs, not at frontier scale; fast transient spikes are a separate phenomenon, largely suppressed by learnable RMSNorm gains. Joins the catalog's precision thread as its loss-spike mechanism paper: LM-head quantization error is a measurable leading indicator that rises before the spike (a per-checkpoint series in the same family as the logit-margin signal), complementing the checkpoint-level spike-risk screen and the logit-growth mitigations already cataloged. Enrichment (2026-11-03, from senior author Micah Goldblum's launch thread for the paper's v2, revised 29 Oct 2026; project led by first author Zaiqian Chen): the thread's seed-averaged figures (n=5) put a concrete number on the at-horizon gap the abstract describes qualitatively - by 120k steps the AdamW baseline's logit quantization error climbs to roughly 1e0, while LM-head SGD-M holds it near 1e-2 to 1e-3, a two-to-three-orders-of-magnitude separation at the point where the baseline time-bombs; the same figures show the AdamW output-logit norm growing from about 1e6 to above 1e7 over 600k steps while the SGD-M curve stays flat. The thread also states the unification explicitly as the paper's moral: z-loss (acts on the loss), mu-centering (acts on the embeddings), and LM-head SGD-M (acts on the optimizer) are three intervention points on one principle - keep the LM head in the regime where BF16 arithmetic stays stable. Third-share thread additions (Dolatabadi explainer thread, via @miyashita_03, 2026-11-05): the delayed spike is framed as a time bomb set by absolute logit scale - a rare token whose LM-head row has a large norm produces logits around ~128, a magnitude where bf16 rounding misassigns probability mass; a small model spiked 3x after ~150B tokens and a larger one jumped from 2.9 to ~10 with benchmark forgetting. Raising peak LR reproduces the spike more strongly than widening the precision range does. Scope flag from the thread: the long runs are 28M and 404M models with no weight decay and learning rates chosen to provoke instability, so the mechanism explains a specific failure class rather than loss spikes in general. The share's framing (Miyashita): softmax is shift-invariant, so a shared logit offset cancels out - the damage is per-logit rounding at large magnitudes. The thread closes with an open question, flagged as the author's speculation: whether Muon-style momentum could serve as the LM-head optimizer in SGD-M's place.",
  "body": "",
  "notes": "License: paper CC BY 4.0 (license icon on the arXiv record); code MIT (verified on the repo: github.com/tingtang2/quantization-loss-spikes). Shared as a bare arXiv link 2026-11-01. Re-shared 2026-11-03 via @micahgoldblum's launch thread (status 2117635993704501606); duplicate of this entry (originally inserted 2026-11-01 from the bare arXiv link) - enriched, no new entry. Paper at v2 (revised 29 Oct 2026). Third share: @hmdolatabadi explainer thread (status 2118287456852148246) quote-posted by @miyashita_03 2026-11-05 (status 2118328415258608063); enrichment folded from that thread.",
  "url": "https://arxiv.org/abs/2610.38277",
  "links": [],
  "authors": [
    "Zaiqian Chen (Columbia University)",
    "Aditya Somasundaram (Mohamed bin Zayed University of Artificial Intelligence)",
    "Sophie Li (Columbia University)",
    "Sean McLeish (University of Maryland)",
    "John Kirchenbauer (Vector Institute)",
    "Tom Goldstein (University of Maryland)",
    "Micah Goldblum (Columbia University)"
  ],
  "tags": [],
  "topics": "",
  "venue": "arXiv preprint",
  "publisher": "",
  "source": "arxiv",
  "language": "en",
  "access": "free",
  "license": "",
  "published_year": 2026,
  "added_at": "2026-11-01T00:00:00.000Z",
  "verified_at": "2026-11-03T00:00:00.000Z",
  "attrs": {},
  "enrichment": {},
  "enriched_at": null,
  "license_class": "unknown",
  "langs": [
    "en"
  ],
  "modalities": [],
  "size_class": null,
  "provenance": {
    "legacy_paper_id": "1766"
  },
  "visibility": "public",
  "status": "active",
  "duplicate_of": null,
  "origin": "legacy",
  "created_at": "2026-11-01T17:35:37.119Z",
  "updated_at": "2026-11-05T15:14:40.437Z",
  "page": "https://papers.projxon.ai/entries/1465",
  "markdown": "https://papers.projxon.ai/entries/1465.md",
  "api": "https://papers.projxon.ai/api/entries/1465",
  "relations": [],
  "duplicates": [],
  "similar": [
    {
      "id": 1439,
      "kind": "paper",
      "title": "Simulating Training Spikes of Deep Neural Networks by Layer-wise Random Feature Models",
      "summary": "A mechanism paper for training spikes — the sharp temporary train+validation loss surges in LLM pretraining. Diagnostic starting point: ordinary loss fluctuations are driven by data shuffling and reproduce identically across seeds, but spikes occur at DIFFERENT steps for runs differing only in initialization, so spikes are not caused by a single bad data point and outlier removal cannot fully fix them. TOY MODEL (PLRF): a Power-Law Random Feature model — fixed random Gaussian features feeding linear regression, inputs power-law scaled with exponent α. Two necessary conditions for spikes in PLRF: (1) heavy-tailed data (large α) and (2) learning rate near the divergence threshold. At α=0.3 raising the LR just diverges cleanly; at α=0.9 BOTH SGD and Adam produce genuine spikes before divergence (claimed as the first explicit link between training spikes and heavy-tailed data). MECHANISM: decompose the iterate into deterministic full-batch descent plus a random walk accumulating stochastic gradient noise. Concentration of measure makes the loss concentrate on its expectation IFF α ≤ 0.5 (equivalently Σλ_i diverges for eigenvalues λ_i ∝ i^(−2α)); for α > 0.5 a few very large eigenvalues dominate, and when the noise random-walks into alignment with a large-eigenvalue direction, the loss surges. The EXPECTED loss stays smooth — average-case scaling-law analyses remain valid but stop describing individual runs. Side result: spikes occur in convex quadratic models under stochastic optimization — the 3rd-order terms needed for Edge-of-Stability spikes under full-batch GD are NOT necessary once gradient noise exists; and the SGD divergence threshold is not 2/λ_max but solves (1/B)·Σ γλ_i/(2−γλ_i) = 1 — sharpness (λ_max) is only distantly relevant; the whole eigenvalue distribution is what matters. LAYER-WISE SIMULATOR (Algorithm 1): each layer gets a 2nd-order Taylor expansion of validation loss around a checkpoint (per-example gradient second moments factorize through the activation-correlation spectrum — Prediction 5, verified with relative error <0.1, mostly within 5%, across layer types and steps); from ONE checkpoint + one validation pass (activation-correlation eigendecomposition, mean gradient, mean squared per-batch gradient norm, Hessian trace via Hutchinson probing), synthesize Gaussian per-batch gradients and roll the real optimizer map forward — ~5 seconds on CPU for 1,500 steps for one layer, vs 8 min–1.7 hrs of measurement on TPUv4×32 and 40 hrs to train the case-study model. CASE STUDY: vanilla 1.3B decoder-only Transformer (24 blocks, d=2048, C4, ~25.5B tokens, AdamW β2=0.95, peak LR 8.2e-4, NO gradient clipping); changing only β2 0.95 → 0.999 induces spikes (two seeds). Simulating from the step-21k checkpoint, the normal configuration stays comparatively smooth while both spiky configurations show clear bumps — matching the qualitative fact of spikiness, NOT the step (spike timing is random by construction). Activation-correlation eigenvalues are power-law distributed and MORE heavy-tailed for the spiky configuration, especially in lower layers. EQUIVALENT BATCH FACTOR: despite ~524K tokens per batch, the measured equivalent batch factor 𝔅 ≈ 1 — for gradient-noise purposes Transformer LM training sits in the SMALL-BATCH stochastic regime, because per-token gradients vary wildly; token-count batch size does not buy the gradient-noise suppression sequence-count reasoning suggests. β2 RECIPE: make Adam's second-moment decorrelation time ~1/√(η_t·H) instead of ~1/(η_t·H), giving β2 ≈ 1 − √(η_t·𝔗/√𝔑) from measured Hessian trace 𝔗 and per-batch gradient norm 𝔑 — generically an INCREASING β2 schedule as LR decays; fitted schedule β2 0.982 → 0.992 gave final val loss 2.4404 vs 2.4421 for constant 0.95 and 2.4502 (visibly spiky) for constant 0.992 — real but TINY margins (0.0017 over the original; 0.0001 over the best constant), single runs, no seed variance; the sharper finding is the sensitivity — a 0.01 change in constant β2 flips training between smooth and spiky. Caveats (authors' own, unusually candid): the simulator explains spikes only PARTIALLY — measured 2nd-order terms show level \"jumps\" rather than spike-and-recovery, 1st-order terms are ~20× larger than the quadratic model predicts; cross-layer correlations and >2nd-order terms are needed and absent; the honest claim is \"quadratic models at least partially reveal the mechanism,\" weaker than the abstract's \"successfully predicts.\" \"Prediction\" is qualitative — a spike-RISK screen from a checkpoint, not a forecast of when. The layer framework rests on imposed assumptions (Gaussian latents with negligible drift; isotropic output-gradient covariance) and EXCLUDES tied embedding/LM-head weights entirely. The β2 mechanism is admittedly unexplained (\"a curious mystery\"); the recipe is offered as proof of concept. Simulator accuracy degrades badly with batch size in the PLRF check (severe overestimation at B=64) — the DNN case is argued safe only because 𝔅 happens to be ≈1 for this recipe. Single case study: one size (1.3B), one dataset, one recipe, spikiness constructed by pushing β2, no gradient clipping (atypical for production pretraining); Muon is mentioned only as neighboring spectrum work, NOT simulated. All results first-party, no independent replication, paper ~2 weeks old.",
      "url": "https://arxiv.org/abs/2610.13524",
      "authors": [
        "Ran Tian (Google DeepMind)",
        "Courtney Paquette (McGill University / Mila — Québec AI Institute",
        "CIFAR AI Chair",
        "also 20% part-time at Google DeepMind)"
      ],
      "tags": [],
      "venue": "arXiv cs.LG preprint v1, submitted 9 Oct 2026 (no venue stated, not peer-reviewed as far as the record shows)",
      "source": "arxiv",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-10-22T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": null,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/1439",
      "markdown": "https://papers.projxon.ai/entries/1439.md",
      "api": "https://papers.projxon.ai/api/entries/1439"
    },
    {
      "id": 924,
      "kind": "paper",
      "title": "Matryoshka Quantization",
      "summary": "MatQuant (Google DeepMind) co-trains/co-distills nested integer precisions so a single checkpoint can be sliced to int8/int4/int2; int2 extracted models beat standard int2 by up to ~4–7% depending on base quantizer.",
      "url": "https://arxiv.org/abs/2502.06786",
      "authors": [
        "Pranav Nair",
        "Puranjay Datta",
        "Jeff Dean",
        "Prateek Jain",
        "Aditya Kusupati"
      ],
      "tags": [
        "matquant",
        "matryoshka",
        "quantization",
        "int2",
        "int4",
        "deepmind",
        "arxiv:2502.06786"
      ],
      "venue": "arXiv 2502.06786",
      "source": "arxiv",
      "license": "arXiv non-exclusive",
      "published_year": 2025,
      "added_at": "2026-10-02T23:40:42.683Z",
      "has_dataset_profile": false,
      "license_class": "other",
      "langs": [],
      "modalities": [],
      "size_class": null,
      "citation_count": 12,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/924",
      "markdown": "https://papers.projxon.ai/entries/924.md",
      "api": "https://papers.projxon.ai/api/entries/924"
    },
    {
      "id": 829,
      "kind": "paper",
      "title": "Disaggregated Quantization: Specializing LLM Prefill and Decode",
      "summary": "Disaggregated quantization (DQ): separate computation formats, weights, and storage placement specialized to prefill vs decode -- low-precision arithmetic accelerates prompt processing, compact weights reduce memory traffic during generation. Removing activation quantization on decode improves accuracy on decode-heavy tasks without added inference cost (Qwen 3, Gemma 3). Separate compute-native prefill weights accelerate prompt processing vs weight-only inference while matching/exceeding its accuracy at 2-3-bit decode. Training an NVFP4 prefiller improves 1-bit accuracy by 32.5 points on MMLU-Pro and 35.3 on MMMU-Pro without modifying the decode checkpoint (Qwen3.8-27B GGUF decoder). \"Offloaded disaggregated prefill\" (ODP) streams the extra prefill checkpoint from SSD, amortizing loading over prompt length: 1.78x time-to-first-token speedup over the weight-only baseline at 8K prompt length in llama.cpp. Accuracy evaluated under disaggregated serving in vLLM; shared-weight format disaggregation validated via PTQ on models up to 2.8T parameters.",
      "url": "https://huggingface.co/papers/2609.26333",
      "authors": [
        "Andrei Panferov",
        "Maximilian Kleinegger",
        "Sweta Priyadarshi",
        "Tijmen Blankevoort",
        "Dan Alistarh"
      ],
      "tags": [
        "quantization",
        "inference",
        "prefill",
        "decode",
        "nvfp4",
        "low-bit-inference",
        "serving"
      ],
      "venue": "IST Austria Distributed Algorithms and Systems Lab (arXiv 2026-09-21; HF #2 Paper of the Day)",
      "source": "paper_page",
      "license": "",
      "published_year": 2026,
      "added_at": "2026-09-30T00:00:00.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [
        "en"
      ],
      "modalities": [],
      "size_class": null,
      "citation_count": 0,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/829",
      "markdown": "https://papers.projxon.ai/entries/829.md",
      "api": "https://papers.projxon.ai/api/entries/829"
    },
    {
      "id": 565,
      "kind": "paper",
      "title": "Optimizing Large Language Model Training Using FP4 Quantization",
      "summary": "First from-scratch FP4 LLM pretraining: Differentiable Gradient Estimator (DGE, k=5) corrects E2M1 weight grads vs STE, and Outlier Clamping and Compensation (OCC, α=0.99 plus a ~2% sparse residual) keeps activations from collapsing. Mixed-precision W4A4 GeMM simulated on H100 FP8 cores with token-wise activation and channel-wise weight scaling. LLaMA-2 1.3B/7B/13B on 100B DCLM tokens: train loss 2.55/2.17/1.97 vs BF16 2.49/2.07/1.88; zero-shot avg 53.13/54.42/54.95 vs 53.23/53.87/54.44. Direct W4A4 diverges. ICML 2025. Framework https://aka.ms/MS.AMP (Azure/MS-AMP).",
      "url": "https://arxiv.org/abs/2501.17116",
      "authors": [
        "Ruizhe Wang",
        "Yeyun Gong",
        "Xiao Liu",
        "Guoshuai Zhao",
        "Ziyue Yang",
        "Baining Guo",
        "Zhengjun Zha",
        "Peng Cheng"
      ],
      "tags": [
        "fp4",
        "quantization",
        "dge",
        "occ",
        "mixed-precision",
        "llama2",
        "dclm",
        "icml",
        "microsoft",
        "e2m1"
      ],
      "venue": "arXiv / Microsoft Research Asia / University of Science and Technology of China",
      "source": "",
      "license": "",
      "published_year": 2025,
      "added_at": "2026-10-01T16:45:06.278Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [],
      "modalities": [],
      "size_class": null,
      "citation_count": 62,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/565",
      "markdown": "https://papers.projxon.ai/entries/565.md",
      "api": "https://papers.projxon.ai/api/entries/565"
    },
    {
      "id": 962,
      "kind": "paper",
      "title": "GPTQ: Accurate Post-Training Quantization for Generative Pre-trained Transformers",
      "summary": "Generative Pre-trained Transformer models, known as GPT or OPT, set themselves apart through breakthrough performance across complex language modelling tasks, but also by their extremely high computational and storage costs. Specifically, due to their massive size, even inference for large, highly-accurate GPT models m…",
      "url": "https://arxiv.org/abs/2210.17323",
      "authors": [
        "Frantar",
        "Elias",
        "Ashkboos",
        "Saleh",
        "Hoefler",
        "Torsten",
        "Alistarh",
        "Dan"
      ],
      "tags": [
        "arxiv",
        "2210-17323",
        "quantization-efficiency",
        "linkedin-thread"
      ],
      "venue": "arXiv 2210.17323",
      "source": "arxiv",
      "license": "",
      "published_year": 2022,
      "added_at": "2026-09-15T00:46:23.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [],
      "modalities": [],
      "size_class": null,
      "citation_count": 2668,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/962",
      "markdown": "https://papers.projxon.ai/entries/962.md",
      "api": "https://papers.projxon.ai/api/entries/962"
    },
    {
      "id": 963,
      "kind": "paper",
      "title": "AWQ: Activation-aware Weight Quantization for LLM Compression and Acceleration",
      "summary": "Large language models (LLMs) have transformed numerous AI applications. On-device LLM is becoming increasingly important: running LLMs locally on edge devices can reduce the cloud computing cost and protect users' privacy. However, the astronomical model size and the limited hardware resource pose significant deploymen…",
      "url": "https://arxiv.org/abs/2306.00978",
      "authors": [
        "Lin",
        "Ji",
        "Tang",
        "Jiaming",
        "Haotian",
        "Yang",
        "Shang",
        "Chen",
        "Wei-Ming",
        "Wang",
        "Wei-Chen",
        "Xiao",
        "Guangxuan",
        "Dang",
        "Xingyu",
        "et al. (10 authors)"
      ],
      "tags": [
        "arxiv",
        "2306-00978",
        "ocr-vision-language",
        "quantization-efficiency",
        "linkedin-thread"
      ],
      "venue": "arXiv 2306.00978",
      "source": "arxiv",
      "license": "",
      "published_year": 2023,
      "added_at": "2026-09-15T00:46:23.000Z",
      "has_dataset_profile": false,
      "license_class": "unknown",
      "langs": [],
      "modalities": [],
      "size_class": null,
      "citation_count": 1868,
      "downloads": null,
      "stars": null,
      "page": "https://papers.projxon.ai/entries/963",
      "markdown": "https://papers.projxon.ai/entries/963.md",
      "api": "https://papers.projxon.ai/api/entries/963"
    }
  ]
}
