Text Generation
Transformers
Safetensors
Chinese
English
qwen3
transcript-normalization
chinese
qwen3-asr
code-switching
full-finetuning
numbered-lists
numeric-normalization
conversational
text-generation-inference
Run this model with HF Jobs
Run WIlfLin/S1-mini-Chinese on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/WIlfLin/S1-mini-Chinese. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/WIlfLin/S1-mini-Chinese on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/WIlfLin/S1-mini-Chinese. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/WIlfLin/S1-mini-Chinese. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use WIlfLin/S1-mini-Chinese with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use WIlfLin/S1-mini-Chinese with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="WIlfLin/S1-mini-Chinese") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("WIlfLin/S1-mini-Chinese") model = AutoModelForCausalLM.from_pretrained("WIlfLin/S1-mini-Chinese", 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use WIlfLin/S1-mini-Chinese with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "WIlfLin/S1-mini-Chinese" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "WIlfLin/S1-mini-Chinese", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/WIlfLin/S1-mini-Chinese
- SGLang
How to use WIlfLin/S1-mini-Chinese 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 "WIlfLin/S1-mini-Chinese" \ --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": "WIlfLin/S1-mini-Chinese", "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 "WIlfLin/S1-mini-Chinese" \ --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": "WIlfLin/S1-mini-Chinese", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use WIlfLin/S1-mini-Chinese with Docker Model Runner:
docker model run hf.co/WIlfLin/S1-mini-Chinese
Clarify token metrics and model-only formatting behavior
Browse filesFiles changed (3)
- README.md+17-1
- evaluation-summary.json+12-11
- token-metrics.jsonAdded+86
58 unmodified lines5960616263646558 unmodified lines词法指标删除标点,保留大小写、数字、否定和词序。它反映与参考文本的一致程度,不等于人工语义正确率。英文集侧重复杂改口,不能代表所有日常英文口述。中文清理改善伴随不修改参考上的退化;不能假定所有编辑均正确。外部后处理服务的保护规则会改变最终结果。部署默认使用较宽松的 `balanced` 校验,允许更多删词、重复清理和英文语序整理;保留数字、否定、代码、引用与明确改口最终内容检查。`strict` 是更保守的可选策略。**这些校验不是模型权重的一部分**;本仓库的推理示例直接输出模型结果。原始模型分数不能直接当作整条部署流水线的成绩。完整数值与范围见 [`evaluation-summary.json`](evaluation-summary.json)。## 推理示例58 unmodified lines596061626364656667686970717273747576777879808158 unmodified lines词法指标删除标点,保留大小写、数字、否定和词序。它反映与参考文本的一致程度,不等于人工语义正确率。英文集侧重复杂改口,不能代表所有日常英文口述。中文清理改善伴随不修改参考上的退化;不能假定所有编辑均正确。外部后处理服务的保护规则会改变最终结果。部署默认使用较宽松的 `balanced` 校验,允许更多删词、重复清理和英文语序整理;保留数字、否定、代码、引用与明确改口最终内容检查。`strict` 是更保守的可选策略。**这些校验不是模型权重的一部分**;本仓库的推理示例直接输出模型结果。原始模型分数不能直接当作整条部署流水线的成绩。校验拒绝时直接返回原始转写,不做额外规则改写、CT 标点或规则排版。完整数值与范围见 [`evaluation-summary.json`](evaluation-summary.json)。### Token accuracy 的单独核对上游公开报告的 94.8% 来自其 7519 条英文测试和 Q4_K_M GGUF。公开模型卡/文章未给出 token 定义、对齐、聚合方式或评分脚本,因此不能把下面结果称作官方同口径复现。在相同 100 条英文 Disfl-QA、相同 tokenizer 和提示格式下,我们另外计算了:| 明确定义的本地指标 | 原版 S1-mini | S1-mini-Chinese || --- | ---: | ---: || 教师强制目标 token 准确率,不含 EOS | 90.25% | 94.63% || 自由生成 token 编辑准确率 | 61.15% | 86.77% |教师强制指标在每步提供真实的先前目标 token,只统计目标文字,不计 system/user/control 提示词;按所有目标 token 微平均。我们的计数是 1252/1323。它不是自由生成整句正确率。自由生成指标为 `1 - sum(token Levenshtein distance) / sum(reference token count)`,使用完整输出的同一 tokenizer ID,保留标点和大小写,不含 EOS。它也不是官方已确认的公式。完整定义和计数见 [`token-metrics.json`](token-metrics.json)。## 推理示例
58 unmodified lines596061626364656667686970717273747576777 unmodified lines85868788899091929394959697989958 unmodified lines"truncated": 0}},"balanced_postprocessor_offline": {"all": {"n": 400,"lexical_exact": 208,"exact": 86,"cer": 0.214497528830313,"truncated": 0},"test_en": {"n": 100,"lexical_exact": 34,"exact": 32,"cer": 0.28697487051601767,"truncated": 0},"test_identity": {7 unmodified lines"n": 200,"lexical_exact": 80,"exact": 14,"cer": 0.1737271667314419,"truncated": 0}},"scope": "400 frozen public text rows: Chinese cleanup 200, Chinese identity 100, English Disfl-QA 100; lexical CER strips punctuation, not semantic accuracy. Postprocessor is separately calibrated and not an independent blind evaluation.","test_manifest": {"rows": 400,"seed": 20261107,"sha256": "55d21ed3b91bd19093f6e4620d76565ec36afd9ad3c32a05c95f1e43a785fd88","selection": "200 Chinese cleanup + 100 disjoint Chinese target-to-target identity + 100 English cleanup, official test splits only. No subsequent tuning on this test."}}58 unmodified lines59606162636465666768697071727374757677787980818283847 unmodified lines929394959697989910058 unmodified lines"truncated": 0}},"scope": "400 frozen public text rows: Chinese cleanup 200, Chinese identity 100, English Disfl-QA 100; lexical CER strips punctuation, not semantic accuracy. Postprocessor is separately calibrated and not an independent blind evaluation.","test_manifest": {"rows": 400,"seed": 20261107,"sha256": "55d21ed3b91bd19093f6e4620d76565ec36afd9ad3c32a05c95f1e43a785fd88","selection": "200 Chinese cleanup + 100 disjoint Chinese target-to-target identity + 100 English cleanup, official test splits only. No subsequent tuning on this test."},"balanced_guard_raw_fallback_offline": {"all": {"n": 400,"lexical_exact": 208,"exact": 86,"cer": 0.2158154859967051,"truncated": 0},"test_en": {"n": 100,"lexical_exact": 34,"exact": 32,"cer": 0.28850949549203914,"truncated": 0},"test_identity": {7 unmodified lines"n": 200,"lexical_exact": 80,"exact": 14,"cer": 0.17528177225029148,"truncated": 0}},"token_metric_definitions": "token-metrics.json; official vendor formula and dataset unavailable, not a strict reproduction."}
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586{ "official_comparability": "Not established: official 7519-case dataset, tokenization, alignment, aggregation and scoring script are not published in the cited model card/blog. These are explicitly defined local metrics.", "data": "Same frozen 400 public text cases used for both models; categories English Disfl-QA 100, Chinese cleanup 200, Chinese identity 100.", "definitions": { "teacher_forced": "Correct argmax next-token predictions at target positions, conditioned on gold preceding target tokens; excludes system/user/control tokens. Both including and excluding target EOS are reported. Micro aggregation.", "generated_token_edit_accuracy": "1 - total Levenshtein edits / total reference token count, using shared Qwen3/S1 tokenizer IDs on full generated/reference strings; preserves case and punctuation; includes no EOS. This is not sentence accuracy or a verified definition of vendor token accuracy." }, "models": { "upstream_s1_mini": { "test_zh": { "reference_generated_tokens": 1576, "generated_edit_distance": 633, "cases": 200, "target_tokens_including_eos": 1776, "correct_including_eos": 1311, "target_tokens_excluding_eos": 1576, "correct_excluding_eos": 1234, "teacher_forced_accuracy_including_eos": 0.7381756756756757, "teacher_forced_accuracy_excluding_eos": 0.7829949238578681, "generated_token_edit_accuracy": 0.5983502538071066 }, "test_identity": { "reference_generated_tokens": 780, "generated_edit_distance": 72, "cases": 100, "target_tokens_including_eos": 880, "correct_including_eos": 811, "target_tokens_excluding_eos": 780, "correct_excluding_eos": 770, "teacher_forced_accuracy_including_eos": 0.9215909090909091, "teacher_forced_accuracy_excluding_eos": 0.9871794871794872, "generated_token_edit_accuracy": 0.9076923076923077 }, "test_en": { "reference_generated_tokens": 1323, "generated_edit_distance": 514, "cases": 100, "target_tokens_including_eos": 1423, "correct_including_eos": 1290, "target_tokens_excluding_eos": 1323, "correct_excluding_eos": 1194, "teacher_forced_accuracy_including_eos": 0.9065354884047786, "teacher_forced_accuracy_excluding_eos": 0.9024943310657596, "generated_token_edit_accuracy": 0.6114890400604687 } }, "s1_mini_chinese": { "test_zh": { "reference_generated_tokens": 1576, "generated_edit_distance": 505, "cases": 200, "target_tokens_including_eos": 1776, "correct_including_eos": 1362, "target_tokens_excluding_eos": 1576, "correct_excluding_eos": 1286, "teacher_forced_accuracy_including_eos": 0.7668918918918919, "teacher_forced_accuracy_excluding_eos": 0.815989847715736, "generated_token_edit_accuracy": 0.6795685279187818 }, "test_identity": { "reference_generated_tokens": 780, "generated_edit_distance": 73, "cases": 100, "target_tokens_including_eos": 880, "correct_including_eos": 809, "target_tokens_excluding_eos": 780, "correct_excluding_eos": 771, "teacher_forced_accuracy_including_eos": 0.9193181818181818, "teacher_forced_accuracy_excluding_eos": 0.9884615384615385, "generated_token_edit_accuracy": 0.9064102564102564 }, "test_en": { "reference_generated_tokens": 1323, "generated_edit_distance": 175, "cases": 100, "target_tokens_including_eos": 1423, "correct_including_eos": 1348, "target_tokens_excluding_eos": 1323, "correct_excluding_eos": 1252, "teacher_forced_accuracy_including_eos": 0.9472944483485594, "teacher_forced_accuracy_excluding_eos": 0.9463340891912321, "generated_token_edit_accuracy": 0.8677248677248677 } } }}README.md+17-1
evaluation-summary.json+12-11
token-metrics.jsonAdded+86