Instructions to use zai-org/chatglm3-6b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/chatglm3-6b with Transformers:
# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("zai-org/chatglm3-6b", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
增加對tokenizer.chat_template的支援
#22
by p208p2002 - opened
- tokenizer_config.json +1 -0
tokenizer_config.json
CHANGED
|
@@ -3,6 +3,7 @@
|
|
| 3 |
"remove_space": false,
|
| 4 |
"do_lower_case": false,
|
| 5 |
"tokenizer_class": "ChatGLMTokenizer",
|
|
|
|
| 6 |
"auto_map": {
|
| 7 |
"AutoTokenizer": [
|
| 8 |
"tokenization_chatglm.ChatGLMTokenizer",
|
|
|
|
| 3 |
"remove_space": false,
|
| 4 |
"do_lower_case": false,
|
| 5 |
"tokenizer_class": "ChatGLMTokenizer",
|
| 6 |
+
"chat_template": "{% for message in messages %}{% if loop.first %}[gMASK]sop<|{{ message['role'] }}|> \n {{ message['content'] }}{% else %}<|{{ message['role'] }}|> \n {{ message['content'] }}{% endif %}{% endfor %}{% if add_generation_prompt %}<|assistant|>{% endif %}",
|
| 7 |
"auto_map": {
|
| 8 |
"AutoTokenizer": [
|
| 9 |
"tokenization_chatglm.ChatGLMTokenizer",
|