Instructions to use zai-org/glm-4-9b-chat with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/glm-4-9b-chat with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zai-org/glm-4-9b-chat", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit History
-
Update modeling_chatglm.py for transformers 4.49 compatibility (#89)
zR +1: sylwia-kuros Verified signature- Update modeling_chatglm.py (de4f7b2abca578655fafe6fed714c08c8edbde9a) Co-authored-by: Sylwia Kuros <sylwia-kuros@users.noreply.huggingface.co>bd8234f
-
Update README.md
zRVerified signature1ff7705
-
fix padding
zReb55a44 -
fix padding
zR4f82091
-
Update README.md (#76)
zR +1: euzero
Verified signature- Update README.md (9198053a1a02ed5ad8a2723869eb39679bda24ef) Co-authored-by: euzero <euzero@users.noreply.huggingface.co>cd8a4ef
-
Update tokenization_chatglm.py (#72)
zR +1: JeremyHibiki
Verified signature- Update tokenization_chatglm.py (bc26b66c0862517e6f7c28337206ba5acf1fd206) Co-authored-by: Jeremy JIANG <JeremyHibiki@users.noreply.huggingface.co>f6e0743
-
support transformers 4.44
zRaae8bd7
-
report
zRc24133c
-
fix
zR76f3474 -
readme
zRe824789 -
transformer 4.42.4 upgrade
zR12372fe
-
Merge branch 'main' of https://huggingface.co/THUDM/glm-4-9b-chat
duzx16f5ce116 -
Fix past_key_values
duzx16047c657
-
Merge branch 'main' of hf.co:THUDM/glm-4-9b-chat
zR0441900 -
fix import error of flash attn
zRdf6a8f3
-
Update chat template
duzx1627f8067 -
flash_attention_2 (#51)
Verified signature- Add eager and sdpa attention implementations (835c717962e2632f116db776a087970c22e4a6c1) - Add support for flash attention 2 (a7eaddd0ac0e89cf779dce9596635369178e15cf) - Merge branch 'main' into attention (29038ea19de709ec833a7ad9e86e838e274194f2)10b3f35
-
Merge branch 'main' of https://huggingface.co/THUDM/glm-4-9b-chat
duzx161c2a801 -
Add output_attentions for ChatGLMForSequenceClassification
duzx16f07eca1
-
fix convert_tokens_to_string
zR547dc25 -
fix readme
zR1b77b8d -
fix bug of config
zRfix bug of config fix bug of config5e8eeb1
-
add chat_template (#31)
zR +1: jinmingyi Verified signature- update template, remove apply_chat_template, use default apply_chat_template (972e7b43b613e3a8ecc296fbdec4b6a2950e31ce) - fix metadata (7c0351dfc6bf08251d0359b3393c46df97fa33ef) - recover as comment (8993ee72c9f9083c99f9469b9dedfd43de46b566) - Merge main (d99af46f74504e2ccfa50e8806f887407335c176) - update template 你是一个名为 GhatGLM 的人工智能助手 (eb00b28fa1326da9e900a43400d50de18255f0f0) Co-authored-by: Mingyi Jin <jinmingyi@users.noreply.huggingface.co>7375a2b -
Update apply_chat_template
duzx16d493e51 -
Merge branch 'main' of https://huggingface.co/THUDM/glm-4-9b-chat
duzx16dba7772 -
Fix default dtype for classification head
duzx160deb1dd
-
Update tokenization_chatglm.py (#7)
zR +1: ksuriuri
Verified signature- Update tokenization_chatglm.py (f3c1d0fc3afed0a8e1b3b7c94dcb9ff7ce6c0418) Co-authored-by: haoyuanhuang <ksuriuri@users.noreply.huggingface.co>75792d7
-
disable `torch.jit` when using Ascend NPUs (#20)
zR +1: statelesshz
Verified signature- disable `torch.jit` when using Ascend NPUs (33d113454549f9ece51919bc6136d329887e9aa0) Co-authored-by: Huazhong <statelesshz@users.noreply.huggingface.co>7d93f12
-
Update LICENSE
zRVerified signature6f060dc
-
Update README.md (#26)
zR +1: xianbao
Verified signature- Update README.md (731ca7fd937cff9f2ae5f01de85a0c8bf21df6fa) Co-authored-by: Tiezhen WANG <xianbao@users.noreply.huggingface.co>c938f44
-
Fix classification model
duzx1612c8049 -
readme
Ubuntucbc9aaf -
english readme
Ubuntu368f865 -
Update README.md
zRVerified signature269b8ba
-
fix tensor shape error when torch version less than 2 #4 (#9)
zR +1: hiyouga Verified signature- Update modeling_chatglm.py (7f3828bd25a55e4d731486947abc3a8ae1f835bd) - Update modeling_chatglm.py (299b57010578be9df80bdfbbbcb436ee64b09693) Co-authored-by: Yaowei Zheng <hiyouga@users.noreply.huggingface.co>8dc9e30 -
fixes https://github.com/THUDM/GLM-4/issues/22 (#5)
zR +1: hiyouga Verified signature- Update modeling_chatglm.py (7122f9503a0d915971b96adad7efad64e3609177) Co-authored-by: Yaowei Zheng <hiyouga@users.noreply.huggingface.co>0891486 -
Update README.md
zRVerified signature6324425 -
Update README.md
zRVerified signatureb84dc74
-
Update README.md
Verified signature3caf9b5 -
first commit
Ubuntu4b556ad -
initial commit
zRVerified signaturefc5ff92