Instructions to use zai-org/chatglm2-6b-int4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/chatglm2-6b-int4 with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zai-org/chatglm2-6b-int4", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download quantization.py from zai-org/chatglm2-6b-int4: direct link, hf CLI and curl.
- Browser
- Download file 2.61 MB
-
https://huggingface.co/zai-org/chatglm2-6b-int4/resolve/main/quantization.py
- Command line
-
hf download hf://zai-org/chatglm2-6b-int4/quantization.py
-
curl -L -o quantization.py https://huggingface.co/zai-org/chatglm2-6b-int4/resolve/main/quantization.py
2.61 MB
File too large to display, you can check the raw version instead.