Fewer Bits, More Tries: Recovering Capability Under Memory Constraints
Organizations: Texas A&M · Apple
Abstract
Large language models are generally more capable than smaller ones, but their memory requirements can make local deployment difficult. We ask whether part of this capability gap can instead be recovered by running a smaller or more compressed model multiple times and selecting among its outputs using public or model-generated tests. Single-user local inference can leave hardware underutilized, allowing parallel candidate generation to trade additional test-time computation for accuracy at modest latency cost. Across four code-generation benchmarks, verified retry recovers substantial accuracy lost to model size or compression. A 7B Qwen model with eight parallel attempts essentially matches a 32B model on MBPP+ and exceeds it on the other three benchmarks, while using about less model memory, running up to faster, and using less energy, as measured on Nvidia GPU. We observe similar tradeoff across model sizes, compression levels and hardware choices, although exact benefit depends on the hardware profile and problem setting. These results show that model capacity can be traded for verified test-time computation when correct solutions remain reachable within a modest retry budget.
Figures & tables
| MBPP+ | HumanEval+ | LiveCodeBench | BigCodeBench | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Checkpoint | Acc. | Wall speedup | Energy saving | Acc. | Wall speedup | Energy saving | Acc. | Wall speedup | Energy saving | Acc. | Wall speedup | Energy saving |
| Coder-3B ( ) | 74.2% | 87.5% | 19.8% | 58.2% | ||||||||
| Coder-7B ( ) | 77.8% | 89.4% | 27.5% | 62.7% | ||||||||
| Coder-14B ( ) | 79.4% | 89.5% | 33.9% | 66.3% | ||||||||
| Coder-32B ( ) | 77.9% | 85.1% | 27.1% | 56.6% | ||||||||
| Accuracy | Cost of recovering bf16 one-shot accuracy | ||||||
|---|---|---|---|---|---|---|---|
| Benchmark | One-shot 1-bit / bf16 | At recovery 1-bit / bf16 | Selected after 50 tries 1-bit / bf16 | Any correct in 50 1-bit / bf16 | Tries to recover | Wall-time ratio | Energy ratio |
| HumanEval+ | 85.5% / 89.3% | 91.5% / 89.3% | 93.9% / 93.9% | 98.2% / 98.2% | |||
| MBPP+ | 68.9% / 77.2% | 79.8% / 77.2% | 82.5% / 83.6% | 87.3% / 88.6% | |||
| LiveCodeBench | 14.6% / 16.8% | 20.9% / 16.8% | 34.9% / 34.3% | 35.4% / 34.3% | |||
| BigCodeBench | 19.2% / 26.7% | 29.9% / 26.7% | 63.4% / 67.0% | 72.3% / 70.8% | |||
| Accuracy | Memory | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Benchmark | 7B one-shot | 7B, 8 tries generated tests | vs. 32B one-shot | 7B, 50 tries generated tests | vs. 32B one-shot | 7B, 50 tries public tests | 32B one-shot | Weights (GB) 7B / 32B | Memory saving | Process peak (GB) 7B / 32B |
| MBPP+ | 71.6% | 76.8% | 78.6% | 79.9% | 77.9% | 5.57 / 65.53 | 11.73 / 73.02 | |||
| HumanEval+ | 80.0% | 82.9% | 83.5% | 87.8% | 85.1% | 5.57 / 65.53 | 11.73 / 73.02 | |||
| LiveCodeBench | 16.1% | 25.0% | 28.0% | 31.4% | 27.1% | 5.57 / 65.53 | 11.73 / 73.02 | |||
| BigCodeBench | 46.3% | 52.7% | 53.5% | 67.9% | 56.6% | 5.57 / 65.53 | 11.73 / 73.02 | |||
Appendix figures & tables24 assets
Supplementary material from the paper’s appendix.
Appendix
| MBPP+ ( ref.) | HumanEval+ ( ref.) | LiveCodeBench ( ref.) | BigCodeBench ( ref.) | |||||||||||||||||
| Checkpoint | Acc. | Wall | Wall speedup | J/task | Energy saving | Acc. | Wall | Wall speedup | J/task | Energy saving | Acc. | Wall | Wall speedup | J/task | Energy saving | Acc. | Wall | Wall speedup | J/task | Energy saving |
| Coder-3B ( ) | 74.2% | 3.12 | 32 | 87.5% | 5.17 | 60 | 19.8% | 7.46 | 120 | 58.2% | 4.59 | 54 | ||||||||
| Coder-7B ( ) | 77.8% | 4.31 | 59 | 89.4% | 5.25 | 68 | 27.5% | 5.06 | 104 | 62.7% | 5.07 | 72 | ||||||||
| Coder-14B ( ) | 79.4% | 7.75 | 110 | 89.5% | 11.66 | 175 | 33.9% | 20.08 | 450 | 66.3% | 10.51 | 157 | ||||||||
| Coder-32B ( ) | 77.9% | 8.57 | 112 | 85.1% | 11.41 | 162 | 27.1% | 29.82 | 692 | 56.6% | 6.69 | 92 | ||||||||
| Benchmark | Checkpoint | pass@1 | exec@8 | exec@50 | oracle@50 | CodeT@8 | Usable tests |
|---|---|---|---|---|---|---|---|
| HumanEval+ | Bonsai Q1_0 (1-bit) | 85.5% | 93.3% | 93.9% | 98.2% | 91.2% | 0.707 |
| Bonsai AWQ4 (4-bit) | 89.9% | 94.1% | 94.5% | 98.2% | 93.1% | 0.866 | |
| Qwen3.6-27B (bf16) | 89.3% | 93.6% | 93.9% | 98.2% | 93.3% | 0.927 | |
| MBPP+ | Bonsai Q1_0 (1-bit) | 68.9% | 81.0% | 82.5% | 87.3% | 78.2% | 0.810 |
| Bonsai AWQ4 (4-bit) | 76.6% | 82.3% | 83.3% | 87.8% | 80.8% | 0.918 | |
| Qwen3.6-27B (bf16) | 77.2% | 83.5% | 83.6% | 88.6% | 82.1% | 0.899 |
| Weights (GB) Q1 / bf16 | Weight saving | Wall (s) Q1 / bf16 | Wall-clock speedup | tok/s Q1 / bf16 | Throughput ratio | J/task Q1 / bf16 | Energy saving | |
|---|---|---|---|---|---|---|---|---|
| 1 | 3.80 / 54.66 | 271.7 / 359.7 | 222.8 / 156.5 | 1,656.2 / 3,946.8 | ||||
| 8 | 3.80 / 54.66 | 1,549.1 / 2,719.3 | 307.4 / 166.0 | 10,367 / 30,382 | ||||
| 50 | 3.80 / 54.66 | 8,603.8 / 16,477.5 | 346.8 / 171.1 | 59,151 / 185,108 |
| M3 Max, 64 GiB | M5 Pro, 64 GiB | ||||||||||
| Benchmark | Comparison | Accuracy dep./ref. | Memory saving ( ) | Speedup ( ) | Energy saving ( ) | Power ratio ( ) | Swap | Speedup ( ) | Energy saving ( ) | Power ratio ( ) | Swap |
| One-bit quantization | |||||||||||
| HumanEval+ | Q1@4 / 27B@1 | 93.1/89.3 | 13.41 | 0.85 | 0.88 | 1.04 | yes/no | 1.67 | 1.06 | 0.63 | yes/no |
| MBPP+ | Q1@4 / 27B@1 | 79.8/77.2 | 13.45 | 0.86 | 0.83 | 0.97 | yes/no | 1.59 | 1.05 | 0.66 | yes/no |
| LiveCodeBench | Q1@4 / 27B@1 | 25.6/16.8 | 13.31 | 0.87 | 0.87 | 1.00 | yes/no | 1.66 | 1.08 | 0.65 | yes/no |
| BigCodeBench | Q1@4 / 27B@1 | 41.4/26.7 | 11.43 | 0.83 | 0.82 | 0.99 | yes/no | 1.58 | 1.03 | 0.65 | yes/no |
| Memory | MBPP+ | HumanEval+ | LiveCodeBench | BigCodeBench | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Model size | Compact precision | Weights (GB) bf16 compact | Weight saving | pass@1 | exec@50 | pass@1 | exec@50 | pass@1 | exec@50 | pass@1 | exec@50 | Largest at |
| Coder-3B | GPTQ4 | 6.17 2.07 | +0.7 | +0.0 | -1.0 | +1.7 | +0.0 | +2.3 | -1.7 | -0.3 | 2.3 | |
| Coder-7B | AWQ4 | 15.23 5.57 | +2.0 | +1.3 | -2.6 | -3.1 | -0.2 | -2.3 | -1.6 | +0.1 | 3.1 | |
| Coder-32B | AWQ4 | 65.53 19.33 | -0.7 | -3.0 | -0.6 | +0.9 | +0.6 | +2.3 | +0.3 | +0.1 | 3.0 | |
| Qwen3-Coder MoE | AWQ4 | 61.07 16.81 | +0.4 | +0.3 | +0.2 | -0.7 | -1.8 | -2.3 | -3.4 | +0.8 | 2.3 | |
| Model | Precision | Weights (GB) | MBPP+ | HumanEval+ | LiveCodeBench | BigCodeBench | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| pass@1 | exec@50 | CodeT@50 | pass@1 | exec@50 | CodeT@50 | pass@1 | exec@50 | CodeT@50 | pass@1 | exec@50 | CodeT@50 | |||
| Coder-3B | bf16 | 6.17 | 61.6% | 77.5% | 75.4% | 77.4% | 87.9% | 84.2% | 9.5% | 26.3% | 18.3% | 41.3% | 64.7% | 49.7% |
| GPTQ 8-bit | 3.47 | 63.3% | 78.3% | 71.4% | 77.7% | 88.4% | 82.9% | 10.1% | 28.6% | 19.4% | 40.7% | 64.1% | 48.6% | |
| AWQ 4-bit | 2.69 | 62.6% | 78.0% | 71.4% | 75.9% | 90.9% | 84.1% | 8.7% | 26.3% | 17.7% | 39.5% | 64.0% | 47.7% | |
| GPTQ 4-bit | 2.07 | 62.3% | 77.5% | 71.2% | 76.4% | 89.6% | 83.5% | 9.5% | 28.6% | 17.7% | 39.5% | 64.4% | 47.6% | |
| Coder-7B | bf16 | 15.23 | 69.6% | 78.6% | 77.5% | 82.6% | 90.9% | 84.1% | 16.3% | 33.7% | 28.0% | 47.9% | 67.8% | 56.2% |
| Benchmark | pass@1 3B 32B | pass@1 | exec@50 3B 32B | CodeT@50 3B 32B | oracle@50 3B / 7B / 14B / 32B | oracle@50 range |
|---|---|---|---|---|---|---|
| MBPP+ | +16.3 | 1.3 | ||||
| HumanEval+ | +7.7 | 2.4 | ||||
| BigCodeBench | +15.4 | 1.5 | ||||
| LiveCodeBench | +17.6 | 13.1 |
| Precision | Weights (GB) | MBPP+ | HumanEval+ | LiveCodeBench | BigCodeBench | ||||
|---|---|---|---|---|---|---|---|---|---|
| pass@1 | exec@50 | pass@1 | exec@50 | pass@1 | exec@50 | pass@1 | exec@50 | ||
| bf16 | 61.07 | 77.2% | 79.3% | 88.5% | 90.9% | 32.7% | 43.4% | 57.0% | 63.3% |
| FP8 | 31.18 | 77.1% | 79.4% | 88.2% | 91.5% | 31.6% | 45.1% | 57.8% | 63.5% |
| GPTQ 8-bit | 32.00 | 77.4% | 79.1% | 88.2% | 90.9% | 32.4% | 45.1% | 54.7% | 62.6% |
| AWQ 4-bit | 16.81 | 77.6% | 79.6% | 88.7% | 90.2% | 30.9% | 41.1% | 53.6% | 64.1% |
| GPTQ 4-bit | 16.93 | 76.8% | 78.8% | 87.8% | 90.2% | 31.5% | 44.0% | 52.6% | 62.1% |
| Model | Precision | exec@50 | oracle@50 | Public-test gap | CodeT@50 | CodeT gap | Tasks with usable tests |
|---|---|---|---|---|---|---|---|
| Coder-3B | bf16 | 64.7% | 75.6% | 10.9 | 49.7% | 15.0 | 99.9% |
| GPTQ 8-bit | 64.1% | 74.5% | 10.3 | 48.6% | 15.5 | 100.0% | |
| AWQ 4-bit | 64.0% | 75.1% | 11.1 | 47.7% | 16.3 | 99.8% | |
| GPTQ 4-bit | 64.4% | 75.5% | 11.1 | 47.6% | 16.8 | 100.0% | |
| Coder-7B | bf16 | 67.8% | 76.9% | 9.1 | 56.2% | 11.6 | 99.9% |
| GPTQ 8-bit | 67.6% | 76.7% | 9.1 | 55.5% | 12.1 | 100.0% |
| Strategy | Retried checkpoint | One-shot reference | Selection | Retried weights (GB) | Weight saving | MBPP+ | HumanEval+ | LiveCodeBench | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Acc. | Acc. | Acc. | |||||||||
| Prune + distill | Minitron-8B | Coder-32B bf16 | exec@50 | 16.83 | 71.7/77.9% | 75.0/85.1% | 26.3/27.1% | ||||
| Native bf16 | Coder-7B | Coder-32B bf16 | exec@50 | 15.23 | 78.6/77.9% | 90.9/85.1% | 33.7/27.1% | ||||
| Quantization | Coder-7B AWQ4 | Coder-32B bf16 | exec@50 | 5.57 | 79.9/77.9% | 87.8/85.1% | 31.4/27.1% | ||||
| Reasoning distill | R1-Distill-1.5B | Coder-32B bf16 | exec@50 | 3.55 | 71.7/77.9% | 79.9/85.1% | 30.9/27.1% | ||||
| Quantization | Coder-3B GPTQ8 | Coder-32B bf16 | exec@50 | 3.47 | 78.3/77.9% | 88.4/85.1% | 28.6/27.1% | ||||
| Coder-3B | Coder-7B | Coder-32B | ||||
|---|---|---|---|---|---|---|
| Gain (%) | Wall-time multiplier | Gain (%) | Wall-time multiplier | Gain (%) | Wall-time multiplier | |
| 1 | 0 | 1.00 | 0 | 1.00 | 0 | 1.00 |
| 2 | 40 | 1.45 | 56 | 1.14 | 33 | 1.12 |
| 4 | 63 | 1.44 | 83 | 1.35 | 55 | 1.29 |
| 8 | 80 | 1.95 | 93 | 1.73 | 80 | 1.72 |
| 16 | 91 | 4.78 | 99 | 3.13 | 90 | 2.68 |
| Coder-7B across retry budget | Model size at | ||||||
|---|---|---|---|---|---|---|---|
| Benchmark | 3B | 7B | 14B | 32B | |||
| MBPP+ | 18.2% | 6.0% | 4.2% | 5.0% | 4.2% | 4.0% | 4.2% |
| HumanEval+ | 12.4% | 5.8% | 4.3% | 3.7% | 4.3% | 3.7% | 6.1% |
| LiveCodeBench | 77.8% | 55.4% | 38.9% | 48.6% | 38.9% | 30.9% | 34.3% |
| BigCodeBench | 40.1% | 20.8% | 13.9% | 14.1% | 13.9% | 14.5% | 15.1% |
| MBPP+ | HumanEval+ | LiveCodeBench | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Mode | Acc. | Wall (s) | J/task | Acc. | Wall (s) | J/task | Acc. | Wall (s) | J/task | |
| Instruct | 1 | 77.9% | 16.5 | 243 | 87.9% | 52.8 | 700 | 43.8% | 114.5 | 1,707 |
| 8 | 79.3% | 53.3 | 866 | 89.9% | 137.2 | 2,301 | 53.0% | 199.4 | 4,317 | |
| 50 | 79.6% | 130.2 | 2,454 | 90.2% | 257.5 | 5,099 | 52.6% | 467.6 | 11,156 | |
| Thinking | 1 | 79.5% | 124.2 | 2,008 | 91.2% | 83.8 | 1,389 | 51.7% | 186.0 | 3,899 |
| 8 | 80.9% | 218.3 | 4,899 | 92.9% | 193.0 | 3,972 | 62.2% | 578.2 | 13,670 | |
| Model | Type | pass@1 | CodeT@50 | exec@50 | oracle@50 |
|---|---|---|---|---|---|
| Coder-1.5B | native Coder | 57.3% | 68.3% | 75.4% | 84.7% |
| Coder-14B | native Coder | 73.2% | 79.4% | 80.4% | 86.0% |
| Qwen2.5-72B | general model | 78.2% | 78.7% | 80.8% | 84.4% |
| Benchmark | |||
|---|---|---|---|
| MBPP+ | |||
| HumanEval+ | |||
| LiveCodeBench | |||
| BigCodeBench |
| Model | accuracy (pp) | 95% CI (pp) |
|---|---|---|
| Coder-1.5B | +6.08 | [ 2.65, 9.79] |
| Coder-3B | +3.70 | [ 1.06, 6.61] |
| Coder-7B | +3.44 | [ 1.06, 5.82] |
| Coder-14B | +1.32 | [-0.79, 3.44] |
| Coder-32B | +0.79 | [-1.32, 2.91] |
| MBPP+ | HumanEval+ | LiveCodeBench | ||||
| Checkpoint | Usable | Tests | Usable | Tests | Usable | Tests |
| Native Qwen2.5-Coder | ||||||
| Coder-1.5B | 0.99 | 10.8 | 0.99 | 11.2 | 0.95 | 8.4 |
| Coder-3B | 1.00 | 11.5 | 1.00 | 11.7 | 0.98 | 9.8 |
| Coder-7B | 1.00 | 11.8 | 1.00 | 11.8 | 0.95 | 9.5 |
| Coder-14B | 1.00 | 12.0 | 1.00 | 11.9 | 0.89 | 8.9 |
| KV cache (GB) | Weights + KV (GB) | Accuracy (%) | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Benchmark | Checkpoint | (GB) | ||||||||||||
| MBPP+ | Coder-3B AWQ4 | 2.69 | 0.01 | 0.04 | 0.07 | 0.45 | 2.70 | 2.73 | 2.76 | 3.14 | 62.5% | 72.5% | 75.0% | 78.0% |
| Coder-7B AWQ4 | 5.57 | 0.02 | 0.07 | 0.13 | 0.78 | 5.59 | 5.64 | 5.70 | 6.35 | 71.7% | 77.6% | 78.6% | 79.9% | |
| Coder-7B bf16 | 15.23 | 0.02 | 0.07 | 0.13 | 0.78 | 15.25 | 15.30 | 15.36 | 16.01 | 69.6% | 77.0% | 78.0% | 78.6% | |
| Coder-32B bf16 | 65.53 | 0.09 | 0.29 | 0.56 | 3.41 | 65.62 | 65.82 | 66.09 | 68.94 | 77.9% | 80.8% | 81.8% | 82.9% | |
| HumanEval+ | Coder-3B AWQ4 | 2.69 | 0.02 | 0.07 | 0.13 | 0.80 | 2.71 | 2.76 | 2.82 | 3.49 | 75.8% | 86.1% | 88.5% | 90.9% |
| Configuration | Lowest successful utilization | Peak (GB) | Process-memory saving |
|---|---|---|---|
| Coder-7B AWQ4, | 0.045 | 11.55 | |
| Coder-7B AWQ4, | 0.046 | 11.73 | |
| Coder-7B bf16, | 0.098 | 21.58 | |
| Coder-32B bf16, | 0.370 | 73.02 |