Views
No views yet
bert-chinese-pro 是一个增强版的中文 BERT 预训练语言模型,基于更大规模的架构和更丰富的中文语料构建。该模型相较于 bert-chinese 具备更强的表达能力,在多个中文下游任务上表现出色,适用于文本分类、语义匹配、自然语言推理等任务。TigerResearch/pretrain_zh。| Task | bert-base-chinese | bert-chinese | bert-chinese-pro (本模型) |
|---|---|---|---|
| iflytek | 58.18 | 59.25 | 60.31 |
| tnews | 56.59 | 56.79 | 57.02 |
| afqmc | 71.64 | 71.34 | 72.18 |
| cmnli | 79.47 | 80.17 | 81.08 |
✅ 本模型在 CLUE 基准的多个任务上均取得了优于前代模型的表现,包括中文文本分类(iflytek, tnews)、语义匹配(afqmc)、自然语言推理(cmnli)等。
pip install transformers1from transformers import BertTokenizer, BertForMaskedLM
2
3# 加载 tokenizer
4tokenizer = BertTokenizer.from_pretrained("51-wannt-to-be/bert-chinese-pro")
5
6# 加载模型
7model = BertForMaskedLM.from_pretrained("51-wannt-to-be/bert-chinese-pro")
8
9# 示例输入
10text = "今天天气很好,我们去[MASK]吧!"
11inputs = tokenizer(text, return_tensors="pt")
12outputs = model(**inputs)
13
14# 获取预测结果
15logits = outputs.logits📌 若你使用的是分类、问答、NER 等下游任务,可替换为BertForSequenceClassification、BertForQuestionAnswering、BertForTokenClassification等模型类加载。
pytorch_model.bin:PyTorch 格式的模型权重config.json:模型结构配置(24层、1024维)vocab.txt:中文词表tokenizer_config.json:分词器配置special_tokens_map.json:特殊符号映射README.md:模型说明文档bert-chinese-pro-cls、bert-chinese-pro-ner 等)。欢迎继续交流 😄