-
Notifications
You must be signed in to change notification settings - Fork 24
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
Message='BaiChuanTokenizer' object has no attribute 'sp_model' #9
Comments
deal with change transformers==4.33.1 |
尝试降级transformers==4.33.3 或者修改tokenization_baichuan.py,super() 修改到最后执行
|
我仍然抛出这个异常 |
在魔塔降低版本之后需要重启免费的服务器内核,来保证生效,我重启后可以运行 |
尝试新模型Sunsimiao-7B的推理代码:
|
新的代码运行不但没有错误,推理的速度也快了很多,但是我看不出他和平常的LLM的区别,类似 GPT-4o |
甚至GPT-4o的返回更加令人容易理解和接受 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Message='BaiChuanTokenizer' object has no attribute 'sp_model'
Source=C:\Users\Administrator.cache\huggingface\modules\transformers_modules\Sunsimiao\tokenization_baichuan.py
StackTrace:
File "C:\Users\Administrator.cache\huggingface\modules\transformers_modules\Sunsimiao\tokenization_baichuan.py", line 104, in vocab_size
return self.sp_model.get_piece_size()
File "C:\Users\Administrator.cache\huggingface\modules\transformers_modules\Sunsimiao\tokenization_baichuan.py", line 108, in get_vocab (Current frame)
vocab = {self.convert_ids_to_tokens(i): i for i in range(self.vocab_size)}
File "C:\Users\Administrator.cache\huggingface\modules\transformers_modules\Sunsimiao\tokenization_baichuan.py", line 74, in init
super().init(
File "C:\Users\Administrator.cache\modelscope\modelscope_modules\Sunsimiao\ms_wrapper.py", line 41, in init
self.tokenizer = AutoTokenizer.from_pretrained(model_dir, trust_remote_code=True)
File "C:\Users\Administrator.cache\modelscope\modelscope_modules\Sunsimiao\ms_wrapper.py", line 20, in init
model = SunsimiaoTextGeneration(model) if isinstance(model, str) else model
File "C:\Users\Administrator\source\repos\Sunsimiao\scripts\inference_ms.py", line 4, in
pipe = pipeline(task=Tasks.text_generation,
how can i deal?
The text was updated successfully, but these errors were encountered: