GithubHelp home page GithubHelp logo

Comments (4)

shibing624 avatar shibing624 commented on July 27, 2024

用bert就行

from medicalgpt.

boxter007 avatar boxter007 commented on July 27, 2024

用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

from medicalgpt.

shibing624 avatar shibing624 commented on July 27, 2024

model_type = bert

from medicalgpt.

shibing624 avatar shibing624 commented on July 27, 2024

same to #28

from medicalgpt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.