Instructions to use zai-org/WebGLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/WebGLM with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("zai-org/WebGLM", trust_remote_code=True) model = AutoModelForSeq2SeqLM.from_pretrained("zai-org/WebGLM", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from zai-org/WebGLM: direct link, hf CLI and curl.
- Browser
- Download file 466 Bytes
-
https://huggingface.co/zai-org/WebGLM/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://zai-org/WebGLM/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/zai-org/WebGLM/resolve/main/tokenizer_config.json
466 Bytes
| { | |
| "name_or_path": "THUDM/glm-10b", | |
| "eos_token": "<|endoftext|>", | |
| "pad_token": "<|endoftext|>", | |
| "cls_token": "[CLS]", | |
| "mask_token": "[MASK]", | |
| "unk_token": "[UNK]", | |
| "additional_special_tokens": ["<|startofpiece|>", "<|endofpiece|>", "[gMASK]", "[sMASK]"], | |
| "add_prefix_space": false, | |
| "tokenizer_class": "GLMGPT2Tokenizer", | |
| "use_fast": false, | |
| "auto_map": { | |
| "AutoTokenizer": [ | |
| "tokenization_glm.GLMGPT2Tokenizer", | |
| null | |
| ] | |
| } | |
| } | |