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:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zai-org/glm-4-9b-chat", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update tokenization_chatglm.py
#72
by JeremyHibiki - opened
TensorType should come from transformers.utils instead of torch. Otherwise, the tokenizer can't be used alone in an environment without PyTorch installed, where we only need to count tokens.
tokenization_chatglm.py 有何用途,
ZHANGYUXUAN-zR changed pull request status to merged
For those asking about API access — I've been using Crazyrouter as a unified gateway. One API key, OpenAI SDK compatible. Works well for testing different models without managing multiple accounts.