Instructions to use zai-org/chatglm-6b-int4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/chatglm-6b-int4 with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zai-org/chatglm-6b-int4", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
设置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
要使用transformers 4.42.4,而且trust_remote_code必须为true