Instructions to use AICube/ChatGLM with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use AICube/ChatGLM with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("THUDM/chatglm3-6b-base") model = PeftModel.from_pretrained(base_model, "AICube/ChatGLM") - Notebooks
- Google Colab
- Kaggle
Download tokenizer_config.json from AICube/ChatGLM: direct link, hf CLI and curl.
- Browser
- Download file 929 Bytes
-
https://huggingface.co/AICube/ChatGLM/resolve/main/tokenizer_config.json
- Command line
-
hf download hf://AICube/ChatGLM/tokenizer_config.json
-
curl -L -o tokenizer_config.json https://huggingface.co/AICube/ChatGLM/resolve/main/tokenizer_config.json
929 Bytes
| { | |
| "added_tokens_decoder": {}, | |
| "auto_map": { | |
| "AutoTokenizer": [ | |
| "tokenization_chatglm.ChatGLMTokenizer", | |
| null | |
| ] | |
| }, | |
| "chat_template": "{% if messages[0]['role'] == 'system' %}{% set system_message = messages[0]['content'] %}{% endif %}{% if system_message is defined %}{{ system_message + '\\n' }}{% endif %}{% for message in messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ 'Human: ' + content + '\\nAssistant: ' }}{% elif message['role'] == 'assistant' %}{{ content + '</s>' + '\\n' }}{% endif %}{% endfor %}", | |
| "clean_up_tokenization_spaces": false, | |
| "do_lower_case": false, | |
| "encode_special_tokens": false, | |
| "eos_token": "</s>", | |
| "model_max_length": 1000000000000000019884624838656, | |
| "pad_token": "<unk>", | |
| "padding_side": "right", | |
| "remove_space": false, | |
| "split_special_tokens": false, | |
| "tokenizer_class": "ChatGLMTokenizer", | |
| "unk_token": "<unk>" | |
| } | |