Instructions to use ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000") model = AutoModelForCausalLM.from_pretrained("ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000
- SGLang
How to use ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000 with Docker Model Runner:
docker model run hf.co/ccui46/glmz1_9b_diffPrompt_fullGen_downsampledData_aime_per_chunk_act_glm_3000
Tokenizer for checkpoint at step 3000
Browse files- .gitattributes +1 -0
- chat_template.jinja +45 -0
- special_tokens_map.json +32 -0
- tokenizer.json +3 -0
- tokenizer_config.json +145 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[gMASK]<sop>
|
| 2 |
+
{%- if tools -%}
|
| 3 |
+
<|system|>
|
| 4 |
+
你是一个名为 ChatGLM 的人工智能助手。你是基于智谱 AI 公司训练的语言模型 GLM-4 模型开发的,你的任务是针对用户的问题和要求提供适当的答复和支持。
|
| 5 |
+
|
| 6 |
+
# 可用工具
|
| 7 |
+
{%- for tool in tools %}
|
| 8 |
+
{%- set function = tool.function if tool.get("function") else tool %}
|
| 9 |
+
|
| 10 |
+
## {{ function.name }}
|
| 11 |
+
|
| 12 |
+
{{ function | tojson(indent=4, ensure_ascii=False) }}
|
| 13 |
+
在调用上述函数时,请使用 Json 格式表示调用的参数。
|
| 14 |
+
{%- endfor %}
|
| 15 |
+
{%- endif -%}
|
| 16 |
+
|
| 17 |
+
{%- for msg in messages %}
|
| 18 |
+
{%- if msg.role == 'system' %}
|
| 19 |
+
<|system|>
|
| 20 |
+
{{ msg.content }}
|
| 21 |
+
{%- endif %}
|
| 22 |
+
{%- endfor %}
|
| 23 |
+
|
| 24 |
+
{%- for message in messages if message.role != 'system' %}
|
| 25 |
+
{%- set role = message['role'] %}
|
| 26 |
+
{%- set content = message['content'] %}
|
| 27 |
+
{%- set visible = content.split('</think>')[-1].strip() %}
|
| 28 |
+
{%- set meta = message.get("metadata", "") %}
|
| 29 |
+
|
| 30 |
+
{%- if role == 'user' %}
|
| 31 |
+
<|user|>
|
| 32 |
+
{{ visible }}
|
| 33 |
+
{%- elif role == 'assistant' and not meta %}
|
| 34 |
+
<|assistant|>
|
| 35 |
+
{{ visible }}
|
| 36 |
+
{%- elif role == 'assistant' and meta %}
|
| 37 |
+
<|assistant|>{{ meta }}
|
| 38 |
+
{{ visible }}
|
| 39 |
+
{%- elif role == 'observation' %}
|
| 40 |
+
<|observation|>
|
| 41 |
+
{{ visible }}
|
| 42 |
+
{%- endif %}
|
| 43 |
+
{%- endfor %}
|
| 44 |
+
{% if add_generation_prompt %}<|assistant|>
|
| 45 |
+
<think>{% endif %}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"additional_special_tokens": [
|
| 3 |
+
"<|endoftext|>",
|
| 4 |
+
"[MASK]",
|
| 5 |
+
"[gMASK]",
|
| 6 |
+
"[sMASK]",
|
| 7 |
+
"<sop>",
|
| 8 |
+
"<eop>",
|
| 9 |
+
"<|system|>",
|
| 10 |
+
"<|user|>",
|
| 11 |
+
"<|assistant|>",
|
| 12 |
+
"<|observation|>",
|
| 13 |
+
"<|begin_of_image|>",
|
| 14 |
+
"<|end_of_image|>",
|
| 15 |
+
"<|begin_of_video|>",
|
| 16 |
+
"<|end_of_video|>"
|
| 17 |
+
],
|
| 18 |
+
"eos_token": {
|
| 19 |
+
"content": "<|endoftext|>",
|
| 20 |
+
"lstrip": false,
|
| 21 |
+
"normalized": false,
|
| 22 |
+
"rstrip": false,
|
| 23 |
+
"single_word": false
|
| 24 |
+
},
|
| 25 |
+
"pad_token": {
|
| 26 |
+
"content": "<|endoftext|>",
|
| 27 |
+
"lstrip": false,
|
| 28 |
+
"normalized": false,
|
| 29 |
+
"rstrip": false,
|
| 30 |
+
"single_word": false
|
| 31 |
+
}
|
| 32 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:76ebeac0d8bd7879ead7b43c16b44981f277e47225de2bd7de9ae1a6cc664a8c
|
| 3 |
+
size 19966496
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"151329": {
|
| 4 |
+
"content": "<|endoftext|>",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"151330": {
|
| 12 |
+
"content": "[MASK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"151331": {
|
| 20 |
+
"content": "[gMASK]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"151332": {
|
| 28 |
+
"content": "[sMASK]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"151333": {
|
| 36 |
+
"content": "<sop>",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
},
|
| 43 |
+
"151334": {
|
| 44 |
+
"content": "<eop>",
|
| 45 |
+
"lstrip": false,
|
| 46 |
+
"normalized": false,
|
| 47 |
+
"rstrip": false,
|
| 48 |
+
"single_word": false,
|
| 49 |
+
"special": true
|
| 50 |
+
},
|
| 51 |
+
"151335": {
|
| 52 |
+
"content": "<|system|>",
|
| 53 |
+
"lstrip": false,
|
| 54 |
+
"normalized": false,
|
| 55 |
+
"rstrip": false,
|
| 56 |
+
"single_word": false,
|
| 57 |
+
"special": true
|
| 58 |
+
},
|
| 59 |
+
"151336": {
|
| 60 |
+
"content": "<|user|>",
|
| 61 |
+
"lstrip": false,
|
| 62 |
+
"normalized": false,
|
| 63 |
+
"rstrip": false,
|
| 64 |
+
"single_word": false,
|
| 65 |
+
"special": true
|
| 66 |
+
},
|
| 67 |
+
"151337": {
|
| 68 |
+
"content": "<|assistant|>",
|
| 69 |
+
"lstrip": false,
|
| 70 |
+
"normalized": false,
|
| 71 |
+
"rstrip": false,
|
| 72 |
+
"single_word": false,
|
| 73 |
+
"special": true
|
| 74 |
+
},
|
| 75 |
+
"151338": {
|
| 76 |
+
"content": "<|observation|>",
|
| 77 |
+
"lstrip": false,
|
| 78 |
+
"normalized": false,
|
| 79 |
+
"rstrip": false,
|
| 80 |
+
"single_word": false,
|
| 81 |
+
"special": true
|
| 82 |
+
},
|
| 83 |
+
"151339": {
|
| 84 |
+
"content": "<|begin_of_image|>",
|
| 85 |
+
"lstrip": false,
|
| 86 |
+
"normalized": false,
|
| 87 |
+
"rstrip": false,
|
| 88 |
+
"single_word": false,
|
| 89 |
+
"special": true
|
| 90 |
+
},
|
| 91 |
+
"151340": {
|
| 92 |
+
"content": "<|end_of_image|>",
|
| 93 |
+
"lstrip": false,
|
| 94 |
+
"normalized": false,
|
| 95 |
+
"rstrip": false,
|
| 96 |
+
"single_word": false,
|
| 97 |
+
"special": true
|
| 98 |
+
},
|
| 99 |
+
"151341": {
|
| 100 |
+
"content": "<|begin_of_video|>",
|
| 101 |
+
"lstrip": false,
|
| 102 |
+
"normalized": false,
|
| 103 |
+
"rstrip": false,
|
| 104 |
+
"single_word": false,
|
| 105 |
+
"special": true
|
| 106 |
+
},
|
| 107 |
+
"151342": {
|
| 108 |
+
"content": "<|end_of_video|>",
|
| 109 |
+
"lstrip": false,
|
| 110 |
+
"normalized": false,
|
| 111 |
+
"rstrip": false,
|
| 112 |
+
"single_word": false,
|
| 113 |
+
"special": true
|
| 114 |
+
}
|
| 115 |
+
},
|
| 116 |
+
"additional_special_tokens": [
|
| 117 |
+
"<|endoftext|>",
|
| 118 |
+
"[MASK]",
|
| 119 |
+
"[gMASK]",
|
| 120 |
+
"[sMASK]",
|
| 121 |
+
"<sop>",
|
| 122 |
+
"<eop>",
|
| 123 |
+
"<|system|>",
|
| 124 |
+
"<|user|>",
|
| 125 |
+
"<|assistant|>",
|
| 126 |
+
"<|observation|>",
|
| 127 |
+
"<|begin_of_image|>",
|
| 128 |
+
"<|end_of_image|>",
|
| 129 |
+
"<|begin_of_video|>",
|
| 130 |
+
"<|end_of_video|>"
|
| 131 |
+
],
|
| 132 |
+
"clean_up_tokenization_spaces": false,
|
| 133 |
+
"do_lower_case": false,
|
| 134 |
+
"eos_token": "<|endoftext|>",
|
| 135 |
+
"extra_special_tokens": {},
|
| 136 |
+
"model_input_names": [
|
| 137 |
+
"input_ids",
|
| 138 |
+
"attention_mask"
|
| 139 |
+
],
|
| 140 |
+
"model_max_length": 128000,
|
| 141 |
+
"pad_token": "<|endoftext|>",
|
| 142 |
+
"padding_side": "left",
|
| 143 |
+
"remove_space": false,
|
| 144 |
+
"tokenizer_class": "PreTrainedTokenizerFast"
|
| 145 |
+
}
|