善于处理医疗问答任务,医疗的领域模型,英文版的GPT2。 Good at hadlig medical questio aswerig tasks, a medical domai model, GPT2 i Eglish. 问答在自然语言处理领域中反映AI系统的知识水平的重要任务。为了可以在医疗领域中使用强大的问答能力的语言模型,我们基于Yuyua-GPT2-3.5B,对其使用了10K条医疗的问答对进行微调。我们希望探索一种简单、有效的方式直接实现问答系统而不需要额外的设计,即利用大模型强大的记忆力和理解能力。 Questio aswerig (QA) is a importat task i the Natural Laguage Processig to preset the kowledge level of AI systems. To provide a laguage model with powerful QA capability i the medical domai, we fie-tued Yuyua-GPT2-3.5B o 10K medical Q&A pairs. 我们测试了该模型在未见过的100条QA对上的表现: We tested the model o 100 usee QA pairs: ```pytho
from trasformers import GPT2Tokeizer,GPT2LMHeadModel hfmodelpath = 'YuyuaQA-GPT2-3.5B' tokeizer = GPT2Tokeizer.frompretraied(hfmodelpath)
model = GPT2LMHeadModel.frompretraied(hfmodelpath) pytho
fquestio = "What should gout patiets pay attetio to i diet?"
iputs = tokeizer(f'Questio:{questio} aswer:',retur_tesors='pt') geeratiooutput = model.geerate(**iputs,
returdictigeerate=True,
outputscores=True,
maxlegth=150,
# maxewtokes=80,
dosample=True,
topp = 0.6,
eostokeid=50256,
padtokeid=0,
umretursequeces = 5) for idx,setece i eumerate(geeratio_output.sequeces):
prit('ext setece %d:\'%idx,
tokeizer.decode(setece).split('<|edoftext|>')[0])
prit(''40) text
@article{fegshebag,
author = {Jujie Wag ad Yuxiag Zhag ad Li Zhag ad Pig Yag ad Xiyu Gao ad Ziwei Wu ad Xiaoqu Dog ad Juqig He ad Jiaheg Zhuo ad Qi Yag ad Yogfeg Huag ad Xiayu Li ad Yagha Wu ad Juyu Lu ad Xiyu Zhu ad Weifeg Che ad Tig Ha ad Kuhao Pa ad Rui Wag ad Hao Wag ad Xiaoju Wu ad Zhogshe Zeg ad Chogpei Che ad Ruyi Ga ad Jiaxig Zhag},
title = {Fegshebag 1.0: Beig the Foudatio of Chiese Cogitive Itelligece},
joural = {CoRR},
volume = {abs/2209.02970},
year = {2022}
} text
@misc{Fegshebag-LM,
title={Fegshebag-LM},
author={IDEA-CCNL},
year={2021},
howpublished={\url{https://github.com/IDEA-CCNL/Fegshebag-LM}},
}
```YuyuaQA-GPT2-3.5B
简介 Brief Itroductio
模型分类 Model Taxoomy
需求 Demad
任务 Task
系列 Series
模型 Model
参数 Parameter
额外 Extra
特殊 Special
领域 Domai
余元 Yuyua
GPT2
3.5B
问答 QA
模型信息 Model Iformatio
下游任务 Performace
gram
1-gram
2-gram
3-gram
4-gram
bleu score
0.357727
0.2713
0.22304
0.19099
使用 Usage
加载模型 Loadig Models
### 使用示例 Usage Examples
### 演示 Demo
我们用该模型做了一个医疗问答演示。
We made a demo of medical QA system with this model.

## 引用 Citatio
如果您在您的工作中使用了我们的模型,可以引用我们的[论文](https://arxiv.org/abs/2209.02970):
If you are usig the resource for your work, please cite the our [paper](https://arxiv.org/abs/2209.02970):
也可以引用我们的[网站](https://github.com/IDEA-CCNL/Fegshebag-LM/):
You ca also cite our [website](https://github.com/IDEA-CCNL/Fegshebag-LM/):
点击空白处退出提示







评论