Qwen3 ASR Refiner is a family of models that converts Chinese ASR transcripts and other spoken-style text into
concise, natural written Chinese while preserving the original meaning. All variants are fine-tuned on
Aye10032/WenetSpeech-Formal-Text with the same task definition and training recipe.
The LoRA adapter has been merged into the base model. This repository contains complete BF16 Transformers weights and
can be loaded directly without PEFT.
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model_id = 'Aye10032/Qwen3-ASR-Refiner-4B'
4tokenizer = AutoTokenizer.from_pretrained(model_id)
5model = AutoModelForCausalLM.from_pretrained(model_id, dtype='auto', device_map='auto')
6
7messages = [
8 {
9 'role': 'system',
10 'content': '将中文口语转写改写为正式、自然的书面语。保持原意,不添加原文没有的信息,只输出改写后的文本。',
11 },
12 {'role': 'user', 'content': '呃这个事情吧我们之后再讨论一下。'},
13]
14text = tokenizer.apply_chat_template(
15 messages,
16 tokenize=False,
17 add_generation_prompt=True,
18 enable_thinking=False,
19)
20inputs = tokenizer(text, return_tensors='pt').to(model.device)
21outputs = model.generate(**inputs, max_new_tokens=256, do_sample=False)
22answer = tokenizer.decode(outputs[0, inputs.input_ids.shape[1]:], skip_special_tokens=True)
23print(answer)
The source dataset is licensed under CC BY 4.0. Refer to its dataset card for attribution and citation information.