设置trust_remote_code=False运行时报错

#12
by michael234 - opened

本地下载了模型和分词器,设置trust_remote_code=False运行时报错如下
File "/home/cp_pap/aigc/lib/python3.10/site-packages/transformers/models/auto/tokenization_auto.py", line 624, in from_pretrained
raise ValueError(
ValueError: Loading THUDM/chatglm-6b-int4 requires you to execute the tokenizer file in that repo on your local machine. Make sure you have read the code there to avoid malicious use, then set the option trust_remote_code=True to remove this error.
使用的transformers==4.26.1

This comment has been hidden
Knowledge Engineering Group (KEG) & Data Mining at Tsinghua University org
edited Jul 21

要使用transformers 4.42.4,而且trust_remote_code必须为true

Sign up or log in to comment