Oct 30 figure, size, sandbox network and Qwen wording corrections
#2
by austindixson - opened
Files changed (4)
- CHANGELOG.md+8
- README.md+12-6
- figures/fig_oct30.pngAdded
- figures/make_fig_oct30.pyAdded+41
12345# Changelog## 2026-10-30- README: lead with speed. At full context the tool gives about the same accuracy with 20 to 28% fewer tokens on AIME. It does not raise accuracy.12345678910111213# Changelog## 2026-10-30 (figure and corrections)- README: the top AIME figure is now `figures/fig_oct30.png` (Oct 30 full-context accuracy with Wilson intervals, and AIME tokens per solved problem), made by `figures/make_fig_oct30.py`. `figures/fig_aime.png` (Oct 28 capped run) stays in the repo but is no longer shown. The Oct 28 tokens chart is labeled as such.- README: model size is a 1,049,615,680-byte file (1.05 GB), about 1.2 GB in memory. It said 1.2 GB file before.- README: the Oct 30 cloud runs did not use the network-denied sandbox. The job meta logged `net_probe: NET_OK`.- README: Qwen3.6-35B-A3B AIME26 92.7 is described as their reported number from their own setup, without the "no tools" label the card does not state.- README: links the Oct 30 blog post, https://www.destroyrebuild.xyz/blog/lfm3-python-tool-full-context.## 2026-10-30- README: lead with speed. At full context the tool gives about the same accuracy with 20 to 28% fewer tokens on AIME. It does not raise accuracy.
13 unmodified lines141516171819202122232425262728293031323320 unmodified lines5455565758596061626364656613 unmodified linesA sandboxed `run_python` tool and a small proxy that gives any local llama.cpp model that tool. I'm Austin. I built this to see whether a small local model does better on math when it can run code.The main reason to use it is speed. With `run_python`, LFM3-1.7B gets about the same math accuracy while generating 20 to 28% fewer tokens, so answers come back sooner. The model is a 1.2 GB file and runs at a median 153 tokens per second on a 2021 M1 Max MacBook Pro. The tool does not make the model more accurate when it has its full context. An earlier run with a 25,000-token cap showed accuracy gains, but those came from the cap, not the tool (details below).- Demo Space: https://huggingface.co/spaces/austindixson/python-sandbox-math-demo- Blog post: https://www.destroyrebuild.xyz/blog/lfm3-python-sandbox- Clover model: https://huggingface.co/austindixson/Clover-35B-A3B-Preview-GGUF-IQ4_XS-Mac- LFM3 model: https://huggingface.co/LiquidAI/LFM3-1.7B-GGUF## Full-context results (Oct 30, 2026)Model: full-precision (BF16) LFM3-1.7B. Run on a Hugging Face A100 with SGLang, the full 262k context, the model card's sampling (temperature 1.0, top_p 0.95, top_k 20), one sample per problem, scored with `math_verify`. Three setups: no tools, `run_python` with the base hint (`--no-verify`), and `run_python` with the verify instruction (`--verify`). No answer ran out of context and no request errored.| Set | No tools | Python | Python + verify ||---|---|---|---|| AIME 2025 (30) | 24/30 = 80.0% | 22/30 = 73.3% | 25/30 = 83.3% |20 unmodified linesFewer tokens means a shorter wait on any machine. On the A100 the measured time per solved AIME problem went from 287.1 s to 246.9 s with Python ((246.9 − 287.1) / 287.1 = −14.0%). On MATH-500 it went the other way, 74.9 s to 77.7 s (+3.7%), because short problems gain little from fewer tokens and still pay for the tool round trip. Those times come from a shared, batched cloud server, so read them as rough.For scale: Qwen3.6-35B-A3B's model card reports 92.7 on AIME 2026 with no tools. LFM3-1.7B scored 86.7 there with no tools, 6 points behind a model about 20 times larger. We did not run Qwen ourselves.Raw outputs, scorer and per-problem data: https://huggingface.co/austindixson/lfm3-smallbig-distill/tree/main/math_bf16_1030 (`score_report.md` has every table and test above).## Speed on a MacModel: LFM3-1.7B, QAD-Q4_0 GGUF (about 1.2 GB), llama.cpp `llama-server` build 11938, on Austin's MacBook Pro M1 Max with 64 GB. Generation speed over four 400-token trials was 137.6 to 157.2 tokens per second, median 153. Prompt processing was 687 to 729 tokens per second on a short prompt. Measured Oct 30, 2026.## Agent test on the same Mac (Oct 30, 2026, by Elon)13 unmodified lines141516171819202122232425262728293031323334353637383920 unmodified lines6061626364656667686970717213 unmodified linesA sandboxed `run_python` tool and a small proxy that gives any local llama.cpp model that tool. I'm Austin. I built this to see whether a small local model does better on math when it can run code.The main reason to use it is speed. With `run_python`, LFM3-1.7B gets about the same math accuracy while generating 20 to 28% fewer tokens, so answers come back sooner. The 4-bit model is a 1.05 GB file (about 1.2 GB in memory) and runs at a median 153 tokens per second on a 2021 M1 Max MacBook Pro. The tool does not make the model more accurate when it has its full context. An earlier run with a 25,000-token cap showed accuracy gains, but those came from the cap, not the tool (details below).- Demo Space: https://huggingface.co/spaces/austindixson/python-sandbox-math-demo- Blog post, Oct 30 full-context results: https://www.destroyrebuild.xyz/blog/lfm3-python-tool-full-context- Blog post, Oct 28 capped runs: https://www.destroyrebuild.xyz/blog/lfm3-python-sandbox- Clover model: https://huggingface.co/austindixson/Clover-35B-A3B-Preview-GGUF-IQ4_XS-Mac- LFM3 model: https://huggingface.co/LiquidAI/LFM3-1.7B-GGUFAbove: the Oct 30 full-context run. Accuracy is about the same in all three setups, and Python cuts tokens per solved AIME problem by 20 to 23%. The tokens chart below is from the Oct 28 capped runs.## Full-context results (Oct 30, 2026)Model: full-precision (BF16) LFM3-1.7B. Run on a Hugging Face A100 with SGLang, the full 262k context, the model card's sampling (temperature 1.0, top_p 0.95, top_k 20), one sample per problem, scored with `math_verify`. Three setups: no tools, `run_python` with the base hint (`--no-verify`), and `run_python` with the verify instruction (`--verify`). No answer ran out of context and no request errored.These cloud runs did not use this tool's network-denied sandbox. On Hugging Face the Python code ran in a fresh process as the `nobody` user, and the network probe logged in each job's meta file returned `NET_OK`, so the model's code had network access. We did not check whether any of it used the network. The sandbox described under "Isolation by OS" is what the proxy uses on your machine.| Set | No tools | Python | Python + verify ||---|---|---|---|| AIME 2025 (30) | 24/30 = 80.0% | 22/30 = 73.3% | 25/30 = 83.3% |20 unmodified linesFewer tokens means a shorter wait on any machine. On the A100 the measured time per solved AIME problem went from 287.1 s to 246.9 s with Python ((246.9 − 287.1) / 287.1 = −14.0%). On MATH-500 it went the other way, 74.9 s to 77.7 s (+3.7%), because short problems gain little from fewer tokens and still pay for the tool round trip. Those times come from a shared, batched cloud server, so read them as rough.For scale: Qwen3.6-35B-A3B's model card lists 92.7 on AIME 2026. That is their reported number from their own setup. LFM3-1.7B scored 86.7 there with no tools, 6 points lower, with about 1/20 of the total parameters. We did not run Qwen ourselves.Raw outputs, scorer and per-problem data: https://huggingface.co/austindixson/lfm3-smallbig-distill/tree/main/math_bf16_1030 (`score_report.md` has every table and test above).## Speed on a MacModel: LFM3-1.7B, QAD-Q4_0 GGUF (a 1,049,615,680-byte file, 1.05 GB, about 1.2 GB in memory), llama.cpp `llama-server` build 11938, on Austin's MacBook Pro M1 Max with 64 GB. Generation speed over four 400-token trials was 137.6 to 157.2 tokens per second, median 153. Prompt processing was 687 to 729 tokens per second on a short prompt. Measured Oct 30, 2026.## Agent test on the same Mac (Oct 30, 2026, by Elon)
1234567891011121314151617181920212223242526272829303132333435363738394041"""Oct 30, 2026 figure: BF16 LFM3-1.7B on HF A100 (SGLang, 262k ctx), from score_summary.json."""import json, sysimport matplotlibmatplotlib.use("Agg")import matplotlib.pyplot as plt
S = json.load(open(sys.argv[1] if len(sys.argv) > 1 else "score_summary.json"))["per_arm"]arms = [("none", "No tools"), ("python", "Python"), ("verify", "Python + verify")]cols = ["#8a8f98", "#2f6fdf", "#1b9e77"]fig, (a1, a2) = plt.subplots(1, 2, figsize=(9.5, 4.8), dpi=160)
sets = [("AIME 60", "AIME 2025+2026 (n=60)"), ("MATH-500", "MATH-500 (n=500)")]w = 0.26for i, (key, _) in enumerate(arms): for j, (s, _) in enumerate(sets): r = S[f"{key}|{s}"] lo, hi = r["wilson"] x = j + (i - 1) * w a1.bar(x, r["pct"], w, color=cols[i], label=arms[i][1] if j == 0 else None) a1.errorbar(x, r["pct"], yerr=[[r["pct"] - lo], [hi - r["pct"]]], fmt="none", ecolor="black", capsize=3, lw=1) a1.text(x, hi + 1, f'{r["correct"]}/{r["done"]}', ha="center", va="bottom", fontsize=7)a1.set_xticks(range(len(sets)), [lab for _, lab in sets], fontsize=8)a1.set_ylim(40, 112)a1.set_ylabel("Accuracy, % (Wilson 95% CI)")a1.set_title("Accuracy: no significant difference", fontsize=10)a1.legend(fontsize=7, loc="upper left", ncol=3, frameon=False)
for i, (key, lab) in enumerate(arms): v = S[f"{key}|AIME 60"]["tok_per_solved"] a2.bar(i, v, 0.6, color=cols[i]) base = S["none|AIME 60"]["tok_per_solved"] d = "" if key == "none" else f" ({(v - base) / base * 100:+.0f}%)" a2.text(i, v + 300, f"{v:,}{d}", ha="center", va="bottom", fontsize=8)a2.set_xticks(range(3), [l for _, l in arms], fontsize=8)a2.set_ylabel("Tokens per solved AIME problem")a2.set_ylim(0, 26000)a2.set_title("Length: Python cuts tokens 20 to 23%", fontsize=10)
fig.suptitle("LFM3-1.7B (BF16), HF A100, SGLang, 262k context, 1 sample, model-card sampling. Oct 30, 2026", fontsize=8.5)fig.tight_layout(rect=(0, 0, 1, 0.95))fig.savefig("fig_oct30.png")CHANGELOG.md+8
README.md+12-6
figures/fig_oct30.pngAdded

figures/make_fig_oct30.pyAdded+41