Research log Small Model Experimentation
GitHub

Qwen Crystallized Trace ABI Tournament

Showing the work barely helps, costs far more

The one idea you need

Imagine training a clerk to run fixed procedures like currency conversions, date math, and table lookups. You can teach using only the final number, or using a full written worksheet showing every step. This tests whether the worksheet version actually produces more correct answers.

The question

When you teach a small model to run step-by-step procedures, does making it write out every step give more correct answers than just teaching the final answer?

What we found

Barely. On familiar inputs, writing out each step scored 94% versus 92% for answer-only, a two-point edge that cost three to six times more generated text. On genuinely new combinations of steps the model had never seen, every format collapsed to roughly 30 to 40%, so the extra detail bought almost nothing where it mattered most. Answer-only was actually best on reworded prompts.

Why it matters

For deterministic, familiar tasks, answer-only supervision is cheaper and nearly as accurate. Verbose step-by-step traces do not buy real generalization to new step combinations, so reserve them for cases you have actually measured.

Steps vs just the answer, familiar problems94% vs 92%best step-writing style versus answer-only on fresh values of trained tasks
Text needed to produce an answerabout 10 words vs 29 to 64answer-only versus the step-writing styles
Best score on brand-new step combinations40%, down from 94%every style collapsed here
Same model with no training0%untrained 4-billion-parameter model across every test
On this page
  1. Results at a glance
  2. Overview
  3. Report
    1. Abstract
    2. Method
    3. Run Configuration
    4. Primary Results
    5. Interpretation
    6. Limitations
    7. Artifacts
  4. Experiment log
  5. Figures
  6. Data files
  7. Reproduce
  8. Related

Results at a glance 5

Accuracy of each output style across three kinds of test problems

How to read

Bars show percent correct (taller is better) for five output styles: answer-only, two simple step-by-step styles, a verbose structured-object style, and the untrained model. They are grouped by test type: familiar problems, reworded prompts, and brand-new step combinations.

0%25%50%75%100%fresh values (in-dist)fresh values (in-dist)template shifttemplate shiftunseen compositionunseen composition

Takeaway → On familiar and reworded problems the three simple trained styles cluster high near 85 to 94%, but all crash to roughly a third correct on brand-new step combinations; the verbose structured style trails even on familiar problems.

Data table
Evaluation splitpython tracestack traceanswer-onlyJSON tracezero-shot (untrained)
fresh values (in-dist)93.8%93.8%91.7%25%0%
template shift83.3%87.5%89.6%39.6%0%
unseen composition39.6%29.2%33.3%12.5%0%

Numbers from analysis/summary_by_arm.csv (main suite)

Technical framing

Accuracy by output format across evaluation splits — Python and stack traces edge out answer-only on fresh values, but every format collapses on unseen operation compositions.

How much text each output style writes to answer

How to read

Bars show the average amount of text the model writes to produce an answer on familiar problems (shorter is cheaper), one per output style. Answer-only sits far left near ten words, the verbose structured style far right near sixty-four.

020406080answer-onlyanswer-only9.73stack tracestack trace29.1python tracepython trace37.2JSON traceJSON trace63.6

Takeaway → The step-writing styles use three to six times more text than answer-only, a large cost for at most a two-point accuracy gain.

Data table
Output formatmean generated tokens
answer-only9.73
stack trace29.1
python trace37.2
JSON trace63.6

Numbers from analysis/summary_by_arm.csv (main suite, eval_indist tokens_mean)

Technical framing

Token cost of each output format (fresh-value eval) — Traces cost 3-6.5x more tokens than answer-only for at most a ~2pp accuracy gain on fresh values.

How often each style produces a usable answer

How to read

Bars show the share of responses that yield a readable final value (taller is better) for each style across the three test types, contrasting the simple line-based styles with the verbose structured-object style.

0%25%50%75%100%fresh values (in-dist)fresh values (in-dist)template shifttemplate shiftunseen compositionunseen composition

Takeaway → The three simple styles always produce a usable answer, while the verbose structured style fails to give one about a quarter of the time.

Data table
Evaluation splitanswer-onlypython tracestack traceJSON trace
fresh values (in-dist)100%100%100%75%
template shift100%100%100%72.9%
unseen composition100%100%100%68.8%

Numbers from analysis/summary_by_arm.csv (main suite, valid_mean)

Technical framing

Format validity: JSON is harder to emit reliably — Line-oriented formats always parse; the verbose JSON object fails to yield a valid FINAL value roughly a quarter of the time.

Which task types break on brand-new step combinations

How to read

Bars show percent correct (taller is better) for the best step-writing style on brand-new step combinations, broken out by task type: text cleanup, unit conversion, table lookup, and date math.

0%25%50%75%100%string normalizationstring normalization0%unit conversionunit conversion100%table calculationtable calculation58.3%date arithmeticdate arithmetic0%

Takeaway → Unit conversion stays fully correct while text cleanup and date math drop to zero, showing failures cluster where a genuinely new combination of steps is required.

Data table
Task familypython trace
string normalization0%
unit conversion100%
table calculation58.3%
date arithmetic0%

Numbers from analysis/summary_by_arm.csv (main, python, eval_composition family columns)

Technical framing

Where composition fails: python trace accuracy by task family (unseen compositions) — Composition failures concentrate in string and date tasks that need new operation combinations; direct unit conversion stays easy.

Reworded-problem accuracy by task type and output style

How to read

Bars show percent correct (taller is better) on reworded prompts, grouped by task type, with one bar per output style: answer-only, two simple step styles, and the verbose structured-object style.

0%25%50%75%100%String normalizeString normalizeUnit convertUnit convertLookup tableLookup tableDate arithmeticDate arithmetic

Takeaway → Line-based styles stay above 83% on most task families (dipping as low as 67% on text cleanup), while the verbose structured style drops to zero on table lookup and date math, failing whole categories.

Data table
Task familyAnswer onlyPython traceStack traceJSON trace
String normalize83.3%75%66.7%58.3%
Unit convert100%75%100%100%
Lookup table83.3%100%91.7%0%
Date arithmetic91.7%83.3%91.7%0%

Numbers from experiments/qwen_crystallized_trace_abi_tournament/analysis/summary_by_arm.csv

Technical framing

Template-shift accuracy by task family: JSON fails whole families — JSON's template-shift weakness is not uniform: it scores 0% on table and date tasks while other formats stay above 83% on most families.

In the author’s words from the Report · “Abstract”

This experiment tests whether a local 4B language model learns practical deterministic procedures better when supervised with compact executable traces instead of final answers alone. The same generated tasks are rendered through four output ABIs: final-answer text, Python-like trace, JSON IR, and stack-style IR. Each trained arm uses the same QLoRA budget and is evaluated on fresh values, unseen operation compositions, and template-shifted prompts.

Overview

This standalone experiment tests whether dense executable traces help a local 4B model learn compact crystallized procedures better than answer-only supervision, and whether the output representation itself is a load-bearing choice.

The experiment generates deterministic tasks from several practical families, trains small QLoRA adapters for multiple output ABIs, evaluates held-out examples, and writes Markdown and HTML reports with charts.

Large adapter checkpoints are stored outside this directory under:

/workspace/large_artifacts/qwen_crystallized_trace_abi_tournament

Report

Rendered from reports/qwen_crystallized_trace_abi_tournament_report.md

Abstract

This experiment tests whether a local 4B language model learns practical deterministic procedures better when supervised with compact executable traces instead of final answers alone. The same generated tasks are rendered through four output ABIs: final-answer text, Python-like trace, JSON IR, and stack-style IR. Each trained arm uses the same QLoRA budget and is evaluated on fresh values, unseen operation compositions, and template-shifted prompts.

Method

The task factory creates examples from four families: string normalization, unit conversion, lookup-table calculation, and date arithmetic. Every example has a deterministic answer and a gold procedural rendering for each ABI. Evaluation uses greedy generation and exact matching of the parsed FINAL value.

Run Configuration

  • Primary suite: main.
  • Adapter seeds: 101,202.
  • QLoRA update steps per adapter: 48.
  • Total trained-arm evaluation examples: eval_composition=192, eval_indist=192, eval_template_shift=192.
  • Output ABIs: answer, python, json, and stack.

Primary Results

  • Best fresh-value arm: python at 93.8%.
  • Best unseen-composition arm: python at 39.6%.
  • Best template-shift arm: answer at 89.6%.
  • Primary suite summarized below: main.
suitearmsplitrunsn_totalaccuracy_meanaccuracy_stdvalid_meantokens_mean
mainpythoneval_composition24839.6%2.9%100.0%44.60
mainanswereval_composition24833.3%0.0%100.0%9.60
mainstackeval_composition24829.2%11.8%100.0%31.94
mainjsoneval_composition24812.5%5.9%68.8%63.88
mainzero_shot_answereval_composition1240.0%0.0%20.8%32.00
mainpythoneval_indist24893.8%2.9%100.0%37.25
mainstackeval_indist24893.8%2.9%100.0%29.08
mainanswereval_indist24891.7%5.9%100.0%9.73
mainjsoneval_indist24825.0%0.0%75.0%63.56
mainzero_shot_answereval_indist1240.0%0.0%4.2%32.00
mainanswereval_template_shift24889.6%14.7%100.0%9.42
mainstackeval_template_shift24887.5%5.9%100.0%28.71
mainpythoneval_template_shift24883.3%11.8%100.0%37.35
mainjsoneval_template_shift24839.6%2.9%72.9%62.83
mainzero_shot_answereval_template_shift1240.0%0.0%4.2%32.00

Accuracy by ABI and split

Format validity and generation length

Family breakdown

Training curves

Interpretation

The composition gap for the best fresh-value arm is 54.2 percentage points. A small or negative gap would indicate that the learned representation transfers across operation combinations; a large positive gap indicates that the model mainly learned the easier in-distribution mapping. On fresh values, the best trace ABI scored 93.8% and answer-only scored 91.7%. The shortest strong trace ABI used 29.1 generated tokens on average, while answer-only used 9.7. This is a weak trace advantage in accuracy and a large trace cost in tokens. For the best unseen-composition arm, family accuracy was: string 0.0%, unit 100.0%, table 58.3%, date 0.0%. The composition failures are concentrated in families that require a new operation combination, while direct unit conversion remains easy. The JSON ABI had an average valid-final rate of 72.2% across primary splits, showing that a verbose structured object can be harder to emit reliably than line-oriented formats.

Limitations

This is a compact experiment. It is designed to reveal representation sensitivity and supervision effects, not to maximize absolute performance. The generated tasks are deterministic and intentionally narrow enough to allow controlled held-out splits. Larger task coverage and longer training would be needed before treating any ABI as a production recipe.

Artifacts

  • Metrics: analysis/summary_by_arm.csv and analysis/all_metrics.csv
  • Details: analysis/all_details.csv
  • Training logs: analysis/all_train_logs.csv
  • Checkpoints: /workspace/large_artifacts/qwen_crystallized_trace_abi_tournament/checkpoints

Experiment log 4

Show the running log (4 entries)

Setup

Run smoke_v1

  • Started: 2026-06-26 04:20:46 UTC
  • Suite: smoke
  • Model: Qwen/Qwen3-4B
  • Seeds: 101
  • Arms: answer,python
  • Train examples per seed: 24
  • Eval examples per split: 8
  • Steps: 2

Completed smoke_v1 in 146.4s.

  • Metric rows: 9
  • Detail rows: 72
  • Training log rows: 4

Run pilot_v1

  • Started: 2026-06-26 04:24:02 UTC
  • Suite: pilot
  • Model: Qwen/Qwen3-4B
  • Seeds: 101
  • Arms: answer,python,json,stack
  • Train examples per seed: 96
  • Eval examples per split: 16
  • Steps: 24

Completed pilot_v1 in 367.7s.

  • Metric rows: 15
  • Detail rows: 240
  • Training log rows: 28

Run main_v1

  • Started: 2026-06-26 04:30:45 UTC
  • Suite: main
  • Model: Qwen/Qwen3-4B
  • Seeds: 101,202
  • Arms: answer,python,json,stack
  • Train examples per seed: 192
  • Eval examples per split: 24
  • Steps: 48

Completed main_v1 in 1324.1s.

  • Metric rows: 27
  • Detail rows: 648
  • Training log rows: 56

Figures 4

accuracy by abi split
accuracy by abi split · analysis/figures/
family breakdown
family breakdown · analysis/figures/
training curves
training curves · analysis/figures/
validity and tokens
validity and tokens · analysis/figures/

Data files 22

Result tables and metrics copied from the experiment folder — preview inline or open the raw file.

Reproduce

This entry is source code or analysis only — there is no separate run to reproduce.

Browse the experiment folder on GitHub ↗