Run this model with HF Jobs
Run zai-org/chatglm-6b-int4 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/zai-org/chatglm-6b-int4. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/zai-org/chatglm-6b-int4 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
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:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zai-org/chatglm-6b-int4", trust_remote_code=True, device_map="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
要使用transformers 4.42.4,而且trust_remote_code必须为true