Text Generation
Transformers
Safetensors
English
qwen3
asr
automatic-speech-recognition
text-normalization
inverse-text-normalization
punctuation
truecasing
speech-to-text
dictation
post-processing
conversational
text-generation-inference
Instructions to use superwhisper/s1-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use superwhisper/s1-mini with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="superwhisper/s1-mini") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("superwhisper/s1-mini") model = AutoModelForCausalLM.from_pretrained("superwhisper/s1-mini", device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use superwhisper/s1-mini with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "superwhisper/s1-mini" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "superwhisper/s1-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/superwhisper/s1-mini
- SGLang
How to use superwhisper/s1-mini with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "superwhisper/s1-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "superwhisper/s1-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "superwhisper/s1-mini" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "superwhisper/s1-mini", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use superwhisper/s1-mini with Docker Model Runner:
docker model run hf.co/superwhisper/s1-mini
Softmaximalist commited on
Commit ·
3069a5d
1
Parent(s): 1443829
Add app integration instructions
Browse files
README.md
CHANGED
|
@@ -249,8 +249,10 @@ in its training data.
|
|
| 249 |
> common way to get a blank result from this model.
|
| 250 |
|
| 251 |
The flag makes the template emit an empty think block before the assistant
|
| 252 |
-
turn. That is the exact prefix the model saw during training.
|
| 253 |
-
|
|
|
|
|
|
|
| 254 |
|
| 255 |
```
|
| 256 |
<|im_start|>system
|
|
@@ -324,11 +326,7 @@ with the empty think block shown above, or you will get blank output.
|
|
| 324 |
leaving it at 1024.
|
| 325 |
4. **Chunk long transcripts at sentence boundaries.** The model is built for
|
| 326 |
dictation-length input; keep single passes under roughly 1,000 tokens.
|
| 327 |
-
5. **
|
| 328 |
-
phrase many times, greedy decoding can mirror the loop until it hits
|
| 329 |
-
`max_new_tokens`. A `repetition_penalty` of 1.1 terminates cleanly without
|
| 330 |
-
affecting normal inputs.
|
| 331 |
-
6. **Expect an empty string sometimes.** Filler-only input returns nothing,
|
| 332 |
and your pipeline should treat that as a valid result rather than a
|
| 333 |
failure.
|
| 334 |
|
|
@@ -339,6 +337,37 @@ output and synthetic stress sets for numbers, self-corrections, lists, email
|
|
| 339 |
and adversarial inputs: 94.4% token accuracy, measured greedy on the Q4_K_M
|
| 340 |
GGUF build. The BF16 weights here should do at least as well.
|
| 341 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 342 |
## License
|
| 343 |
|
| 344 |
s1-mini is released under Apache 2.0, which it inherits from Qwen3-0.6B.
|
|
|
|
| 249 |
> common way to get a blank result from this model.
|
| 250 |
|
| 251 |
The flag makes the template emit an empty think block before the assistant
|
| 252 |
+
turn. That is the exact prefix the model saw during training. The template
|
| 253 |
+
ships as `chat_template.jinja` in this repo, so `apply_chat_template` picks it
|
| 254 |
+
up with no extra configuration. If you build prompts by hand instead, the
|
| 255 |
+
literal string is:
|
| 256 |
|
| 257 |
```
|
| 258 |
<|im_start|>system
|
|
|
|
| 326 |
leaving it at 1024.
|
| 327 |
4. **Chunk long transcripts at sentence boundaries.** The model is built for
|
| 328 |
dictation-length input; keep single passes under roughly 1,000 tokens.
|
| 329 |
+
5. **Expect an empty string sometimes.** Filler-only input returns nothing,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 330 |
and your pipeline should treat that as a valid result rather than a
|
| 331 |
failure.
|
| 332 |
|
|
|
|
| 337 |
and adversarial inputs: 94.4% token accuracy, measured greedy on the Q4_K_M
|
| 338 |
GGUF build. The BF16 weights here should do at least as well.
|
| 339 |
|
| 340 |
+
## Using s1-mini in your own app
|
| 341 |
+
|
| 342 |
+
s1-mini is Apache 2.0, the same license it inherits from Qwen3-0.6B, so it can
|
| 343 |
+
be embedded in open-source and commercial software alike: dictation apps,
|
| 344 |
+
meeting-notes tools, live captioning, voice-driven editors, or any pipeline
|
| 345 |
+
that has to turn raw ASR output into text a person will read.
|
| 346 |
+
|
| 347 |
+
It is a post-processing stage rather than a standalone system:
|
| 348 |
+
|
| 349 |
+
```
|
| 350 |
+
audio ──▶ ASR (Whisper, Parakeet, …) ──▶ s1-mini ──▶ clean text
|
| 351 |
+
```
|
| 352 |
+
|
| 353 |
+
The ASR's raw transcript becomes the transcript line, your app's settings
|
| 354 |
+
choose the three control-line values, and the model returns text ready to
|
| 355 |
+
display. At 0.6B it is small enough to ship on-device, and the
|
| 356 |
+
[GGUF builds](https://huggingface.co/superwhisper/s1-mini-GGUF) exist for
|
| 357 |
+
exactly that.
|
| 358 |
+
|
| 359 |
+
Nothing about the model is superwhisper-specific. The two things to get right
|
| 360 |
+
in any integration are the input format documented above and the thinking
|
| 361 |
+
flag; nearly every integration bug traces back to one of those.
|
| 362 |
+
|
| 363 |
+
> [!IMPORTANT]
|
| 364 |
+
> Read the [LICENSE](LICENSE) before you ship. Apache 2.0 is permissive but
|
| 365 |
+
> not obligation-free: you must retain the license text and attribution
|
| 366 |
+
> notices, and state significant changes if you redistribute a modified
|
| 367 |
+
> version. If you are bundling s1-mini into a commercial dictation app or
|
| 368 |
+
> redistributing the weights yourself, confirm the terms cover your case
|
| 369 |
+
> rather than assuming they do.
|
| 370 |
+
|
| 371 |
## License
|
| 372 |
|
| 373 |
s1-mini is released under Apache 2.0, which it inherits from Qwen3-0.6B.
|