shibing624 / MedicalGPT

MedicalGPT: Training Your Own Medical GPT Model with ChatGPT Training Pipeline. 训练医疗大模型,实现了包括增量预训练(PT)、有监督微调(SFT)、RLHF、DPO、ORPO。
Apache License 2.0
3.34k stars 499 forks source link

如果Stage1,2选用ChatGLM-6B作为基座model,Stage3训练奖励模型这里怎么设置呢? #36

Closed xuanxixi closed 1 year ago

xuanxixi commented 1 year ago

image

shibing624 commented 1 year ago

用bert就行

boxter007 commented 1 year ago

用bert就行

直接改成bert就报错了: The tokenizer class you load from this checkpoint is not the same type as the class this function is called from. It may result in unexpected tokenization. The tokenizer class you load from this checkpoint is 'ChatGLMTokenizer'. The class this function is called from is 'BertTokenizer'. tokenizer = tokenizer_class.from_pretrained(tokenizer_name_or_path, tokenizer_kwargs) File "/usr/local/anaconda3/envs/hj-glm6b2/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1825, in from_pretrained return cls._from_pretrained( File "/usr/local/anaconda3/envs/hj-glm6b2/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1988, in _from_pretrained tokenizer = cls(init_inputs, init_kwargs) File "/usr/local/anaconda3/envs/hj-glm6b2/lib/python3.10/site-packages/transformers/models/bert/tokenization_bert.py", line 213, in init if not os.path.isfile(vocab_file): File "/usr/local/anaconda3/envs/hj-glm6b2/lib/python3.10/genericpath.py", line 30, in isfile Traceback (most recent call last): File "/home/haojing/code/js/Guarantee_Intelligence/train/MedicalGPT/reward_modeling.py", line 645, in main() File "/home/haojing/code/js/Guarantee_Intelligence/train/MedicalGPT/reward_modeling.py", line 416, in main tokenizer = tokenizer_class.from_pretrained(tokenizer_name_or_path, tokenizer_kwargs) File "/usr/local/anaconda3/envs/hj-glm6b2/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1825, in from_pretrained st = os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType return cls._from_pretrained( File "/usr/local/anaconda3/envs/hj-glm6b2/lib/python3.10/site-packages/transformers/tokenization_utils_base.py", line 1988, in _from_pretrained tokenizer = cls(init_inputs, init_kwargs) File "/usr/local/anaconda3/envs/hj-glm6b2/lib/python3.10/site-packages/transformers/models/bert/tokenization_bert.py", line 213, in init if not os.path.isfile(vocab_file): File "/usr/local/anaconda3/envs/hj-glm6b2/lib/python3.10/genericpath.py", line 30, in isfile st = os.stat(path) TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

shibing624 commented 1 year ago

model_type = bert

shibing624 commented 1 year ago

same to https://github.com/shibing624/MedicalGPT/issues/28