SourceNumber Cookbook: Number Understanding of Language Models and How to Improve It
Across all eight tested released LLMs, accuracy on numerical tasks (addition, comparison, digit operations) drops substantially as the number of digits in the input grows. GPT-4o's integer addition accuracy falls from nearly 100% in the s range (1-4 digits) to around 40% in the l range (9-14 digits) and just 15% in the xl range (15-20 digits). The same pattern holds for float addition (90% to <5%) and is consistent across Llama-3.1, Qwen2, Mixtral, and Llama-2. The degradation affects both per-digit accuracy (digit match) and overall answer length (dlength), indicating the model struggles with both individual digit processing and generating correctly-lengthed outputs.