ductai199x commited on
Commit
e915c7e
·
verified ·
1 Parent(s): 2ab6796

Card and the Quality v1 adapter

Browse files
README.md ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ base_model:
4
+ - google/gemma-4-e4b-it-qat-q4_0-unquantized
5
+ tags:
6
+ - dictation
7
+ - speech-to-text
8
+ - text-normalization
9
+ - grammatical-error-correction
10
+ - gguf
11
+ - lora
12
+ language:
13
+ - en
14
+ ---
15
+
16
+ # Utter cleanup models
17
+
18
+ The cleanup models of [Utter](https://github.com/ductai199x/utter), a local voice dictation app.
19
+ They take what the speech recognizer (NVIDIA Parakeet) heard and return the text the speaker
20
+ meant to type:
21
+ - **Punctuation and capitals** nobody said.
22
+ - **Spoken symbols and numbers** written as people type them ("four x faster" -> "4× faster",
23
+ "about two forty" -> "~240").
24
+ - **Fillers and false starts** removed.
25
+ - **Corrections applied:** "at 2, actually 3"; "scratch that" (the last sentence); "let's start
26
+ over" (everything).
27
+ - **Far-back edits:** "actually, change the eggs to three boxes".
28
+ - **Spoken lists as bullets,** numbered for steps.
29
+ - **Grammar fixed,** in the speaker's own words.
30
+ - **The person's own words spelled right** when they are in their dictionary.
31
+ - **Dictated text is typed, never answered:** a question or an instruction to an AI comes out
32
+ as text.
33
+
34
+ Utter offers two, and the person chooses in the app.
35
+
36
+ ## Files
37
+
38
+ | File | Model | What |
39
+ |---|---|---|
40
+ | `utter-quality-v1-q4_0.gguf` | **Quality**, v1 | Gemma 4 E4B fine-tuned, Q4_0, for llama.cpp (b11535 or later); about 3.3 GB of GPU memory when the per-layer embeddings stay in system RAM |
41
+ | `adapters/utter-quality-v1/` | | Its LoRA adapter (rank 16) on the base checkpoint, for merging or further training |
42
+
43
+ **Light** (Gemma 4 E2B fine-tuned, for about 2.5 GB of GPU memory) is added here once its
44
+ evaluation is done.
45
+
46
+ ## How it must be prompted
47
+
48
+ The rules are in the weights, so the system prompt is short, and it must be exactly this:
49
+
50
+ ```
51
+ Turn this dictation into the text the speaker meant to type: punctuated, formatted and corrected the way a careful writer would type it, in the speaker's own words.
52
+ ```
53
+
54
+ The user message is the transcript after `Dictated: `, optionally preceded by context lines:
55
+
56
+ ```
57
+ App: email
58
+ Before: "text before the cursor"
59
+ Lists: off
60
+ Dictionary: Utter, Nguyen
61
+ Dictated: <what the recognizer heard>
62
+ ```
63
+
64
+ `Dictionary:` carries only the person's terms that sound like something in this dictation, not
65
+ the whole list. The reply is the cleaned text only. Thinking must be off
66
+ (`chat_template_kwargs: {"enable_thinking": false}`).
67
+
68
+ ## Training
69
+
70
+ - **Method:** LoRA (rank 16, alpha 32) on Google's unquantized QAT checkpoint of Gemma 4 E4B,
71
+ then merged and quantized to Q4_0, the format the QAT was trained for.
72
+ - First pass: 89,499 pairs, lr 2e-4, 1 epoch.
73
+ - Second pass, from the first adapter: 45,660 of those pairs with `Dictionary:` lines added,
74
+ lr 1e-4, 1 epoch. Some lines hold the right spelling of a misheard word; some hold
75
+ near-miss words that must not be forced in.
76
+ - **Data:** pairs of (recognizer output, intended text):
77
+ - **Written side:** real passages from Common Pile (Stack Exchange, GitHub, arXiv abstracts,
78
+ Ubuntu IRC) and Wikipedia, plus lists and LLM-written everyday messages.
79
+ - **Spoken side:** written by Gemma 4 26B-A4B in eight kinds (plain, spoken punctuation,
80
+ disfluent, self-correction, retraction command, sentence restatement, grammar mistakes,
81
+ far-back edit), checked by code, spoken by Kokoro TTS and recognized by Parakeet.
82
+ - **Answer keys:** fixed for typos and grammar, with each fix verified as grammar by ERRANT.
83
+ - **Held out:** no evaluation passage was trained on.
84
+
85
+ ## Evaluation
86
+
87
+ **Ready to send:** the share of dictations a careful writer would send exactly as typed. Gemma 4
88
+ 26B-A4B (Q4_0, llama.cpp) grades each one against the intended text, with a rubric calibrated
89
+ on human review.
90
+
91
+ **Test sets:**
92
+ - **Realistic:** 950 held-out dictations, everyday messages, emails, notes and AI prompts plus
93
+ short real forum and chat posts. Each is spoken one way: plainly, with fillers, a
94
+ self-correction, a command, a later edit, spoken punctuation or broken grammar.
95
+ - **Directed:** 292 dictations of questions, requests to AI assistants, instructions to coding
96
+ agents, and text telling the dictation app itself to do something.
97
+
98
+ | Quality v1 | Ready to send |
99
+ |---|---|
100
+ | Realistic, Kokoro voices | 89.3% |
101
+ | Realistic, with a 300-term dictionary | 88.9% (dictionary terms right: 97.8%) |
102
+ | Realistic, unseen Chatterbox voices | 82.3% |
103
+ | Directed, with a dictionary | 89.7% |
104
+
105
+ **Known gaps:**
106
+ - A leading filler with a comma ("Uh, so...") can survive.
107
+ - Pronoun case ("me and him went") is not always fixed.
108
+ - Speech in the evaluation is synthetic (two TTS engines), not recorded dictation.
109
+
110
+ ## License
111
+
112
+ Apache 2.0, as the base model. The training text came from openly licensed sources (public
113
+ domain, CC0, CC BY-SA, MIT, Apache-2.0).
adapters/utter-quality-v1/adapter_config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alora_invocation_tokens": null,
3
+ "alpha_pattern": {},
4
+ "arrow_config": null,
5
+ "auto_mapping": null,
6
+ "base_model_name_or_path": "google/gemma-4-e4b-it-qat-q4_0-unquantized",
7
+ "bias": "none",
8
+ "corda_config": null,
9
+ "ensure_weight_tying": false,
10
+ "eva_config": null,
11
+ "exclude_modules": null,
12
+ "fan_in_fan_out": false,
13
+ "inference_mode": true,
14
+ "init_lora_weights": true,
15
+ "kasa_config": null,
16
+ "layer_replication": null,
17
+ "layers_pattern": null,
18
+ "layers_to_transform": null,
19
+ "loftq_config": {},
20
+ "lora_alpha": 32,
21
+ "lora_bias": false,
22
+ "lora_dropout": 0.05,
23
+ "lora_ga_config": null,
24
+ "megatron_config": null,
25
+ "megatron_core": "megatron.core",
26
+ "modules_to_save": null,
27
+ "monteclora_config": null,
28
+ "peft_type": "LORA",
29
+ "peft_version": "0.21.2",
30
+ "qalora_group_size": 16,
31
+ "r": 16,
32
+ "rank_pattern": {},
33
+ "revision": null,
34
+ "target_modules": ".*language_model.*\\.(q_proj|k_proj|v_proj|o_proj|gate_proj|up_proj|down_proj)",
35
+ "target_parameters": null,
36
+ "task_type": "CAUSAL_LM",
37
+ "trainable_token_indices": null,
38
+ "use_bdlora": null,
39
+ "use_dora": false,
40
+ "use_qalora": false,
41
+ "use_rslora": false,
42
+ "velora_config": null
43
+ }
adapters/utter-quality-v1/adapter_model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f93f32a299b1aa9a051665fe3968e5b3384b58c6a67e151f0e1d18453c5c83a3
3
+ size 139602808