Skip to content

docs: small-model tool-calling survey + bench report #2 (cross-harness baseline) - #305

Merged
dahai80 merged 13 commits into
mainfrom
docs/small-model-tool-calling-research
Nov 21, 2026
Merged

dahai80 merged 13 commits into
mainfrom
docs/small-model-tool-calling-research

Conversation

@dahai80

@dahai80 dahai80 commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Contents

  1. docs/research/small-model-tool-calling-2026-11.md — survey of the
    tool-call-as-text failure mode on local MLX small models: root cause
    experiments, constrained decoding / ACI / BFCL / training-flywheel
    landscape, 7 ranked options for fusion-code (recovery loop and
    edit-format escalation shipped; grammar-forced tool_choice and MFC
    trainer flywheel filed as asks; successful-repeat loop detection new).

  2. docs/research/bench-reports/2026-11-20-r2.md — bench report feat: externalize artifact engine URL to shared config #2,
    now with the full cross-harness baseline (fixed harness, Qwen3-8B on
    fusion-mlx 0.10.68):

    Harness Resolved Mean wall 600s deaths
    fusion-code 3/20 ~130s 0
    opencode 2/20 — 11
    goose 10/20 37s 0

    Headline: identical checkpoint, 5x resolve-rate gap by harness. ACI
    (edit tool shape, prompt size, turn bounds) is the top lever for
    small local models. Three verifier-design lessons recorded
    (fail-on-untouched, terminate, pass-on-correct).

Bench fixes referenced here landed on fix/tool-call-text-recovery (#304).

🤖 Generated with Claude Code

dahai80 and others added 13 commits November 21, 2026 19:57
Survey grounded in this week's bench evidence: constrained decoding
(XGrammar + MLX ports), SWE-agent ACI interface principles, BFCL
measurement methodology, and training-side fixes (ToolACE, Hammer
MFC, APISen, TinyAgent). Ranks five options for fusion-code, from
per-turn emission telemetry in the bench runner to flywheel
fine-tuning asks. Also carries the report #2 skeleton (results
pending the first clean suite run).

Co-Authored-By: Claude Code <[email protected]>
E2E finding: recovery loop verified live — Read-shaped text recovers,
Edit-shaped text does not (8B re-emits identical Edit text through all
corrections). Matches aider editing-format literature (weak models do
better whole-file than search/replace). Adds ranked option 6: second
correction suggests whole-file Write.

Co-Authored-By: Claude Code <[email protected]>
…op E2E

Records the two runner changes since the provisional baseline
(-p permission bypass; recovery loop with whole-file Write escalation)
and why pre-fix wall numbers are provisional only.

Co-Authored-By: Claude Code <[email protected]>
Valid run 2026-11-21T02-52-26Z (fixed harness: #297 verifier fix,
permission bypass, tool-call-as-text recovery loop): 3/20 (15%), all
easy tasks, no timeouts, textEmissions 0. Conclusions: harness fixes
worth 0->3; 8B ceiling is the easy/medium boundary; opencode/goose
pending for cross-harness comparison.

Co-Authored-By: Claude Code <[email protected]>
opencode 1/13 so far, 10x600s timeouts — unbounded loop vs fusion-code
bounded walls. Second verifier-design lesson: verifier must terminate
(not just fail) on untouched fixture; runner now bounds verify at 60s.

Co-Authored-By: Claude Code <[email protected]>
opencode cross-harness run: 10/13 tasks died repeating successful
0-match tool calls to the 600s cap. fusion-code's error-only loop guard
is blind to successful no-progress calls. Option 7: hash consecutive
successful (tool, input) pairs, correct first, cap, then abort.

Co-Authored-By: Claude Code <[email protected]>
opencode 2/20 after retracting the T08 false positive (verifier passed
on untouched fixture). New rule: verifiers must fail on untouched,
terminate, and pass on a correct hand-made solution.

Co-Authored-By: Claude Code <[email protected]>
Cross-harness final: fusion-code 3/20, opencode 2/20, goose 10/20 —
same Qwen3-8B, same engine. Harness interface (edit tool shape, prompt
size, turn bounds) worth more than model quality for small local
models. ACI simplification now top-ranked lever for fusion-code.

Co-Authored-By: Claude Code <[email protected]>
…sists

3 reps: model switches Edit-shaped to Write-shaped output on the second
correction, but still emits it as plain text; corrections do not restore
tool_use once text-emission starts. Upgrades engine grammar-forcing
(option 4) to the only reliable fix; adds prompt-size diet as parallel
lever (goose 10/20 with a fraction of the system prompt).

Co-Authored-By: Claude Code <[email protected]>
Context Rot (Chroma), Lost in the Middle, NoLiMa, RULER — long/verbose
context degrades accuracy non-linearly, small models hardest. Supports
the tier-override + prompt-diet lever with independent evidence.

Co-Authored-By: Claude Code <[email protected]>
fusion-code compact tier ties goose (10/20, mean wall 74s vs 130s).
Prompt size alone closed the gap; default flipped for <=9B (PR #306).

Co-Authored-By: Claude Code <[email protected]>
- bench-reports/2026-11-20-r2.md: doc_type report -> guide, add source_of_truth
- small-model-tool-calling-2026-11.md: doc_type research -> guide, add source_of_truth, drop marketing word 'robust'

Co-Authored-By: Claude Code <[email protected]>
@dahai80
dahai80 force-pushed the docs/small-model-tool-calling-research branch from cbc4e3e to 013fac4 Compare November 21, 2026 11:57
@dahai80
dahai80 merged commit dcea050 into main Nov 21, 2026
1 check passed
@dahai80 dahai80 mentioned this pull request Nov 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant