3, 7, 14, 17, 42: Instruction Tuning Installs and Sharpens Number-Choice Heuristics in Language Models
Abstract
We measure, without sampling error, the probability a language model assigns to each integer from 1 to N when asked for a random number. For a fixed prompt the model defines one probability vector, which we compute by summing over each integer's scored spellings rather than estimate by sampling, removing the noise that limits earlier studies [1, 4]. We evaluate 18 open-weight model lines at five ranges up to N = 100, under 29 decoding configurations, on two inference stacks; 15 of them have matched base and instruction-tuned checkpoints that both give usable answers. Instruction tuning makes the distribution less uniform in all 15 pairs. It installs one heuristic, round-number avoidance, and sharpens another, endpoint avoidance. Base checkpoints do not avoid round numbers once the endpoints are removed from those sets; tuned checkpoints avoid them, multiples of 10 almost completely. Base checkpoints return the endpoints 1 and N at 0.30 to 0.60 of the interior rate; tuned checkpoints almost never return them. A preference for odd numbers is consistent across tuned checkpoints only at N = 100, where base checkpoints also show it weakly. Endpoint avoidance and the odd preference fit the account Kubovy and Psotka [6] proposed for human number choice; round-number avoidance is not part of that account, and the midpoint avoidance it predicts is essentially absent, with one slight exception at N = 100. Tuning does not install a new favourite integer shared across models: above N = 10 no modal integer is shared by more than 42 percent of tuned conditions, and P (17) rises in 10 of 15 pairs and falls in 5. The concentration is present in the model's own distribution: at temperature 1.0, nucleus truncation at top-p 0.95 adds a median of 0.035 to the total variation distance.
Figures & tables
| Temperature | Median TV diff. | 90th pct. | Same mode | |
|---|---|---|---|---|
| greedy | 125 | 0.0000 | 0.0000 | 93.6% |
| 0.1 | 502 | 0.0000 | 0.1622 | 93.2% |
| 0.3 | 512 | 0.0168 | 0.0872 | 95.3% |
| 0.5 | 527 | 0.0234 | 0.0776 | 96.4% |
| 0.7 | 532 | 0.0225 | 0.0703 | 97.2% |
| 0.8 | 540 | 0.0212 | 0.0634 | 97.8% |
| Pair (instruct name) | TV base | TV inst. | Change | Ent. base | Ent. inst. | Mode base | Mode inst. |
|---|---|---|---|---|---|---|---|
| google/gemma-3-4b-it | 0.135 | 0.966 | +0.831 | 0.051 | 3.398 | 5 | 17 |
| google/gemma-3-1b-it | 0.178 | 0.964 | +0.786 | 0.096 | 3.377 | 30 | 15 |
| Qwen/Qwen3-4B | 0.196 | 0.946 | +0.750 | 0.137 | 3.294 | 15 | 17 |
| Qwen/Qwen2.5-3B-Instruct | 0.235 | 0.910 | +0.675 | 0.175 | 3.000 | 17 | 23 |
| Qwen/Qwen2.5-7B-Instruct | 0.110 | 0.784 | +0.674 | 0.038 | 1.929 | 22 | 17 |
| meta-llama/Llama-3.1-8B-Instruct | 0.107 | 0.623 | +0.516 | 0.040 | 1.532 | 25 | 14 |
| Model [condition] | TV | Mode | (mode) | Valid mass | Ent. def. |
| allenai/OLMo-2-1124-7B [base] | 0.063 | 19 | 0.045 | 0.995 | 0.029 |
| meta-llama/Llama-3.2-3B [base] | 0.079 | 12 | 0.045 | 0.969 | 0.026 |
| google/gemma-2-2b [base] | 0.106 | 20 | 0.050 | 0.961 | 0.033 |
| meta-llama/Llama-3.1-8B [base] | 0.107 | 25 | 0.045 | 0.979 | 0.040 |
| Qwen/Qwen2.5-7B [base] | 0.110 | 22 | 0.044 | 0.974 | 0.038 |
| google/gemma-3-4b-pt [base] | 0.135 | 5 | 0.060 | 0.776 | 0.051 |
| Set | |||||
|---|---|---|---|---|---|
| base | |||||
| endpoints (1, N) | 0.72 | 0.46 | 0.33 | 0.38 | 0.44 |
| multiples of 10 | – | – | 0.99 | 1.12 | 0.92 |
| multiples of 5, not of 10 | – | 1.41 | 1.31 | 1.33 | 1.10 |
| primes | 1.44 | 1.25 | 1.03 | 1.05 | 1.03 |
| odd numbers | 1.59 | 1.23 | 1.17 | 1.09 | 1.08 |
| Contrast | |||||
|---|---|---|---|---|---|
| base | |||||
| odd vs even | – | – | 1.09 | 1.01 | 1.16 |
| prime vs non-prime | – | – | – | 1.07 | 1.10 |
| instruct | |||||
| odd vs even | – | – | 1.64 | 1.24 | 2.09 |
| prime vs non-prime | – | – | – | 2.10 | 1.52 |
| Instruct | Base | ||||||
|---|---|---|---|---|---|---|---|
| Range | Mode | Count | Mode/ | Median TV | Mode | Count | Median TV |
| 5 | 3 | 30 | 0.60 | 0.680 | 3 | 13 | 0.178 |
| 10 | 7 | 28 | 0.70 | 0.736 | 7 | 11 | 0.190 |
| 20 | 14 | 12 | 0.70 | 0.704 | 15 | 5 | 0.204 |
| 30 | 17 | 14 | 0.567 | 0.739 | 17 | 6 | 0.196 |
| 100 | 42 | 13 | 0.42 | 0.842 | 50 | 4 | 0.241 |
| Pair (instruct name) | base | ratio | inst. | ratio | change |
|---|---|---|---|---|---|
| google/gemma-3-4b-it | 0.0306 | 0.92 | 0.9996 | 29.99 | 32.62 |
| Qwen/Qwen3-4B | 0.0691 | 2.07 | 0.9798 | 29.39 | 14.19 |
| Qwen/Qwen3-8B | 0.1989 | 5.97 | 0.9569 | 28.71 | 4.81 |
| Qwen/Qwen2.5-7B-Instruct | 0.0426 | 1.28 | 0.4071 | 12.21 | 9.55 |
| meta-llama/Llama-3.2-1B-Instruct | 0.0761 | 2.28 | 0.2331 | 6.99 | 3.06 |
| meta-llama/Llama-3.2-3B-Instruct | 0.0347 | 1.04 | 0.1952 | 5.86 | 5.63 |
Appendix figures & tables2 assets
Supplementary material from the paper’s appendix.
Appendix
| Model [condition] | TV | Mode | (mode) | Valid mass | Ent. def. |
|---|---|---|---|---|---|
| mistralai/Mistral-7B-v0.3 [base] | 0.061 | 7 | 0.047 | 0.027 | 0.012 |
| google/gemma-2-2b-it [prefill] | 0.542 | 17 | 0.357 | 0.026 | 1.015 |
| google/gemma-2-2b-it [chat] | 0.573 | 17 | 0.361 | 0.002 | 1.109 |
| Line | Base checkpoint | Instruct checkpoint | Stacks | Note |
|---|---|---|---|---|
| Qwen2.5 | Qwen2.5-0.5B | Qwen2.5-0.5B-Instruct | both | |
| Qwen2.5-1.5B | Qwen2.5-1.5B-Instruct | both | ||
| Qwen2.5-3B | Qwen2.5-3B-Instruct | both | ||
| Qwen2.5-7B | Qwen2.5-7B-Instruct | Metal | ||
| Qwen3 | Qwen3-0.6B-Base | Qwen3-0.6B | both | thinking off |
| Qwen3-1.7B-Base | Qwen3-1.7B | both | thinking off |
Instruction Tuning
Instruction tuning adapts pretrained language models to follow natural-language requests using curated or synthesized instruction-response examples.
See all 82 papers