-
Notifications
You must be signed in to change notification settings - Fork 419
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
generate: AttributeError: 'NoneType' object has no attribute 'eval' #70
Comments
在进行
就好像是 |
peft版本的问题 |
@xqmmy @Tian14267 这个问题解决了嘛 遇到类似的问题,peft用哪个版本呢,用的是推荐版本 |
#51 看下这个 |
@yanxp |
用了最新的版本PEFT还是同样的错误。 (textgen) [shiqi@nqs-server Chinese-Vicuna]$ ./generate.sh
bin /home/shiqi/anaconda3/envs/textgen/lib/python3.10/site-packages/bitsandbytes/libbitsandbytes_cuda117.so
Namespace(model_path='decapoda-research/llama-7b-hf', lora_path='Chinese-Vicuna/Chinese-Vicuna-lora-7b-belle-and-guanaco', use_typewriter=0, use_local=0)
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 'LLaMATokenizer'.
The class this function is called from is 'LlamaTokenizer'.
Chinese-Vicuna/Chinese-Vicuna-lora-7b-belle-and-guanaco/adapter_model.bin
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████| 33/33 [00:12<00:00, 2.68it/s]Traceback (most recent call last):
File "/mnt/d/tools/nlp/Chinese-Vicuna/generate.py", line 110, in <module>
model.eval()
AttributeError: 'NoneType' object has no attribute 'eval' 好像是Pytorch 2.0的,问题,换成1.13就正常了。 |
@mrbemani 但是不应该是最新版吧,这个问题就是因为PEFT一直在更新导致的问题。所以我们现在是固定了以前的一个版本。 |
是最新版的Chinese-Vicuna,标点符号忘记打了,哈哈 |
@mrbemani 那你可以把peft版本卸了重装一下
|
我在运行
generate.sh
的时候,提示报错:我检查了代码,问题出在这里:
当把这些注释之后,就可以了。但是却无法使用
stream_generate
。请问这是啥情况The text was updated successfully, but these errors were encountered: