Geef Me FP32 of Geef Me de Dood? Uitdagingen en Oplossingen voor Reproduceerbaar Redeneren
Give Me FP32 or Give Me Death? Challenges and Solutions for Reproducible Reasoning
June 11, 2025
Auteurs: Jiayi Yuan, Hao Li, Xinheng Ding, Wenya Xie, Yu-Jhe Li, Wentian Zhao, Kun Wan, Jing Shi, Xia Hu, Zirui Liu
cs.AI
Samenvatting
Grote Taalmodellen (LLMs) zijn inmiddels onmisbaar in diverse domeinen en hebben indrukwekkende prestaties geleverd. Vooruitgang berust echter op de veronderstelling dat benchmarkscores zowel nauwkeurig als reproduceerbaar zijn. Wij tonen aan dat de reproduceerbaarheid van LLM-prestaties kwetsbaar is: veranderingen in systeemconfiguratie, zoals evaluatiebatchgrootte, aantal GPU's en GPU-versie, kunnen aanzienlijke verschillen in de gegenereerde reacties veroorzaken. Dit probleem is vooral prominent aanwezig in redeneermodellen, waar kleine afrondingsverschillen in vroege tokens kunnen uitmonden in uiteenlopende denkketens, wat uiteindelijk de nauwkeurigheid beïnvloedt. Bijvoorbeeld, onder bfloat16-precisie met gretige decodering, kan een redeneermodel zoals DeepSeek-R1-Distill-Qwen-7B tot 9% variatie in nauwkeurigheid en een verschil van 9.000 tokens in reactielengte vertonen als gevolg van verschillen in het aantal GPU's, het type GPU en de evaluatiebatchgrootte. Wij herleiden de oorzaak van deze variabiliteit naar het niet-associatieve karakter van floating-point rekenkunde onder beperkte numerieke precisie. Dit werk presenteert het eerste systematische onderzoek naar hoe numerieke precisie de reproduceerbaarheid in LLM-inferentie beïnvloedt. Door zorgvuldig gecontroleerde experimenten over verschillende hardware-, software- en precisie-instellingen, kwantificeren wij wanneer en hoe modeluitvoeren uiteenlopen. Onze analyse onthult dat floating-point precisie – hoewel cruciaal voor reproduceerbaarheid – vaak over het hoofd wordt gezien in evaluatiepraktijken. Geïnspireerd door dit inzicht, ontwikkelen wij een lichtgewicht inferentiepijplijn, genaamd LayerCast, die gewichten opslaat in 16-bit precisie maar alle berekeningen uitvoert in FP32, waardoor een balans wordt gevonden tussen geheugenefficiëntie en numerieke stabiliteit. Code is beschikbaar op https://github.com/nanomaoli/llm_reproducibility.
English
Large Language Models (LLMs) are now integral across various domains and have
demonstrated impressive performance. Progress, however, rests on the premise
that benchmark scores are both accurate and reproducible. We demonstrate that
the reproducibility of LLM performance is fragile: changing system
configuration such as evaluation batch size, GPU count, and GPU version can
introduce significant difference in the generated responses. This issue is
especially pronounced in reasoning models, where minor rounding differences in
early tokens can cascade into divergent chains of thought, ultimately affecting
accuracy. For instance, under bfloat16 precision with greedy decoding, a
reasoning model like DeepSeek-R1-Distill-Qwen-7B can exhibit up to 9% variation
in accuracy and 9,000 tokens difference in response length due to differences
in GPU count, type, and evaluation batch size. We trace the root cause of this
variability to the non-associative nature of floating-point arithmetic under
limited numerical precision. This work presents the first systematic
investigation into how numerical precision affects reproducibility in LLM
inference. Through carefully controlled experiments across various hardware,
software, and precision settings, we quantify when and how model outputs
diverge. Our analysis reveals that floating-point precision -- while critical
for reproducibility -- is often neglected in evaluation practices. Inspired by
this, we develop a lightweight inference pipeline, dubbed LayerCast, that
stores weights in 16-bit precision but performs all computations in FP32,
balancing memory efficiency with numerical stability. Code is available at
https://github.com/nanomaoli/llm_reproducibility.