Model · training-data generation
Contextual Sentence Creator: read-aloud sentences for ASR training data
Give it a term, a one-line context and a count n; it returns a JSON array of exactly n natural English sentences that each use the term once, in that meaning.
About the model
Fine-tuning a speech model on specialist vocabulary needs recordings of each word in natural sentences. This model writes those sentences: given a term, a one-line context and a count n, it returns a JSON array of exactly n English sentences of 6 to 18 words, each using the term once, spelled as given, in the meaning the context describes.
It was built for the Hebrish training pipeline (romanized Hebrew, Israeli names and places, tech terms), where the sentences are read aloud and recorded, but it works for any term. An optional kind field (hebrew, name, place, brand, medical, tech and others) steers the register.
LoRA fine-tune of IBM Granite 4.2 3B, merged. It replaces an API call per term with a local model.
Which file should I download?
If unsure, take Q8_0. On desktop CPUs it was also faster than Q4_K_M (about 3× realtime against 1.4× on 8 cores), and both gave the same transcripts as the full model on the test clips.
GGUF Q4_K_M 2.2 GB
Default for CPU. The embedded chat template is the one it was trained with (thinking off); pass chat_template.jinja if your runtime overrides it.
Run with llama.cpp Download GGUF Q4_K_M →safetensors (Transformers) 7.3 GB
bf16 merged weights for AutoModelForCausalLM. Use the system prompt from the model card exactly.
Run with Hugging Face Transformers Download safetensors (Transformers) →On Android
- Install Offline Voice Input (source), download the Q8_0 GGUF on the phone, import it in the app and select it.
- Use it as the system voice input, or through a keyboard whose mic key opens it: SwiftKey, HeliBoard or FlorisBoard. Gboard's mic button cannot hand speech to it.
- Set the app's battery optimisation to Unrestricted so Android does not kill it between dictations.
On Linux
- Handy loads the same GGUF. Copy it into
~/.local/share/com.pais.handy/models/under its own file name.
Results
v1, run v1 held-out evaluation, evaluated 3 November 2026. 309 held-out calls (terms never seen in training, plus 6 fixed benchmark pairs), n = 10, temperature 0.8, same prompt set for both. The gate is the ASR acceptance check: 6 to 18 words, the term exactly once, allowed characters, number rules.
| Test set | Gemini 3.1 Flash-Lite (API) | This model |
|---|---|---|
| Reply is valid JSON | 100% | 100% |
| Exactly n sentences | 100% | 100% |
| Sentences passing the gate | 99.7% | 95.7% |
| Calls where all n pass first try | 96.8% | 72.8% |
- Failures are mostly sentences slightly too long (19 to 22 words) and a missing term (1.8% of sentences), usually a rare word swapped for a familiar one. The term appears twice in 0.3% of sentences.
- Recommended use: ask for n + 2 and keep the first n that pass your own checks.
Training
- LoRA r 32, alpha 32, dropout 0.05 on all linear layers of ibm-granite/granite-4.2-3b; learning rate 2e-4 cosine, 2 epochs, batch 16, 1,676 steps, bf16, loss on the assistant turn only. 27 minutes on one NVIDIA L40S. Merged after training.
- Data: danielrosehill/term-context-sentences, 13,408 examples over 8,342 terms, much of it written by Claude, Gemini and DeepSeek.
Training data
Checkpoints and roadmap
Where the model is now and the checkpoints still to come. Planned stages are the current plan, not promises.
- v1 Done 3 November 2026
First release: 95.7% of sentences pass the ASR gate; merged weights and GGUF Q4_K_M and Q8_0.
Limitations
- English only, and the vocabulary leans heavily Israeli.
- It writes plausible sentences, not true ones: nothing is checked for factual accuracy, and the gate checks form, not meaning.
- Behind the Gemini Flash-Lite API on the gate (95.7% against 99.7% of sentences), so filter its output.
Related
- HebrishThe speech models whose training data it writes