Text Generation
MLX
Safetensors
English
lfm2
speech-to-text
transcript-cleanup
text-correction
asr-post-processing
LFM
LiquidAI
mlx-5bit
conversational
5-bit
Instructions to use juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit" } ] } } }Run Pi
# Start Pi in your project directory: pi
- OpenClaw new
How to use juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit"
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- MLX LM
How to use juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit"
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default juanquivilla/sotto-cleanup-lfm25-350m-mlx-5bit
Run Hermes
hermes
v45: SFT+chained GRPO with ITN — 95.9% number accuracy, 97.0% filler-free, deletion behavior matches v36
Browse files- README.md +22 -16
- config.json +1 -2
- generation_config.json +1 -1
- 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 (
|
| 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
|
| 29 |
|
| 30 |
-
## What's new in
|
| 31 |
|
| 32 |
-
|
| 33 |
|
| 34 |
-
| Capability |
|
| 35 |
-
|---|---|---|
|
| 36 |
-
|
|
| 37 |
-
|
|
| 38 |
-
|
|
|
|
|
|
|
|
|
|
|
| 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 = "
|
| 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 |
-
# → "
|
| 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 |
-
|
|
| 91 |
-
|
|
| 92 |
-
|
|
| 93 |
-
|
|
|
|
|
|
|
|
| 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 v45 — converts 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.
|
| 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.
|
| 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:
|
| 3 |
size 243830312
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:07ae4ba3889eaf4e3d959b8f9f8ad5ac6f09a03a5bb9b2a20ec3165beaf91803
|
| 3 |
size 243830312
|