Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chinese-Vicuna-medical 可以直接使用吗?如何直接使用 #105

Closed
rdaim opened this issue Apr 24, 2023 · 3 comments
Closed

Chinese-Vicuna-medical 可以直接使用吗?如何直接使用 #105

rdaim opened this issue Apr 24, 2023 · 3 comments

Comments

@rdaim
Copy link

rdaim commented Apr 24, 2023

Chinese-Vicuna-medical 可以直接使用吗?如何直接使用

@Facico
Copy link
Owner

Facico commented Apr 24, 2023

和其他lora模型一样加载就行了

@bash99
Copy link

bash99 commented Apr 28, 2023

我加载了测试后,效果没有 performance-medical.md 那样啊?

lora用的是 https://huggingface.co/Chinese-Vicuna/Chinese-Vicuna-continue-finetune-7epoch-cMedQA2
llama-7b-hf权重是 两个bin文件的版本,9.3G和3.3G

937521a4055177a7443e601c87adc23299533c80299f8637d9e35000b726e4ef  pytorch_model-00001-of-00002.bin
20e0016147f3373ed154e65d65865d4988cadfa128883425dc392db19b50cc71  pytorch_model-00002-of-00002.bin

改了chat.py,启动如下

 python chat.py --model_path /DaTa/llama-7b-hf --lora_path /DaTa/chinese-vic-med/Chinese-Vicuna-continue-finetune-7epoch-cMedQA2 --use_local 1 --use_typewriter 0 --share_link 0

debug最后的输入和输出(tokenizer之前):
input

The following is a conversation between an AI assistant called Assistant and a human user called User.

### Instruction:
扮演一个专业的医生并回答病人的问题。
病人:扁桃体炎引起的发烧该怎么治疗

### Response:

output(去掉input重复的部分)

1.这种情况建��你可以口服抗��片,��适量多����外擦止��痒
2.对于扁桃体炎��症是由于感染或其他原因引起的局部炎��症,主要表现为红肿、皮疹、瘙��、水肿等����性皮炎形式,常在夏��年初到秋��之间持续而不消除,如果长期不及时治��则会导致皮��痕变成大��������痣�������������������������������������������������������������

另外,如果在vicuna 13b 1.1上训练,是不是中文效果也会可以?

@Facico
Copy link
Owner

Facico commented May 4, 2023

你这个乱码问题可能在加载任何中文的lora模型都会有,可能有以下原因:
1、tokenizer和sentencepiece版本的问题,这个问题可以参考我们的提供的配置
2、显卡和8bit不兼容的问题。比如V100就不太兼容(可以到仓库找相关的V100的问题)(这个问题可以用纯cpu推理的方式来排查) 解决方法是推理的时候把8bit相关的去掉改成fp16,相关的issue有说明
在vicuna 13b 1.1上训练应该也会有不错的效果

@Facico Facico closed this as completed Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants