Repository navigation
Compact prompt tier by default for <=9B local models (+37pp resolve rate) - #306
Merged
Merged
Conversation
dahai80
added a commit
that referenced
this pull request
Nov 21, 2026
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]>
dahai80
added a commit
that referenced
this pull request
Nov 21, 2026
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]>
Co-Authored-By: Claude Code <[email protected]>
Env-gated escape hatch forcing a prompt tier regardless of the automatic param-count/context mapping (mini|compact|standard|extended|full). Motivation: bench report #2 cross-harness baseline — the same Qwen3-8B checkpoint resolves 10/20 suite tasks under goose's ~2K-token prompt vs 3/20 under this builder's standard tier (~8.1K tokens measured with empty memory/context; compact measures ~1.9K). Ships as an override first; A/B suite numbers decide whether the automatic mapping for <=9B models should move to compact. 3 unit tests: forced compact on 8B, forced full on 0.5B, invalid value falls back to automatic. Co-Authored-By: Claude Code <[email protected]>
A/B on the harness-gain suite (Qwen3-8B, fusion-mlx 0.10.68, same engine, fixed harness): standard tier (~8.1K-token system prompt) resolved 3/20; compact tier (~1.9K tokens) resolved 10/20 with mean wall down 130s -> 74s — matching goose's small-prompt harness (10/20) on the identical checkpoint. Literature agrees long/verbose context degrades small models non-linearly (Context Rot, Lost in the Middle, NoLiMa, RULER). getPromptTier: paramCount<=9 now returns compact; 'standard' stays reachable via FUSION_CODE_MLX_PROMPT_TIER for A/B comparison. Tests updated for the new mapping + override paths. Note: bun test full run shows 1 pre-existing failure (compact/contextWindowWarning.test.ts) present on a clean tree; passes in isolation. Co-Authored-By: Claude Code <[email protected]>
Co-Authored-By: Claude Code <[email protected]>
dahai80
force-pushed
the
feat/mlx-prompt-tier-override
branch
from
November 21, 2026 11:59
a8fe68d to
4685f35
Compare
Merged
Owner
Author
|
Reproduction run (same arm, same env): 10/20 again (mean wall 79.4s, 0 timeouts, results dir 🤖 Generated with Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Result (harness-gain suite, 20 tasks, Qwen3-8B on fusion-mlx 0.10.68)
Same checkpoint, same engine, same fixed harness. The compact arm ties
goose's small-prompt harness (10/20) measured the same day — prompt
size, not model quality or edit-tool shape, was the dominant gap.
Stacked on #304 (bench fixes + recovery loop used for measurement).
Changes
getPromptTier:paramCount <= 9now returnscompact(wasstandard). Comment carries the A/B numbers and literature pointers(Chroma Context Rot; Lost in the Middle arXiv:2307.03172; NoLiMa
arXiv:2502.05171; RULER arXiv:2404.06654).
FUSION_CODE_MLX_PROMPT_TIERenv override (previous commit on thisbranch) forces any tier for A/B comparison; invalid values fall back
to the automatic mapping.
standardtier now driven via theoverride in tests.
Verification
mlxSystemPrompt.test.ts; typecheck clean; binary builds.bun testshows 1 failure(
compact/contextWindowWarning.test.ts) that also fails on a cleantree (pre-existing, passes in isolation).
Caveat
Single 20-task run per arm. The env override keeps the old tier
one flag away for reproduction.
🤖 Generated with Claude Code