juanquivilla commited on
Commit
a9fa15c
·
verified ·
1 Parent(s): 74443d8

v45: SFT+chained GRPO with ITN — 95.9% number accuracy, 97.0% filler-free, deletion behavior matches v36

Browse files
Files changed (4) hide show
  1. README.md +22 -16
  2. config.json +1 -2
  3. generation_config.json +1 -1
  4. model.safetensors +1 -1
README.md CHANGED
@@ -12,12 +12,13 @@ tags:
12
  - LiquidAI
13
  - mlx
14
  - mlx-5bit
 
15
  pipeline_tag: text-generation
16
  datasets:
17
  - juanquivilla/sotto-transcript-cleanup
18
  ---
19
 
20
- # SottoASR Transcript Cleanup — LFM2.5-350M MLX 5-bit (v36 + Preservation)
21
 
22
  [sottoasr.app](https://sottoasr.app) · [Full precision (bf16)](https://huggingface.co/juanquivilla/sotto-cleanup-lfm25-350m) · [MLX 4-bit (smaller)](https://huggingface.co/juanquivilla/sotto-cleanup-lfm25-350m-mlx-4bit) · [Training Dataset](https://huggingface.co/datasets/juanquivilla/sotto-transcript-cleanup)
23
 
@@ -25,17 +26,20 @@ datasets:
25
 
26
  **MLX 5-bit affine quantization** of [juanquivilla/sotto-cleanup-lfm25-350m](https://huggingface.co/juanquivilla/sotto-cleanup-lfm25-350m). The recommended variant for most Apple Silicon users — best size/quality trade-off.
27
 
28
- This model powers on-device transcript cleanup in [SottoASR](https://sottoasr.app) — a local, privacy-first speech-to-text application for macOS. It removes filler words, corrects grammar, formats punctuation, handles false starts and self-corrections, restructures long dictations into paragraph-formatted prose, and **— new in v36preserves substantive content reliably even on long inputs**, all locally with zero cloud dependency.
29
 
30
- ## What's new in v36
31
 
32
- v36 fixes the **aggressive-edits failure mode** that earlier checkpoints occasionally exhibited: on long inputs the model would sometimes delete substantive content along with the fillers. v36 is a GRPO **full fine-tune** (all 354M params trainable, no LoRA) with a substantive-deletion-aware reward. Result: high-substantive-deletion incidence on long inputs drops from **3.85% 0.64%** while filler-free rate climbs from **50.9% 96.9%**.
33
 
34
- | Capability | v23 baseline | **v36 (this model)** |
35
- |---|---|---|
36
- | Filler-Free rate | 50.9 % | **96.9 %** ⭐ |
37
- | Substantive-deletion >15% on long inputs | 3.85 % | **0.64 %** |
38
- | ROUGE-L F1 on long inputs (>100 words) | 0.9242 | **0.9425** |
 
 
 
39
 
40
  ## Key Specs
41
 
@@ -47,7 +51,7 @@ v36 fixes the **aggressive-edits failure mode** that earlier checkpoints occasio
47
  | **Architecture** | Hybrid: 10 conv + 6 GQA attention (354M params) |
48
  | **Latency** | ~85 ms average per transcript (M-series) |
49
 
50
- Quality at this quantization tracks the bf16 model closely. See the [bf16 model card](https://huggingface.co/juanquivilla/sotto-cleanup-lfm25-350m) for full benchmark numbers.
51
 
52
  ## Quantization Recipe
53
 
@@ -70,14 +74,14 @@ from mlx_lm.sample_utils import make_sampler
70
  model, tokenizer = load("juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit")
71
  sampler = make_sampler(temp=0.0) # greedy
72
 
73
- text = "so uh basically we need to fix the deployment pipeline"
74
  prompt = f"### Input:\n{text}\n\n### Output:\n"
75
 
76
  output = generate(model, tokenizer, prompt=prompt, max_tokens=512, sampler=sampler)
77
  if "###" in output:
78
  output = output[:output.index("###")].strip()
79
  print(output)
80
- # → "We need to fix the deployment pipeline."
81
  ```
82
 
83
  For long dictation that may need paragraph formatting, raise `max_tokens` to 1024–2048.
@@ -87,10 +91,12 @@ For long dictation that may need paragraph formatting, raise `max_tokens` to 102
87
  | Input (raw ASR) | Output (cleaned) |
88
  |-----------------|------------------|
89
  | so uh basically we need to fix the deployment pipeline | We need to fix the deployment pipeline. |
90
- | the deadline is friday no monday we have until monday | The deadline is Monday. |
91
- | what we what i wanted to say is the tests pass | What I wanted to say is the tests pass. |
92
- | okay so the thing is basically we're running out of disk space | We're running out of disk space. |
93
- | uh yes | Yes. |
 
 
94
 
95
  ### Paragraph emission on long dictations (inherited from v23)
96
 
 
12
  - LiquidAI
13
  - mlx
14
  - mlx-5bit
15
+ - inverse-text-normalization
16
  pipeline_tag: text-generation
17
  datasets:
18
  - juanquivilla/sotto-transcript-cleanup
19
  ---
20
 
21
+ # SottoASR Transcript Cleanup — LFM2.5-350M MLX 5-bit (v45 + Numbers)
22
 
23
  [sottoasr.app](https://sottoasr.app) · [Full precision (bf16)](https://huggingface.co/juanquivilla/sotto-cleanup-lfm25-350m) · [MLX 4-bit (smaller)](https://huggingface.co/juanquivilla/sotto-cleanup-lfm25-350m-mlx-4bit) · [Training Dataset](https://huggingface.co/datasets/juanquivilla/sotto-transcript-cleanup)
24
 
 
26
 
27
  **MLX 5-bit affine quantization** of [juanquivilla/sotto-cleanup-lfm25-350m](https://huggingface.co/juanquivilla/sotto-cleanup-lfm25-350m). The recommended variant for most Apple Silicon users — best size/quality trade-off.
28
 
29
+ This model powers on-device transcript cleanup in [SottoASR](https://sottoasr.app) — a local, privacy-first speech-to-text application for macOS. It removes filler words, corrects grammar, formats punctuation, handles false starts and self-corrections, restructures long dictations into paragraph-formatted prose, preserves substantive content reliably even on long inputs, and **— new in v45converts spoken-form numbers to digit form correctly** (inverse text normalization), all locally with zero cloud dependency.
30
 
31
+ ## What's new in v45
32
 
33
+ v45 adds **inverse text normalization (ITN)**: when users dictate compound spoken numbers like "talk about server three sixty," v45 reliably produces "Talk about server 360." Earlier versions (v36 and prior) either preserved the spoken form (looks unprofessional) or attempted the conversion incorrectly. v45 covers all common ITN categories compound numbers, hundreds, four-digit years, times, decimals, percentages, currency, ordinals, dates while continuing to preserve cardinals in idioms ("I'll be there in five" stays as written).
34
 
35
+ | Capability | v36 (preservation) | **v45 (this model)** |
36
+ |---|---:|---:|
37
+ | Number accuracy (171-sample stratified set) | 12.9 % | **95.9 %** ⭐ |
38
+ | Filler-Free rate | 96.9 % | **97.0 %** |
39
+ | Substantive-deletion >15% on long inputs | 13.3 % | 13.7 % (~tied) |
40
+ | Word retention median | 0.884 | 0.922 |
41
+
42
+ † Measured on all 241 long inputs (>100 words) from `data_v23_paragraphs/val.jsonl` — a stricter metric than v36's published 0.64 % (which was on a 350-sample mix). v45 inherits v36's deletion-aware behavior on the same eval.
43
 
44
  ## Key Specs
45
 
 
51
  | **Architecture** | Hybrid: 10 conv + 6 GQA attention (354M params) |
52
  | **Latency** | ~85 ms average per transcript (M-series) |
53
 
54
+ Quality at this quantization tracks the bf16 model closely. See the [bf16 model card](https://huggingface.co/juanquivilla/sotto-cleanup-lfm25-350m) for full benchmark numbers, training pipeline, and reward shape.
55
 
56
  ## Quantization Recipe
57
 
 
74
  model, tokenizer = load("juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit")
75
  sampler = make_sampler(temp=0.0) # greedy
76
 
77
+ text = "talk about server three sixty"
78
  prompt = f"### Input:\n{text}\n\n### Output:\n"
79
 
80
  output = generate(model, tokenizer, prompt=prompt, max_tokens=512, sampler=sampler)
81
  if "###" in output:
82
  output = output[:output.index("###")].strip()
83
  print(output)
84
+ # → "Talk about server 360."
85
  ```
86
 
87
  For long dictation that may need paragraph formatting, raise `max_tokens` to 1024–2048.
 
91
  | Input (raw ASR) | Output (cleaned) |
92
  |-----------------|------------------|
93
  | so uh basically we need to fix the deployment pipeline | We need to fix the deployment pipeline. |
94
+ | talk about server three sixty | Talk about server 360. |
95
+ | schedule it for three fifteen pm | Schedule it for 3:15 PM. |
96
+ | we hit ninety eight percent uptime last month | We hit 98 % uptime last month. |
97
+ | transfer fifty dollars to billing | Transfer $50 to billing. |
98
+ | i'll be there in five | I'll be there in five. |
99
+ | we run twenty four seven | We run 24/7. |
100
 
101
  ### Paragraph emission on long dictations (inherited from v23)
102
 
config.json CHANGED
@@ -21,7 +21,6 @@
21
  "eos_token_id": [
22
  7
23
  ],
24
- "full_attn_idxs": null,
25
  "hidden_size": 1024,
26
  "initializer_range": 0.02,
27
  "intermediate_size": 6656,
@@ -67,7 +66,7 @@
67
  },
68
  "rope_theta": 1000000.0,
69
  "tie_word_embeddings": true,
70
- "transformers_version": "5.6.2",
71
  "use_cache": false,
72
  "use_pos_enc": true,
73
  "vocab_size": 65536
 
21
  "eos_token_id": [
22
  7
23
  ],
 
24
  "hidden_size": 1024,
25
  "initializer_range": 0.02,
26
  "intermediate_size": 6656,
 
66
  },
67
  "rope_theta": 1000000.0,
68
  "tie_word_embeddings": true,
69
+ "transformers_version": "5.3.0",
70
  "use_cache": false,
71
  "use_pos_enc": true,
72
  "vocab_size": 65536
generation_config.json CHANGED
@@ -5,5 +5,5 @@
5
  7
6
  ],
7
  "pad_token_id": 0,
8
- "transformers_version": "5.6.2"
9
  }
 
5
  7
6
  ],
7
  "pad_token_id": 0,
8
+ "transformers_version": "5.3.0"
9
  }
model.safetensors CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:8fdff7017e6929cb5d3bb90e3136da4be6bfa0897109286532486dc92d57ab33
3
  size 243830312
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:07ae4ba3889eaf4e3d959b8f9f8ad5ac6f09a03a5bb9b2a20ec3165beaf91803
3
  size 243830312