Skip to content

Train Deep's candidate E on corrections inside a clause, fragments, spoken numbers and list markers - #57

Closed
purinda wants to merge 8 commits into
deep-speech-trainingfrom
deep-e-training
Closed

purinda wants to merge 8 commits into
deep-speech-trainingfrom
deep-e-training

Conversation

@purinda

@purinda purinda commented Oct 2, 2026

Copy link
Copy Markdown
Member

Summary

Training data and pipeline changes for Deep's candidate E. E is not shipped and not installed. It is better than D on the four skills it targets and worse on every broad set (results below), so D remains the candidate.

New training families

Each family has a generator in scripts/e_seeds/ and a hand-checked gate set in Training/eval/.

  • slot-corrections: a correction inside one slot keeps the words before the slot. "The cost of parking, no wait, petrol has doubled" becomes "The cost of petrol has doubled.", not "Petrol has doubled.".
  • spoken-numbers: numbers are kept exactly as said. The number rules (Write spoken numbers in digits after cleanup, from Medium up #55) write digits after the model.
  • marker-lists: steps counted out loud in mixed styles are kept as said, so the list rules can number them.
  • Word fragments and whole-word controls, as transcript seeds: "con consider" against "an animal", "new newsletter".

Pipeline

  • prepare --extra-dir DIR adds a family folder to Deep's seeds, leaving out rows a split already holds. It reproduces E's prepared seeds row for row.
  • merge-asr reconciles numbers. A number said in parts now reconciles with the single figure the recognizer writes ("seven point six" → 7.6, "zero four four six" → 0446). Before, the audit quarantined most spoken-number rows.
  • Two category fixes: whole-word controls are filed as unchanged, and counted steps as series. Before this, the audit quarantined every one of them without failing the run.
  • A moved-stops input variant: a comma or full stop a word away from where it belongs.
  • The scorer now accepts either case for the word after a placeholder that opens a line. This doesn't change Train Deep on measured speech-to-text inputs, punctuated every way #51's numbers.

The branch merges the word-fragment check (#52), which E's targets need.

Candidate E

Trained from the base model on 11,440 train, 1,182 valid and 1,158 test rows, for 1,859 iterations. The best validation loss was 0.0152, at iteration 1,400. The table counts cases right by meaning and required punctuation; fallbacks are in brackets.

Set Cases 1.1.0 D E E vs D
Gate: corrections inside a clause 41 36 36 39 +3 −0
Gate: word fragments and controls 31 27 26 (1) 29 +3 −0
Gate: spoken numbers kept exactly 42 36 35 38 +3 −0
Gate: list markers, placeholders 26 18 19 25 +7 −1
E's test split 1158 1019 (17) 1077 (10) 1073 (7) +29 −33
Held-out measured pairs 837 772 (4) 799 (1) 783 (4) +9 −25
D's test split 939 832 (9) 877 (8) 860 (8) +14 −31
Held-out pairs as other recognizers write them 714 483 (3) 660 (4) 634 (9) +18 −44
Hand-written eval 343 314 (3) 310 (4) 299 (2) +7 −18
Standard's correction set 515 498 500 491 (4) +5 −14

Where E loses. Most losses are text E leaves as said where D fixes it:

  • garbled corrections ("the after tomorrow");
  • grammar ("Uma were late");
  • lists and letters it no longer lays out.

The new families are mostly keep-as-said: whole-word controls, numbers kept exactly, and counted steps kept as text in fields that take several lines. That probably made the adapter more conservative. A next candidate should rebalance the families against layout and grammar, rather than add more of them.

Test plan

🤖 Generated with Claude Code

purinda and others added 8 commits October 3, 2026 00:00
Speech-to-text writes the start of a word the speaker cut off as a word
of its own ("She wants few ex expenses", "we should con consider",
"send the rep report"). Deep and Standard both drop it, and both checks
turned the right answer down: Deep's as a change no repair may make,
Standard's as a dropped word that carries meaning.

A said word may now go when the next word in its sentence starts with it
and has at least two letters more, and it is all letters ("ex-" counts).
Never a function word ("for forty", "to tomorrow"), a negation ("not
nothing"), a number, a unit, a word of time, a name or a cue, and never
across a sentence end. WordFragments holds the rule for SelfRepair and
for DroppedWords and ContentWords, in Swift and Rust alike.

A word that carries meaning and starts the next one ("car carpet") now
passes for a fragment; the doc comment says so and a guard case pins it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The fragment rule let both checks accept answers that lose a word the
speaker meant: "re" from "re-read the contract", the pen from "bring a
pen, pencil and paper", "PR" from "PR process is too slow", "Ed" from
"Ed Edwards will lead", "d" from "vitamin d deficiency".

A fragment must now be written on its own, with nothing after it but a
hyphen or dash ("con- consider", "con — consider"): never part of a
hyphenated word, never set off by a comma, colon or quote, and not in
capitals. It has at least two letters, and the word after it is not a
name. SaidWord carries how the word was written (mayBeBrokenOff), in
Swift and Rust alike.

"con, consider" is now turned down at every level, as a list's comma
reads the same. The three fragment examples still
pass, and the replayed answer sets keep every verdict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…agments, spoken numbers and list markers

Four new families, each written by a seeded generator and reviewed, with a held-out gate set in
Training/eval that keeps its sentence frames apart from the training templates:
- slot-corrections: a cue between a word and its replacement, with the clause going on after it
  ("the food for the puppy no wait parrot is on the top shelf"), and restarts as contrast.
- fragments: a word broken off and said again in full ("con- consider"), as transcript seeds,
  with controls where a short word really starts the next one ("the new newsletter").
- spoken-numbers: numbers kept exactly as said, for the number rules that run after the model.
- marker-lists: spoken list markers kept as said for the list rules, and protected tokens at the
  start of a dictation.

Also: a moved-stops input variant (a comma or full stop one word from where it belongs), and the
"Don't forget:" frame no longer teaches a colon the speaker didn't say.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The recognizer writes "seven point six" as 7.6, "zero four four six" as 0446 and
"twenty twenty six" as 2026. merge-asr compared those word by word and sent the pair to
review, so the audit quarantined most spoken-number examples. The words said together now
reconcile as the one figure written, and the target keeps the recognizer's form. A different
figure still goes to review.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Whole words that start like the next one ("an animal", "new newsletter") were filed as
controls, which the audit requires to hold a correction cue, so every one was quarantined.
They are text already right: unchanged. Counted steps kept as said are a series, as Deep's
own generator files them; layout requires the text laid out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
prepare --extra-dir DIR (repeatable) adds DIR's FAMILY-{train,valid,test}.jsonl to Deep's seeds,
each split from the files named for it. A row its split already holds, the same words in the
same kind of field with punctuation aside, is left out: its protected-token family may hold
only one, and the example is trained on once. The report counts what was left out per file.

Candidate E's seeds were built by appending Training/generated-e to the generator's files with
the same rule. prepare --extra-dir Training/generated-e gives the same rows in the same order;
only their provenance now names the family's file. The README describes the families and E's
merge, which moves stops as well as adding them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The scorer took the first word after a placeholder at the start of a line for a sentence start,
so a target such as "⟦S1⟧ takes you to the sign-up form." was wrong against itself and
"⟦S1⟧ Takes …" was right. The word may be the token's verb, so either case is now right there,
as after a placeholder inside a line. The sets of #51 score the same; candidate E's placeholder
cases change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@purinda

purinda commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

Superseded by #58, which merged this work into main with the other changes behind candidate E. It shipped in 1.2.0. (GitHub closed this PR when its base branch was deleted.)

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