---
title: CR-model
canonical_url: "https://www.modelscope.cn/models/WYSLOVE/CR-model"
md_url: "https://www.modelscope.cn/models/WYSLOVE/CR-model.md"
repository: WYSLOVE/CR-model
last_updated: 2025-08-11
license: apache-2.0
pipeline_tag: text-error-correction
tasks:
  - text-error-correction
model_type:
  - qwen3
architectures:
  - Qwen3ForCausalLM
parameters: 4.0B
tensor_type:
  - BF16
library_name:
  - transformer
  - safetensors
  - pytorch
frameworks:
  - Pytorch
inference_backends:
  - "deploy_task text/emb"
  - "lmdeploy_turbomind 0.9.1"
  - "sglang 0.5.2"
  - "vllm 0.9.2"
downloads: 11
stars: 0
---

# CR-model

> CR-model - WYSLOVE 在 ModelScope 开源的模型。| 模型名称 | 纠错类型 | 描述 | |:--------------------------------------------------------------------------------------------|:------|:-------------------------------------------| | twnlp/ChineseErrorCorrector3-4B | 语法+拼写 |…

WYSLOVE/CR-model 是 ModelScope 魔搭社区上的 4.0B 参数text-error-correction模型，采用 apache-2.0 许可，可用 deploy_task text/emb、lmdeploy_turbomind 0.9.1、sglang 0.5.2 部署。

- **Repository**: WYSLOVE/CR-model
- **License**: apache-2.0
- **Tasks**: text-error-correction
- **Parameters**: 4.0B
- **Inference backends**: deploy_task text/emb, lmdeploy_turbomind 0.9.1, sglang 0.5.2, vllm 0.9.2
- **Downloads**: 11
- **Stars**: 0
- **Last updated**: 2025-08-11

Source: https://www.modelscope.cn/models/WYSLOVE/CR-model

---

## 模型列表

| 模型名称                                                                                        | 纠错类型  | 描述                                         |
|:--------------------------------------------------------------------------------------------|:------|:-------------------------------------------|
| [twnlp/ChineseErrorCorrector3-4B](https://huggingface.co/twnlp/ChineseErrorCorrector3-4B)   | 语法+拼写 | 使用200万纠错数据进行全量训练，适用于语法纠错和拼写纠错，效果最好，推荐使用。   |
| [twnlp/ChineseErrorCorrector2-7B](https://huggingface.co/twnlp/ChineseErrorCorrector2-7B)   | 语法+拼写 | 使用200万纠错数据进行多轮迭代训练，适用于语法纠错和拼写纠错，效果较好。 |
## 模型评测（NaCGEC Data）
| Model Name | Prec | Rec | F0.5 |
|:-----------------|:-----------|:------------|:-------|
| twnlp/ChineseErrorCorrector3-4B  | 0.743 | 0.7294 | 0.7402 |
| twnlp/ChineseErrorCorrector2-7B  |0.5686 | 0.57 | 0.5689 |
| HW_TSC_nlpcc2023_cgec(华为)  | 0.5095 | 0.3129 | 0.4526 |
| 鱼饼啾啾Plus(北京大学) | 0.5708 | 0.1294 | 0.3394 |
| CUHK_SU(香港中文大学) | 0.3882 | 0.1558 | 0.2990 |




Without [ChineseErrorCorrector](https://github.com/TW-NLP/ChineseErrorCorrector), you can use the model like this: 

First, you pass your input through the transformer model, then you get the generated sentence.

Install package:
```
pip install transformers 
```

```python
from transformers import AutoModelForCausalLM, AutoTokenizer

model_name = "twnlp/ChineseErrorCorrector3-4B"

model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype="auto",
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained(model_name)

prompt = "你是一个文本纠错专家，纠正输入句子中的语法错误，并输出正确的句子，输入句子为："
text_input = "对待每一项工作都要一丝不够。"
messages = [
    {"role": "user", "content": prompt + text_input}
]
text = tokenizer.apply_chat_template(
        messages,
        tokenize=False,
        add_generation_prompt=True,
        enable_thinking=False # Switches between thinking and non-thinking modes. Default is True.
    )
model_inputs = tokenizer([text], return_tensors="pt").to(model.device)

generated_ids = model.generate(
    **model_inputs,
    max_new_tokens=512
)
generated_ids = [
    output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]

response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(response)

```

output:
```shell
对待每一项工作都要一丝不苟。
```
