Instructions to use johrell/S1-mini-sv with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use johrell/S1-mini-sv 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("johrell/S1-mini-sv") 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 johrell/S1-mini-sv with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "johrell/S1-mini-sv"
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "johrell/S1-mini-sv" } ] } } }Run Pi
# Start Pi in your project directory: pi
- MLX LM
How to use johrell/S1-mini-sv with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "johrell/S1-mini-sv"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "johrell/S1-mini-sv" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "johrell/S1-mini-sv", "messages": [ {"role": "user", "content": "Hello"} ] }' - Hermes Agent
How to use johrell/S1-mini-sv 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 "johrell/S1-mini-sv"
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 johrell/S1-mini-sv
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use johrell/S1-mini-sv with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "johrell/S1-mini-sv"
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 "johrell/S1-mini-sv" \ --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"
S1-mini by Superwhisper, Swedish by Babbla
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.
Input format
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.
Quickstart (mlx-lm)
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
Swedish written convention
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 →
anna.svensson@example.se); self-corrections resolve to the final value.
Lists and email layout copy the original model's English layout exactly.
Evaluation
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 %.
Training data
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.
Limitations
- Swedish and English only. Other languages were not trained and are handled no better than by the original.
- Only
Styling: semi-formalwas trained for Swedish; the other three styling values of the original are untested on Swedish input. - No translation, no personal dictionary, no register for terminals or code editors: it normalizes, and a downstream app must own those.
- The retention behaviour of a text normalizer applies: it deletes fillers and false starts and may drop a hedge word it takes for one.
- English on bare, lowercase, unpunctuated input is a little weaker than the original: "so um i need to like send the the report by uh friday no wait make that thursday" comes back as "So i need to send the report by Thursday." (lowercase "i"; the original capitalizes it). Recognizer-style input, capitalized and punctuated, is what it was trained on.
- A 170-word single-sentence-free run-on is the longest shape it was trained on; keep inputs under roughly 1 000 tokens.
Licence
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.
- Downloads last month
- -
8-bit