srock44 commited on
Commit
91c1f57
Β·
verified Β·
1 Parent(s): 4213fd7

Fix compose garbled-token issue; voice-intent verified 5/5 through real app retry path

Browse files
Files changed (2) hide show
  1. README.md +32 -13
  2. cipher-pro.Q4_K_M.gguf +1 -1
README.md CHANGED
@@ -19,11 +19,16 @@ pipeline_tag: text-generation
19
 
20
  Cipher Pro is a LoRA fine-tune of [Qwen/Qwen3-4B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507), trained on **every LLM-backed feature of a local-first email assistant**: email triage (importance/summary/category JSON), chat, daily-summary synthesis, draft reply, compose assist, and voice-command intent parsing β€” not just prompted for these tasks, actually trained on them.
21
 
22
- **Update:** added a 6th task, voice-command intent parsing. See `Training` below and
23
- `generate_voice_intent.py` for details β€” two real rule-violations found in eval (leaking a
24
- resolved recipient into `search_email` queries, and dropping a valid address match when the
25
- transcript contained an injection attempt) were specifically targeted and fixed in a second
26
- retrain pass.
 
 
 
 
 
27
 
28
  It's the largest of the three **Cipher** tiers (`cipher-nano` / `cipher-air` / `cipher-pro`), and the strongest on structured-output accuracy β€” **100% category accuracy** on the triage benchmark below. Cipher is the local-model engine for an unreleased larger email-assistant project β€” that project isn't public yet, but these weights, the training code, the eval script, and all five dataset generators are fully open now, in this repo.
29
 
@@ -91,14 +96,28 @@ curl http://localhost:11434/api/chat -d '{
91
  - Framework: [Unsloth](https://github.com/unslothai/unsloth) + `trl.SFTTrainer`
92
  - Sequence packing (`trl.SFTConfig(packing=True)`) was tried to speed up training given most examples are well under the 2048-token context window β€” it crashed outright (`ValueError: Expected input batch_size (2048) to match target batch_size (3636)`, an Unsloth fused-loss/trl packing-collator incompatibility in this exact library version pairing), not a quality tradeoff. Disabled.
93
  - Reproduce with `train_cipher_pro.py` β†’ `export_gguf_cipher_pro.py`
94
- - Voice-intent retrain (2 passes): first pass added ~1,800 voice-intent examples to the mix
95
- and fixed the core hallucinated-address bug, but introduced two rule-violations found in
96
- eval (leaking a resolved recipient into `search_email` queries; dropping a valid address
97
- match when the transcript contained an injection attempt). A second pass added ~2,800
98
- examples specifically targeting both failure modes (heavier weight on
99
- search-with-a-real-match-that-must-stay-null and injection-with-a-real-match cases) β€” both
100
- fixed. On `eval_voice_intent.py`'s 5 fixtures (content checked after stripping the known
101
- leading `<think>`/`<tool_call>` leak noted above), cipher-pro went from 3/5 to **4/5**.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
 
103
  ## License
104
 
 
19
 
20
  Cipher Pro is a LoRA fine-tune of [Qwen/Qwen3-4B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507), trained on **every LLM-backed feature of a local-first email assistant**: email triage (importance/summary/category JSON), chat, daily-summary synthesis, draft reply, compose assist, and voice-command intent parsing β€” not just prompted for these tasks, actually trained on them.
21
 
22
+ **Update:** added a 6th task, voice-command intent parsing, across 4 retrain passes total β€”
23
+ each one targeting a specific failure mode found in real end-to-end testing (not just raw
24
+ model output) rather than broad re-training. See `Training` below for the full progression;
25
+ current state on `eval_voice_intent.py`'s 5 fixtures, verified through the actual calling
26
+ app's retry-and-fallback logic (not a single raw completion), is **5/5**.
27
+
28
+ Also fixed in this update: a garbled-leading-token failure mode specific to the compose-
29
+ assist task (a stray non-ASCII token before otherwise-correct output, unrelated to the
30
+ `<think>`/`<tool_call>` leak below) β€” caught by manual spot-checking since compose has no
31
+ automated schema to catch it against, not by any benchmark number.
32
 
33
  It's the largest of the three **Cipher** tiers (`cipher-nano` / `cipher-air` / `cipher-pro`), and the strongest on structured-output accuracy β€” **100% category accuracy** on the triage benchmark below. Cipher is the local-model engine for an unreleased larger email-assistant project β€” that project isn't public yet, but these weights, the training code, the eval script, and all five dataset generators are fully open now, in this repo.
34
 
 
96
  - Framework: [Unsloth](https://github.com/unslothai/unsloth) + `trl.SFTTrainer`
97
  - Sequence packing (`trl.SFTConfig(packing=True)`) was tried to speed up training given most examples are well under the 2048-token context window β€” it crashed outright (`ValueError: Expected input batch_size (2048) to match target batch_size (3636)`, an Unsloth fused-loss/trl packing-collator incompatibility in this exact library version pairing), not a quality tradeoff. Disabled.
98
  - Reproduce with `train_cipher_pro.py` β†’ `export_gguf_cipher_pro.py`
99
+ - Voice-intent retrain (4 passes, each continuing LoRA training from the previous pass's
100
+ adapter rather than starting over):
101
+ 1. ~1,800 voice-intent examples added to the mix β€” fixed the core hallucinated-address
102
+ bug, but introduced two new rule-violations (leaking a resolved recipient into
103
+ `search_email` queries; dropping a valid address match under an injection attempt).
104
+ 2. ~2,800 examples targeting both failure modes specifically (heavier weight on
105
+ search-with-a-real-match-that-must-stay-null and injection-with-a-real-match cases) β€”
106
+ both fixed, but a 3rd failure mode surfaced: the `unknown` action (unsupported
107
+ requests like "forward this to my team") sometimes degenerated into an empty,
108
+ repeating `<tool_call>` loop instead of valid JSON.
109
+ 3. A small (~1,500 example) continue-train pass β€” mostly expanded, more diverse `unknown`
110
+ phrasing plus a light replay slice of everything else to avoid regressing what already
111
+ worked β€” fixed the degenerate-loop case. At this point raw single-shot eval showed 4/5;
112
+ testing through the actual calling app's `chat_json` (which retries with the
113
+ validation error fed back, and falls back to `action: unknown` if all retries still
114
+ fail) showed this was already a real 5/5 in practice β€” the raw eval script's single
115
+ request just didn't reflect the app's actual behavior.
116
+ 4. A final ~4,200 example pass fixed the separately-discovered compose garbled-leading-
117
+ token issue (see the note above), continuing from pass 3's adapter with the full
118
+ `unknown`-fixup data included in the replay slice specifically so that fix wouldn't
119
+ regress. Re-verified 5/5 on voice-intent afterward, no regression on triage/daily-
120
+ summary/chat.
121
 
122
  ## License
123
 
cipher-pro.Q4_K_M.gguf CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5cedf89282350dc55aff4651024c4ab7fa70883830103c91d4d7b4736533e1fd
3
  size 2497278944
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7ecf4c9acb5559fd05749e93730359d0e9d40bf4b4be90e576545181b067ddd
3
  size 2497278944