DFilterForge Retrospective 04: A small model that errs more quietly
After QLoRA fine-tuning Qwen3-1.7B, its strong exact on test condition C4 rises from 0.063 to 0.396 (mean over three seeds). But of the 49 answers that previously failed to compile or had the wrong format, 32 to 35 become executable, and about half of those are silent-wrong: they run but pick the wrong packets. This post covers what happened along the way: how the training data was built and kept separate from the test split; how TRL's defaults nearly emptied the data; how the training targets themselves teach the model to violate the prompt's rules; when the checkpoint and the reading rules were fixed; how far you can get without training; a key-sorting accident that made 80 answers identical; and how the cost is accounted for.
- Published
- Reading time
- 15 min read
- Category
- Retrospectives
- Tags
- Translated from
- the Chinese original
Contents11 sections
This is the fourth post in the DFilterForge retrospective (series overview). The first three covered the verifier, the repair rounds, and the measurement itself. This one is about training: using the same verifier to score a small 1.7B model, to see how far fine-tuning can push it.
The training setup:
- Model: Qwen/Qwen3-1.7B, with thinking disabled.
- Method: QLoRA supervised fine-tuning (SFT), one adapter per seed, for seeds 17, 42, and 2026.
- Training: on a Modal L4, 246 steps per seed, about 50 minutes each. The base model is nf4-quantized during training; at inference the adapter is attached to the bf16 base model.
- Inference and scoring: with vLLM 0.21.0, served on the same GPU type, scored with the same scorer as the hosted models, on the frozen test prompts.
Results on test condition C4:
| strong exact [95% interval] | minus base model (paired by case) | better / worse cases | |
|---|---|---|---|
| Base model | 0.063 [0.025, 0.113] | ||
| SFT, mean of the seeds | 0.396 [0.296, 0.492] | +0.333 [0.233, 0.433] | 29 / 1 |
| Seed 17 | 0.338 | ||
| Seed 42 | 0.375 | ||
| Seed 2026 | 0.475 |
By the registered rule, this is a gain: the interval excludes 0, with 30 discordant cases. The interval for the mean only accounts for the sampling of cases; the three adapters are treated as fixed. For differences between seeds, see the row for each seed.
But behind that number, the model has also learned to fail more quietly. Answers that previously failed to compile or had the wrong format often became silent-wrong: they run, but pick the wrong packets.
All numbers in this post come from committed records in the repository1.
![Screenshot of the top of DFilterForge's Training page. The section label is POST-TRAINING, FROZEN TEST SPLIT, and the headline is 'Supervised fine-tuning lifts Qwen/Qwen3-1.7B from 0.063 to 0.396'. Below it a note: on the 40 ready cases of the frozen test split, answering under condition C4, the mean of three fine-tuning seeds; paired by case, the difference from the base model is 0.333 [0.233, 0.433], 29 cases better and 1 worse, marked GAIN; by the registered rule, the interval excludes 0, with 30 discordant cases. Further down is Every row on one scale: five rows, each with an interval line, drawn on the same scale. Base model (Qwen/Qwen3-1.7B, thinking off) 0.063 [0.025, 0.113]; SFT seed 17 is 0.338 [0.238, 0.450], 0.275 [0.175, 0.375] above the base model, 19 cases better and 1 worse; SFT seed 42 is 0.375 [0.263, 0.500], 0.313 [0.200, 0.438] above, 21 better and 1 worse; SFT seed 2026 is 0.475 [0.338, 0.600], 0.413 [0.288, 0.538] above, 24 better and 1 worse; SFT, mean of the seeds is 0.396 [0.296, 0.492], 0.333 [0.233, 0.433] above, 29 better and 1 worse. Each seed and the mean are marked GAIN. The ends of the scale read no case exact and every case exact.](/_astro/training.CUU3ArQ1_1y5Dxm.webp)
Training data: seen parts, unseen combinations
The training data was built from scratch (train_atoms.py, the Training rules section of protocol.md):
- Parts: only the 38 predicates that appear in the reference answers of the dev and test splits. Each training example takes 1 to 3 of them, nested at most two levels deep.
- Request text: assembled from 8 fixed sentence patterns, fixed connectives, and two hand-written wordings per predicate; each combination generates exactly one request.
- Training target and frames: the training target for each combination is its own typed intent, wrapped in the answer format. A pinned tshark runs it on three training-only probes (seeds 7001 to 7003); the frames it selects are used to check and filter candidates, and do not enter the loss. Correctness is judged by tshark itself; no separate semantics are written.
There were 2,400 candidates in total (sampling seed 1). The discard rules are checked in the order of the table below; each candidate records only the first rule it hits (train_data.py, manifest.json):
| Discard reason (in check order) | Count |
|---|---|
| Does not compile | 0 |
| Canonical form identical to a dev or test item | 59 |
| Canonical form identical to an earlier candidate | 365 |
| Hits a shortcut rule | 0 |
| Request text shares an 8-word contiguous span with a dev or test item | 3 |
| Selects no frames, or all frames, on the three training probes | 533 |
| Frames selected on the training probes identical to a dev or test item | 141 |
The last two rules require running tshark, so they are only counted among candidates that passed the earlier rules.
That left 1,299 rows: 1,088 answerable directly, and 211 that require the model to ask for clarification.
A training set built this way tests “unseen compositions of seen atoms” — not unseen fields, operators, or values. The protocol has said so throughout, and the results page says it too.
Two pitfalls here:
- The clarification templates leaked wording. A review found that 84 of the 211 clarification rows used phrasing from the non-ready requests in the dev and test splits, such as “the record type we talked about”, and the only thing guarding them was the 8-word overlap check. The commit message’s wording: without a fix, part of the improvement on non-ready test items would measure memory of the templates. After rewriting, no template shares three consecutive ordinary words with any non-ready request in the dev or test splits; a test forbids sharing a 4-word span with those requests (spans made only of numbers and protocol names excepted). The request text changed for 166 rows; all counts stayed the same (
04a4130). - The protocol described a rewriter that was never built. The training rules originally said the training requests were “paraphrased by a hosted model”. That was the plan; what was actually used was hand-written wording. Corrected on October 18; the original sentence stays in place, with a new paragraph after it stating what actually happened (
4f655fc).
TRL’s defaults
Training used TRL’s SFTTrainer. While writing the training script I found that TRL by default truncates sequences to 1024 tokens, and rows with no labels left after truncation are silently dropped (05d5713).
Every row’s completion is at the end, and the prompt itself is long: the server-side C4 prompt is 1,154 to 1,548 tokens, all over 1,024. By that estimate, truncation would cut off the entire completion of almost every row, and those rows would all be dropped.
The fixes:
- Don’t let TRL render the conversation; the script tokenizes the prompt the same way the server renders it;
- Turn off the length limit, and compute the loss only on the completion tokens;
- Before training starts, check that every row is fully preserved and labels are only on the completion; otherwise stop;
- An alignment test that re-renders all 1,299 rows with a fixed conversation template, the server’s way, and compares row by row.
That said, there is no CI test that compares token by token against what vLLM actually renders; the protocol lists this under limitations.
The training targets teach the model to break the rules
The C4 prompt says to use only the 16 listed fields. But in 540 of the 1,088 ready rows, the training target uses a field that is not in that row’s retrieval list (46a1adc). In other words, SFT is teaching the model: a field you’ve seen before is fine to use even when the list doesn’t have it.
The training data was not changed, but two things were done before any training run:
- The count was recorded in the SFT data manifest (
sft-manifest.json); - It was registered in advance that the C4 scores of both the base model and the adapters would be reported split by whether all reference fields were retrieved.
The result:
| All reference fields retrieved (28 items) | Some reference field not retrieved (52 items) | |
|---|---|---|
| Base model | 0.143 | 0.019 |
| SFT mean | 0.464 | 0.359 |
In the “some reference field not retrieved” layer, among answers that have a typed intent, the adapters used out-of-list fields in 0.91 to 0.96 of cases; the base model did so in 0.275. In this layer, answering correctly requires using out-of-list fields in the first place: among the answers that used out-of-list fields, the three seeds had 14, 18, and 22 strong exact respectively, while the base model had 1.
So is it memorizing training answers? The protocol defines a “copy share”: the answer’s canonical form is exactly identical to one of the 1,088 training targets. The base model never saw the training set; its copy share in this layer is 0.025 (1 of 40), which serves as the reference value for “what you hit without training”. The three seeds are at 0.02 to 0.04, 1 to 2 each, about the same as the reference, and none of the copies is strong exact. In the other layer, the copy count is 0 for all rows.
When the rules were fixed
- Checkpoint. Each seed takes only the adapter from its final step; this was decided before training. The protocol’s original sentence, “Checkpoints are chosen on dev”, was replaced by this rule. All three seeds are reported.
- Estimators. Each seed and the base model are subtracted paired by case; the mean of the three seeds is taken inside each resample; a gain requires the interval to exclude 0 and at least 10 discordant cases. These rules were registered on October 18, before seeds 17 and 42 were scored.
- Scores already known at registration. At registration time, the test scores of the base model and seed 2026 were already known (base model 0.0625, printed in the protocol as 0.062; seed 2026 0.475), and the protocol says so explicitly. The reason: on the evening of October 8, Modal preemption interrupted the test runs of seeds 17 and 42, and seed 2026 finished first. The preemption story is in the next post.
- Outcome. Seed 2026 ended up the best of the three.
- Scoring script. The script that computes the headline numbers was also committed before seeds 17 and 42 were scored; CI rebuilds it every time and compares results.
- Post hoc analyses. The error classification below was defined only after seed 2026’s test scores were known. The protocol states that they only describe and decide nothing: no changes to training data, no changes to prompts, and no wrong test answers fed back as training data.
Failing more quietly
On the 80 ready items of test condition C4, the base model had 49 “loud” failures: 28 invalid (does not compile or does not run) and 21 malformed (wrong format). After fine-tuning (analysis.json):
- Of those 49, 32 to 35 per seed became executable: 14 to 18 of them strong exact, 17 to 18 silent-wrong;
- Of the base model’s original 26 silent-wrong, each seed fixed 10 to 17;
- Each seed also turned 2 of the base model’s originally correct answers into silent-wrong.
From another angle, the share of silent-wrong among executable answers did fall: base model 26/31, the three seeds 32/59, 32/62, 25/63. But the absolute number of silent-wrong did not fall with it: base model 26, the three seeds 32, 32, 25 — two seeds actually gained 6, and seed 2026 is down only 1.
By the post hoc error classification, the way of being wrong also shifted:
- The base model’s silent-wrong most often missed a field that the reference answer tests: 16 of 26;
- The fine-tuned seeds most often tested an extra field the reference answer does not test: 10 to 17 of 25 to 32.
Strong exact alone does not show this layer. Some of the errors that used to be rejected before any packet was read (unparseable replies, filters that don’t compile or don’t run) became errors that only a particular frame on the probe can catch.
How far can you get without training
Before fine-tuning, one should at least ask: have the cheaper options been tried? The project added two steps on the base model, both designed only after all test scores of the base and fine-tuned models were known. The constrained decoding row was even designed after reading the base model’s malformed answers on the test split, and the protocol states that this violates the October 18 rule that “descriptive analyses do not change later designs”. So wherever these two rows appear they are marked as post hoc, and they change no registered row, headline number, or training choice (ladder.json):
- Constrained decoding: constrain decoding to the answer’s JSON schema;
- Few-shot: additionally put 8 training examples in each prompt.
![Screenshot of the Cheaper fixes first section of DFilterForge's Training page, with a POST HOC label next to the heading. The note: strong exact on the 40 ready test cases under condition C4 — base model 0.063, constrained to the answer's schema 0.088, plus 8 training examples 0.100, fine-tuned (neither of the two) 0.396; by the registered rule, the schema step reads INCONCLUSIVE, the examples step INCONCLUSIVE, and fine-tuning against the two combined is a GAIN. On the left is a vertical ladder: Base model 0.063 [0.025, 0.113], then a step of 0.025, INCONCLUSIVE; Base + schema 0.088 [0.025, 0.163], then a step of 0.013, INCONCLUSIVE; Base + schema + 8 examples 0.100 [0.038, 0.163], then a step of 0.296, GAIN; Fine-tuned, seed mean 0.396 [0.296, 0.492]. Below are three questions, each with an interval line, on a scale from every case worse through no change to every case better: does constraining to the schema help, 0.025 [0.000, 0.063], INCONCLUSIVE, 2 cases better and 0 worse; does adding 8 training examples on top help, 0.013 [-0.088, 0.100], INCONCLUSIVE, 7 better and 5 worse; does fine-tuning beat the two combined, 0.296 [0.196, 0.404], GAIN, 26 better and 2 worse.](/_astro/ladder.CcrjA2SG_Z1nED12.webp)
| Comparison | Difference [95% interval] | Better / worse cases | Reading |
|---|---|---|---|
| Constrained decoding − base model | 0.025 [0.000, 0.063] | 2 / 0 | Inconclusive |
| Few-shot − constrained decoding | 0.013 [−0.088, 0.100] | 7 / 5 | Inconclusive |
| SFT mean − few-shot | 0.296 [0.196, 0.404] | 26 / 2 | Gain |
Neither step moved the score much, but where the errors went changed:
- Constrained decoding. Of the base model’s 21 malformed, 17 were actually valid JSON that violated the typed intent’s rules (for example
alloranywith only one child, orexistswith a value); the other 4 were cut off at the 2048-token limit. After constraining to the schema, only 8 malformed remain, all truncations; invalid goes from 28 to 34, silent-wrong from 26 to 30. The schema constrains structure, not field names; a wrong field name is still invalid. - Few-shot. On top of constrained decoding, invalid drops from 34 to 5, but silent-wrong rises from 30 to 62, and strong exact only goes from 7 to 8.
Few-shot also involved a design decision: it was made a “non-default variant” rather than a new prompt version. Otherwise, every future prompt preparation would carry these 8 examples by default (bf41191).
Against the hosted models, SFT mean minus qwen3.5-9b is −0.042 [−0.188, 0.088], minus qwen3-32b is −0.104 [−0.254, 0.046]; they are not separable on these 40 cases. Against qwen3.5-122b-a10b and deepseek-v4-pro-0813, it is clearly lower.
80 identical answers
The constrained decoding and few-shot rows first ran on the dev split on October 28. The result: 80 answers across the two runs, all the same 23-token object:
{"schema_version": "1.0", "status": "not_expressible"}The constrained decoding row’s prompt is byte-identical to the base model’s, and the base model’s 40 answers contain not a single abstention. Yet no step in the pipeline reported an error (c3374bf).
The cause was in the serialization of the request body (548084b):
- The client passed every request body through
canonical_json, which sorts object keys; - So the answer’s JSON schema reached vLLM with properties in alphabetical order;
- vLLM’s default grammar engine, xgrammar, generates properties in the order declared in the schema;
- The model, following the prompt, writes
schema_versionandstatusfirst; under the alphabetically sorted schema, after that opening there is only one way to continue:not_expressible.
Why didn’t the unit tests catch it? One checks the schema with a schema validator, the other compares request bodies with dict equality; the commit message’s wording is “neither sees order”.
Verified offline with xgrammar 0.2.8 (the xgrammar version in the serving image was not recorded): the alphabetically sorted schema accepts 0 of the base model’s 40 dev answers; in declaration order, it accepts 22.
Worse, the dev-split check that ran first only looked at three things: whether all items were settled, the reply’s service fingerprint, and whether there was a thinking block. All three passed, so the two test runs had already been sent out, and the money spent (224 requests, counted by prompt). The two runs were ruled not run: not published, not scored.
The fixes:
- The request body keeps its key order as built; a new test checks the order the server receives;
- A new gate: when all dev answers are the same string, the test run waits. This gate only compares whole answers; it reads no status and no score;
- Both rows were rerun with new run ids carrying an
ordtag.
No other row was affected, including the hosted models, the base model, and the three SFT seeds: they use the json_object mode, which has no schema and therefore no property order to speak of.
The same service, rerun, still differs
Seed 2026’s adapter answered the test prompts again on the same service: same GPU type, same vLLM version, same service fingerprint, registered in advance. Of 448 answers, 33 changed; none of the 40 C4 cases flipped (self-served-runs.md).
By condition, 5 to 11 of 112 answers changed per condition (C1 11, C2 6, C3 11, C4 5). In post 3, qwen3-32b’s hosted rerun had 39 to 46 for the same count. Much more stable, but still not exactly the same. This is also why post 2 said that the “resample” arm in the 1.7B repair rounds measures whether this service is stable with itself, not a second chance.
Cost
The three Modal sessions that ran the constrained decoding and few-shot rows and the 1.7B repair rounds (dev split included) came to 1.15 USD in total, covering 1,121 requests, or 1.03 USD per thousand requests. Another accounting sums GPU time by per-request latency: 0.99 hours, at 0.80 USD per L4 hour, is 0.79 USD. This accounting excludes the 224 requests of the two unread test runs (cost.json). The protocol notes explicitly: neither number is a price under any other serving arrangement.
There is also a small pitfall here. An independent recalculation found that the GPU cost multiplied 0.986753 hours, already rounded to the microhour, by the unit price, giving 0.78940240; from the exact 3,552,312.0 milliseconds it should be 0.78940267. Changed to sum exactly first and round only once at the end. This change happened after scoring, but the cost inputs read no results, so no reading was affected (3413343).
The whole project through November 9 cost at most 9.64 USD (the hosted models and the judge study counted at their billing upper bounds).
A few other spots
"missing_slots": null. The base model sometimes writes"missing_slots": nullunder C1. The parser accepts omitting the key but rejects an explicit null (the prompt asks for[]), so it is judged malformed. If null were read as an empty list, C1 strong exact would go from 0 to 0.083 on the dev split and from 0.050 to 0.088 on the test split. The scorer stays unchanged, C4 is unaffected, and no hosted model writes it this way.- Greedy decoding can loop. The base model wrote to the 2048-token limit in 7 of 160 dev answers and 18 of 448 test answers; the 7 dev ones are confirmed loops. Qwen3’s model card recommends temperature 0.7, top_p 0.8, top_k 20 when thinking is off; but at temperature 0, vLLM ignores the model’s own sampling parameters.
- Versions only need to be consistent. L4 was chosen because it is the cheapest GPU on Modal that supports bf16 and has 24 GB of memory (0.80 USD per hour; A10 is 1.10 USD, T4 does not support bf16). vLLM 0.21.0 was used because Modal’s example pins that version; 0.31.0 already existed, and the protocol’s wording is that what matters is that every row uses the same version. Every reply must carry the service fingerprint
vllm-0.21.0-84f508c7. - The training run manifests don’t record the commit hash. None of the three
run_manifest.jsonfiles has a commit hash; this is a known gap. - The adapters were only trained on C4. So their scores on C1 through C3 are all marked as untrained conditions. Their performance in the repair rounds is in post 2.
Summary
- The training set must be separated from the test split at every layer: labels, canonical forms, frame sets, text, even the wording of clarification templates;
- Check the training framework’s defaults one by one, especially the ones that silently drop data;
- When the training targets conflict with the prompt’s rules, at least record it first and agree in advance on how the scores will be broken down;
- Fix the checkpoint in advance, and report all seeds. For anything decided after seeing part of the test results, state what was already known at the time;
- Strong exact alone misses “failing more quietly”; look at how the distribution of outcomes moves;
- Try the cheap options before claiming fine-tuning helps;
- “Canonicalization” during serialization can change semantics. Checking whether all outputs are identical is cheap.
The next post is the engineering checklist: tshark’s operating boundaries, the frozen field catalog, CI, and the pitfalls of starting and stopping GPUs on demand on Modal.
Footnotes
-
The repository is WeiGuang-2099/DFilterForge. The source and documents linked in this post are all pinned to the November 9, 2026 commit 09bb537. ↩︎