Downloads · 30 days
159
100% of all-time downloads
johrell/S1-mini-sv
S1-mini-sv is a text generation model from johrell. Use it when you need the model to write or continue text. It is set up for mlx. The card lists the license as other.
A bilingual (Swedish + English) fine-tune of S1-mini by Superwhisper, the 0.6B text normalizer for speech-to-text transcripts, trained by Babbla to clean Swedish dictations the way it cleans English ones: fillers and…
Downloads · 30 days
159
100% of all-time downloads
All-time downloads
159
Public
Parameters
596M
645 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors633 MB · 98%
How the weights are stored.
U32596M · 100%
From the Hugging Face model README
A bilingual (Swedish + English) fine-tune of S1-mini by Superwhisper, the 0.6B text normalizer for speech-to-text transcripts, trained by Babbla to clean Swedish dictations the way it cleans English ones: fillers and false starts removed, self-corrections resolved, punctuation and capitalization applied, and spoken numbers, dates, clock times, amounts, phone numbers and addresses written out in Swedish written convention. English behaviour is preserved by replaying the original model's own outputs during training.
This repository is a derivative work of superwhisper/s1-mini (commit
88f6b15896c73bbb13a3b596e0afe8ea0d5150b4) and keeps its name, "S1-mini" by "Superwhisper", as the
licence's naming clause requires. The Swedish capability is Babbla's addition.
8-bit MLX weights (group size 64), for Apple Silicon: measured, the 4-bit
build of this fine-tune lost most of what it learned, 8-bit keeps it whole.
Identical to the original — the system prompt and control line are part of the trained format and must be sent verbatim:
You are a text normalizer for speech-to-text transcripts. The input begins with a control line specifying the styling, structure, and context settings; clean the transcript to match those settings and output only the cleaned text.
[Styling: semi-formal] [Structure: prose|lists] [Context: general|email]
<raw transcript>
Apply Qwen3's chat template with enable_thinking=False and decode greedily
(generation_config.json ships do_sample: false). The model was fine-tuned
under Styling: semi-formal only; other styling values were not part of the
Swedish training data and may garble Swedish output.
from mlx_lm import load, generate
from mlx_lm.sample_utils import make_sampler
model, tokenizer = load("johrell/S1-mini-sv")
SYSTEM = "You are a text normalizer for speech-to-text transcripts. The input begins with a control line specifying the styling, structure, and context settings; clean the transcript to match those settings and output only the cleaned text."
def normalize(transcript, structure="prose", context="general"):
messages = [
{"role": "system", "content": SYSTEM},
{"role": "user", "content": f"[Styling: semi-formal] [Structure: {structure}] [Context: {context}]\n{transcript}"},
]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False, enable_thinking=False)
return generate(model, tokenizer, prompt, max_tokens=512, sampler=make_sampler(temp=0.0))
print(normalize("Fakturan hamnade på tjugotretusen fyrahundrafemtio kronor och ska betalas senast den femtonde mars."))
# Fakturan hamnade på 23 450 kr och ska betalas senast den 15 mars.
print(normalize("Eh, vi behöver köpa mjölk, smör, ost och bröd.", structure="lists"))
# Vi behöver köpa:
# - Mjölk
# - Smör
# - Ost
# - Bröd
Svenska skrivregler with one exception: clock times take a colon
(kl. 14:30), never a period, because 14.30 reads as a sentence end to
downstream tools. Small counts in prose stay words (1–12), 13 and up are
digits; anything with a unit, currency, percent, date or time is digits
(23 450 kr, 1 250,50 kr, 20 %, 15 mars); halv tre becomes 14:30
when the half of day is clear and 2:30 otherwise; spelled addresses become
addresses (anna punkt svensson snabel-a example punkt se →
[email protected]); self-corrections resolve to the final value.
Lists and email layout copy the original model's English layout exactly.
Measured on Babbla's Swedish golden set (real KB-Whisper/Parakeet dictations plus authored cases, hand-corrected) with the 8-bit weights in this repository, greedy decoding:
| tag | n | exact match | edit distance |
|---|---|---|---|
| all | 124 | 89.5 % | 0.005 |
| fillers | 19 | 84.2 % | 0.015 |
| punctuation | 21 | 66.7 % | 0.011 |
| question | 27 | 85.2 % | 0.004 |
| itn | 32 | 93.8 % | 0.002 |
| list | 16 | 87.5 % | 0.013 |
| self-correction | 15 | 100.0 % | 0.000 |
| mixed-language | 21 | 76.2 % | 0.006 |
| 17 | 94.1 % | 0.002 |
English agreement with the original S1-mini on 830 held-out pairs: 78.1 % exact.
Exact match is strict: a comma placed differently from the hand-corrected
target counts as a miss, which is most of what the punctuation and
mixed-language rows lose. For scale, the original S1-mini's own 8-bit and
4-bit builds agree 82 % with its bf16 greedy outputs on the same English
pairs, so the 78 % above is the fine-tune's cost on English against that
quantization ceiling, not against 100 %.
Generated backwards from clean Swedish text by rule, no audio involved: sentences from Riksdagen protocol text (Swedish open data) and Swedish Wikipedia (CC BY-SA 4.0), rendered into their spoken form (numbers, dates, times, amounts, addresses as words; fillers, false starts and self-corrections injected) with input habits matched to what KB-Whisper and Parakeet actually emit; about 2 000 spoken-style Swedish scripts written by Claude across Babbla's app categories; rule-built lists, step sequences, emails and command lines; and an English replay layer whose inputs come from Simple English Wikipedia plus the author's own English dictations and whose targets are the original S1-mini's greedy outputs. No Swedish user dictations were trained on: every real Swedish dictation the author had went into the held-out evaluation set instead.
Styling: semi-formal was trained for Swedish; the other three
styling values of the original are untested on Swedish input.Apache 2.0 plus the naming clause of the original: see LICENSE and
NOTICE. Any use or distribution, modified or not, must continue to identify
the model as "S1-mini" by "Superwhisper", with that capitalization.