Upload folder using huggingface_hub
Browse files- .gitattributes +1 -0
- README.md +94 -3
- chat_template.jinja +86 -0
- config.json +226 -0
- generation_config.json +12 -0
- hf_quant_config.json +107 -0
- model-00001-of-00002.safetensors +3 -0
- model-00002-of-00002.safetensors +3 -0
- model.safetensors.index.json +0 -0
- tokenizer.json +3 -0
- tokenizer_config.json +12 -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
|
README.md
CHANGED
|
@@ -1,3 +1,94 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# GLM-4.7-Flash (FP8)
|
| 2 |
+
|
| 3 |
+
**🚀 One click deployment - coming soon on [Deploypad](https://geodd.io/)**
|
| 4 |
+
**Join our forum [Developer Forum](https://https://forum.geodd.io/)**
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
## Introduction
|
| 8 |
+
GLM-4.7-Flash is a 30B-A3B MoE model. As the strongest model in the 30B class, GLM-4.7-Flash offers a new option for lightweight deployment that balances performance and efficiency.
|
| 9 |
+
|
| 10 |
+
## Performances on Benchmarks
|
| 11 |
+
|
| 12 |
+
| Benchmark | GLM-4.7-Flash | Qwen3-30B-A3B-Thinking-2507 | GPT-OSS-20B |
|
| 13 |
+
|-----------|---------------|-----------------------------|-------------|
|
| 14 |
+
| AIME 25 | 91.6 | 85.0 | 91.7 |
|
| 15 |
+
| GPQA | 75.2 | 73.4 | 71.5 |
|
| 16 |
+
| LCB v6 | 64.0 | 66.0 | 61.0 |
|
| 17 |
+
| HLE | 14.4 | 9.8 | 10.9 |
|
| 18 |
+
| SWE-bench Verified | 59.2 | 22.0 | 34.0 |
|
| 19 |
+
| τ²-Bench | 79.5 | 49.0 | 47.7 |
|
| 20 |
+
| BrowseComp | 42.8 | 2.29 | 28.3 |
|
| 21 |
+
|
| 22 |
+
## Evaluation Parameters
|
| 23 |
+
|
| 24 |
+
### Default Settings (Most Tasks)
|
| 25 |
+
* temperature: 1.0
|
| 26 |
+
* top-p: 0.95
|
| 27 |
+
* max new tokens: 131072
|
| 28 |
+
|
| 29 |
+
For multi-turn agentic tasks (τ²-Bench and Terminal Bench 2), please turn on Preserved Thinking mode.
|
| 30 |
+
|
| 31 |
+
### Terminal Bench, SWE Bench Verified
|
| 32 |
+
* temperature: 0.7
|
| 33 |
+
* top-p: 1.0
|
| 34 |
+
* max new tokens: 16384
|
| 35 |
+
|
| 36 |
+
### τ²-Bench
|
| 37 |
+
* Temperature: 0
|
| 38 |
+
* Max new tokens: 16384
|
| 39 |
+
|
| 40 |
+
For τ²-Bench evaluation, we added an additional prompt to the Retail and Telecom user interaction to avoid failure modes caused by users ending the interaction incorrectly. For the Airline domain, we applied the domain fixes as proposed in the Claude Opus 4.5 release report.
|
| 41 |
+
|
| 42 |
+
### Transformers
|
| 43 |
+
Install:
|
| 44 |
+
```bash
|
| 45 |
+
pip install git+https://github.com/huggingface/transformers.git
|
| 46 |
+
```
|
| 47 |
+
|
| 48 |
+
Run:
|
| 49 |
+
```python
|
| 50 |
+
import torch
|
| 51 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
| 52 |
+
|
| 53 |
+
MODEL_PATH = "zai-org/GLM-4.7-Flash"
|
| 54 |
+
messages = [{"role": "user", "content": "hello"}]
|
| 55 |
+
tokenizer = AutoTokenizer.from_pretrained(MODEL_PATH)
|
| 56 |
+
inputs = tokenizer.apply_chat_template(
|
| 57 |
+
messages,
|
| 58 |
+
tokenize=True,
|
| 59 |
+
add_generation_prompt=True,
|
| 60 |
+
return_dict=True,
|
| 61 |
+
return_tensors="pt",
|
| 62 |
+
)
|
| 63 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 64 |
+
pretrained_model_name_or_path=MODEL_PATH,
|
| 65 |
+
torch_dtype=torch.bfloat16,
|
| 66 |
+
device_map="auto",
|
| 67 |
+
)
|
| 68 |
+
inputs = inputs.to(model.device)
|
| 69 |
+
generated_ids = model.generate(**inputs, max_new_tokens=128, do_sample=False)
|
| 70 |
+
output_text = tokenizer.decode(generated_ids[0][inputs.input_ids.shape[1]:])
|
| 71 |
+
print(output_text)
|
| 72 |
+
```
|
| 73 |
+
|
| 74 |
+
## Citation
|
| 75 |
+
If you find our work useful in your research, please consider citing the following paper:
|
| 76 |
+
|
| 77 |
+
```bibtex
|
| 78 |
+
@misc{5team2025glm45agenticreasoningcoding,
|
| 79 |
+
title={GLM-4.5: Agentic, Reasoning, and Coding (ARC) Foundation Models},
|
| 80 |
+
author={GLM Team and Aohan Zeng and Xin Lv and Qinkai Zheng and Zhenyu Hou and Bin Chen and Chengxing Xie and Cunxiang Wang and Da Yin and Hao Zeng and Jiajie Zhang and Kedong Wang and Lucen Zhong and Mingdao Liu and Rui Lu and Shulin Cao and Xiaohan Zhang and Xuancheng Huang and Yao Wei and Yean Cheng and Yifan An and Yilin Niu and Yuanhao Wen and Yushi Bai and Zhengxiao Du and Zihan Wang and Zilin Zhu and Bohan Zhang and Bosi Wen and Bowen Wu and Bowen Xu and Can Huang and Casey Zhao and Changpeng Cai and Chao Yu and Chen Li and Chendi Ge and Chenghua Huang and Chenhui Zhang and Chenxi Xu and Chenzheng Zhu and Chuang Li and Congfeng Yin and Daoyan Lin and Dayong Yang and Dazhi Jiang and Ding Ai and Erle Zhu and Fei Wang and Gengzheng Pan and Guo Wang and Hailong Sun and Haitao Li and Haiyang Li and Haiyi Hu and Hanyu Zhang and Hao Peng and Hao Tai and Haoke Zhang and Haoran Wang and Haoyu Yang and He Liu and He Zhao and Hongwei Liu and Hongxi Yan and Huan Liu and Huilong Chen and Ji Li and Jiajing Zhao and Jiamin Ren and Jian Jiao and Jiani Zhao and Jianyang Yan and Jiaqi Wang and Jiayi Gui and Jiayue Zhao and Jie Liu and Jijie Li and Jing Li and Jing Lu and Jingsen Wang and Jingwei Yuan and Jingxuan Li and Jingzhao Du and Jinhua Du and Jinxin Liu and Junkai Zhi and Junli Gao and Ke Wang and Lekang Yang and Liang Xu and Lin Fan and Lindong Wu and Lintao Ding and Lu Wang and Man Zhang and Minghao Li and Minghuan Xu and Mingming Zhao and Mingshu Zhai and Pengfan Du and Qian Dong and Shangde Lei and Shangqing Tu and Shangtong Yang and Shaoyou Lu and Shijie Li and Shuang Li and Shuang-Li and Shuxun Yang and Sibo Yi and Tianshu Yu and Wei Tian and Weihan Wang and Wenbo Yu and Weng Lam Tam and Wenjie Liang and Wentao Liu and Xiao Wang and Xiaohan Jia and Xiaotao Gu and Xiaoying Ling and Xin Wang and Xing Fan and Xingru Pan and Xinyuan Zhang and Xinze Zhang and Xiuqing Fu and Xunkai Zhang and Yabo Xu and Yandong Wu and Yida Lu and Yidong Wang and Yilin Zhou and Yiming Pan and Ying Zhang and Yingli Wang and Yingru Li and Yinpei Su and Yipeng Geng and Yitong Zhu and Yongkun Yang and Yuhang Li and Yuhao Wu and Yujiang Li and Yunan Liu and Yunqing Wang and Yuntao Li and Yuxuan Zhang and Zezhen Liu and Zhen Yang and Zhengda Zhou and Zhongpei Qiao and Zhuoer Feng and Zhuorui Liu and Zichen Zhang and Zihan Wang and Zijun Yao and Zikang Wang and Ziqiang Liu and Ziwei Chai and Zixuan Li and Zuodong Zhao and Wenguang Chen and Jidong Zhai and Bin Xu and Minlie Huang and Hongning Wang and Juanzi Li and Yuxiao Dong and Jie Tang},
|
| 81 |
+
year={2025},
|
| 82 |
+
eprint={2508.06471},
|
| 83 |
+
archivePrefix={arXiv},
|
| 84 |
+
primaryClass={cs.CL},
|
| 85 |
+
url={https://arxiv.org/abs/2508.06471},
|
| 86 |
+
}
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
---
|
| 90 |
+
|
| 91 |
+
**Powered by [Deploypad](https://geodd.io/)**
|
| 92 |
+
|
| 93 |
+
* [Community Forum](https://forum.geodd.io/)
|
| 94 |
+
* [Console](https://console.geodd.io/)
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[gMASK]<sop>
|
| 2 |
+
{%- if tools -%}
|
| 3 |
+
<|system|>
|
| 4 |
+
# Tools
|
| 5 |
+
|
| 6 |
+
You may call one or more functions to assist with the user query.
|
| 7 |
+
|
| 8 |
+
You are provided with function signatures within <tools></tools> XML tags:
|
| 9 |
+
<tools>
|
| 10 |
+
{% for tool in tools %}
|
| 11 |
+
{{ tool | tojson(ensure_ascii=False) }}
|
| 12 |
+
{% endfor %}
|
| 13 |
+
</tools>
|
| 14 |
+
|
| 15 |
+
For each function call, output the function name and arguments within the following XML format:
|
| 16 |
+
<tool_call>{function-name}<arg_key>{arg-key-1}</arg_key><arg_value>{arg-value-1}</arg_value><arg_key>{arg-key-2}</arg_key><arg_value>{arg-value-2}</arg_value>...</tool_call>{%- endif -%}
|
| 17 |
+
{%- macro visible_text(content) -%}
|
| 18 |
+
{%- if content is string -%}
|
| 19 |
+
{{- content }}
|
| 20 |
+
{%- elif content is iterable and content is not mapping -%}
|
| 21 |
+
{%- for item in content -%}
|
| 22 |
+
{%- if item is mapping and item.type == 'text' -%}
|
| 23 |
+
{{- item.text }}
|
| 24 |
+
{%- elif item is string -%}
|
| 25 |
+
{{- item }}
|
| 26 |
+
{%- endif -%}
|
| 27 |
+
{%- endfor -%}
|
| 28 |
+
{%- else -%}
|
| 29 |
+
{{- content }}
|
| 30 |
+
{%- endif -%}
|
| 31 |
+
{%- endmacro -%}
|
| 32 |
+
{%- set ns = namespace(last_user_index=-1) %}
|
| 33 |
+
{%- for m in messages %}
|
| 34 |
+
{%- if m.role == 'user' %}
|
| 35 |
+
{% set ns.last_user_index = loop.index0 -%}
|
| 36 |
+
{%- endif %}
|
| 37 |
+
{%- endfor %}
|
| 38 |
+
{% for m in messages %}
|
| 39 |
+
{%- if m.role == 'user' -%}<|user|>{{ visible_text(m.content) }}
|
| 40 |
+
{%- elif m.role == 'assistant' -%}
|
| 41 |
+
<|assistant|>
|
| 42 |
+
{%- set reasoning_content = '' %}
|
| 43 |
+
{%- set content = visible_text(m.content) %}
|
| 44 |
+
{%- if m.reasoning_content is string %}
|
| 45 |
+
{%- set reasoning_content = m.reasoning_content %}
|
| 46 |
+
{%- else %}
|
| 47 |
+
{%- if '</think>' in content %}
|
| 48 |
+
{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
| 49 |
+
{%- set content = content.split('</think>')[-1].lstrip('\n') %}
|
| 50 |
+
{%- endif %}
|
| 51 |
+
{%- endif %}
|
| 52 |
+
{%- if ((clear_thinking is defined and not clear_thinking) or loop.index0 > ns.last_user_index) and reasoning_content -%}
|
| 53 |
+
{{ '<think>' + reasoning_content.strip() + '</think>'}}
|
| 54 |
+
{%- else -%}
|
| 55 |
+
{{ '</think>' }}
|
| 56 |
+
{%- endif -%}
|
| 57 |
+
{%- if content.strip() -%}
|
| 58 |
+
{{ content.strip() }}
|
| 59 |
+
{%- endif -%}
|
| 60 |
+
{% if m.tool_calls %}
|
| 61 |
+
{% for tc in m.tool_calls %}
|
| 62 |
+
{%- if tc.function %}
|
| 63 |
+
{%- set tc = tc.function %}
|
| 64 |
+
{%- endif %}
|
| 65 |
+
{{- '<tool_call>' + tc.name -}}
|
| 66 |
+
{% set _args = tc.arguments %}{% for k, v in _args.items() %}<arg_key>{{ k }}</arg_key><arg_value>{{ v | tojson(ensure_ascii=False) if v is not string else v }}</arg_value>{% endfor %}</tool_call>{% endfor %}
|
| 67 |
+
{% endif %}
|
| 68 |
+
{%- elif m.role == 'tool' -%}
|
| 69 |
+
{%- if m.content is string -%}
|
| 70 |
+
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
| 71 |
+
{{- '<|observation|>' }}
|
| 72 |
+
{%- endif %}
|
| 73 |
+
{{- '<tool_response>' }}
|
| 74 |
+
{{- m.content }}
|
| 75 |
+
{{- '</tool_response>' }}
|
| 76 |
+
{%- else -%}
|
| 77 |
+
<|observation|>{% for tr in m.content %}
|
| 78 |
+
<tool_response>{{ tr.output if tr.output is defined else tr }}</tool_response>{% endfor -%}
|
| 79 |
+
{% endif -%}
|
| 80 |
+
{%- elif m.role == 'system' -%}
|
| 81 |
+
<|system|>{{ visible_text(m.content) }}
|
| 82 |
+
{%- endif -%}
|
| 83 |
+
{%- endfor -%}
|
| 84 |
+
{%- if add_generation_prompt -%}
|
| 85 |
+
<|assistant|>{{- '</think>' if (enable_thinking is defined and not enable_thinking) else '<think>' -}}
|
| 86 |
+
{%- endif -%}
|
config.json
ADDED
|
@@ -0,0 +1,226 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Glm4MoeLiteForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"dtype": "bfloat16",
|
| 9 |
+
"eos_token_id": [
|
| 10 |
+
154820,
|
| 11 |
+
154827,
|
| 12 |
+
154829
|
| 13 |
+
],
|
| 14 |
+
"first_k_dense_replace": 1,
|
| 15 |
+
"head_dim": 64,
|
| 16 |
+
"hidden_act": "silu",
|
| 17 |
+
"hidden_size": 2048,
|
| 18 |
+
"initializer_range": 0.02,
|
| 19 |
+
"intermediate_size": 10240,
|
| 20 |
+
"kv_lora_rank": 512,
|
| 21 |
+
"max_position_embeddings": 202752,
|
| 22 |
+
"mlp_layer_types": [
|
| 23 |
+
"dense",
|
| 24 |
+
"sparse",
|
| 25 |
+
"sparse",
|
| 26 |
+
"sparse",
|
| 27 |
+
"sparse",
|
| 28 |
+
"sparse",
|
| 29 |
+
"sparse",
|
| 30 |
+
"sparse",
|
| 31 |
+
"sparse",
|
| 32 |
+
"sparse",
|
| 33 |
+
"sparse",
|
| 34 |
+
"sparse",
|
| 35 |
+
"sparse",
|
| 36 |
+
"sparse",
|
| 37 |
+
"sparse",
|
| 38 |
+
"sparse",
|
| 39 |
+
"sparse",
|
| 40 |
+
"sparse",
|
| 41 |
+
"sparse",
|
| 42 |
+
"sparse",
|
| 43 |
+
"sparse",
|
| 44 |
+
"sparse",
|
| 45 |
+
"sparse",
|
| 46 |
+
"sparse",
|
| 47 |
+
"sparse",
|
| 48 |
+
"sparse",
|
| 49 |
+
"sparse",
|
| 50 |
+
"sparse",
|
| 51 |
+
"sparse",
|
| 52 |
+
"sparse",
|
| 53 |
+
"sparse",
|
| 54 |
+
"sparse",
|
| 55 |
+
"sparse",
|
| 56 |
+
"sparse",
|
| 57 |
+
"sparse",
|
| 58 |
+
"sparse",
|
| 59 |
+
"sparse",
|
| 60 |
+
"sparse",
|
| 61 |
+
"sparse",
|
| 62 |
+
"sparse",
|
| 63 |
+
"sparse",
|
| 64 |
+
"sparse",
|
| 65 |
+
"sparse",
|
| 66 |
+
"sparse",
|
| 67 |
+
"sparse",
|
| 68 |
+
"sparse",
|
| 69 |
+
"sparse"
|
| 70 |
+
],
|
| 71 |
+
"model_type": "glm4_moe_lite",
|
| 72 |
+
"moe_intermediate_size": 1536,
|
| 73 |
+
"n_group": 1,
|
| 74 |
+
"n_routed_experts": 64,
|
| 75 |
+
"n_shared_experts": 1,
|
| 76 |
+
"norm_topk_prob": true,
|
| 77 |
+
"num_attention_heads": 20,
|
| 78 |
+
"num_experts_per_tok": 4,
|
| 79 |
+
"num_hidden_layers": 47,
|
| 80 |
+
"num_key_value_heads": 20,
|
| 81 |
+
"num_nextn_predict_layers": 1,
|
| 82 |
+
"pad_token_id": 154820,
|
| 83 |
+
"partial_rotary_factor": 1.0,
|
| 84 |
+
"pretraining_tp": 1,
|
| 85 |
+
"q_lora_rank": 768,
|
| 86 |
+
"qk_head_dim": 256,
|
| 87 |
+
"qk_nope_head_dim": 192,
|
| 88 |
+
"qk_rope_head_dim": 64,
|
| 89 |
+
"rms_norm_eps": 1e-05,
|
| 90 |
+
"rope_interleave": true,
|
| 91 |
+
"rope_parameters": {
|
| 92 |
+
"partial_rotary_factor": 1.0,
|
| 93 |
+
"rope_theta": 1000000,
|
| 94 |
+
"rope_type": "default"
|
| 95 |
+
},
|
| 96 |
+
"routed_scaling_factor": 1.8,
|
| 97 |
+
"tie_word_embeddings": false,
|
| 98 |
+
"topk_group": 1,
|
| 99 |
+
"topk_method": "noaux_tc",
|
| 100 |
+
"transformers_version": "5.0.1.dev0",
|
| 101 |
+
"use_cache": true,
|
| 102 |
+
"v_head_dim": 256,
|
| 103 |
+
"vocab_size": 154880,
|
| 104 |
+
"quantization_config": {
|
| 105 |
+
"config_groups": {
|
| 106 |
+
"group_0": {
|
| 107 |
+
"input_activations": {
|
| 108 |
+
"dynamic": false,
|
| 109 |
+
"num_bits": 8,
|
| 110 |
+
"type": "float"
|
| 111 |
+
},
|
| 112 |
+
"weights": {
|
| 113 |
+
"dynamic": false,
|
| 114 |
+
"num_bits": 8,
|
| 115 |
+
"type": "float"
|
| 116 |
+
},
|
| 117 |
+
"targets": [
|
| 118 |
+
"Linear"
|
| 119 |
+
]
|
| 120 |
+
}
|
| 121 |
+
},
|
| 122 |
+
"ignore": [
|
| 123 |
+
"lm_head",
|
| 124 |
+
"model.layers.0.mlp.gate_proj",
|
| 125 |
+
"model.layers.0.self_attn*",
|
| 126 |
+
"model.layers.1.mlp.shared_experts.gate_proj",
|
| 127 |
+
"model.layers.1.self_attn*",
|
| 128 |
+
"model.layers.10.mlp.shared_experts.gate_proj",
|
| 129 |
+
"model.layers.10.self_attn*",
|
| 130 |
+
"model.layers.11.mlp.shared_experts.gate_proj",
|
| 131 |
+
"model.layers.11.self_attn*",
|
| 132 |
+
"model.layers.12.mlp.shared_experts.gate_proj",
|
| 133 |
+
"model.layers.12.self_attn*",
|
| 134 |
+
"model.layers.13.mlp.shared_experts.gate_proj",
|
| 135 |
+
"model.layers.13.self_attn*",
|
| 136 |
+
"model.layers.14.mlp.shared_experts.gate_proj",
|
| 137 |
+
"model.layers.14.self_attn*",
|
| 138 |
+
"model.layers.15.mlp.shared_experts.gate_proj",
|
| 139 |
+
"model.layers.15.self_attn*",
|
| 140 |
+
"model.layers.16.mlp.shared_experts.gate_proj",
|
| 141 |
+
"model.layers.16.self_attn*",
|
| 142 |
+
"model.layers.17.mlp.shared_experts.gate_proj",
|
| 143 |
+
"model.layers.17.self_attn*",
|
| 144 |
+
"model.layers.18.mlp.shared_experts.gate_proj",
|
| 145 |
+
"model.layers.18.self_attn*",
|
| 146 |
+
"model.layers.19.mlp.shared_experts.gate_proj",
|
| 147 |
+
"model.layers.19.self_attn*",
|
| 148 |
+
"model.layers.2.mlp.shared_experts.gate_proj",
|
| 149 |
+
"model.layers.2.self_attn*",
|
| 150 |
+
"model.layers.20.mlp.shared_experts.gate_proj",
|
| 151 |
+
"model.layers.20.self_attn*",
|
| 152 |
+
"model.layers.21.mlp.shared_experts.gate_proj",
|
| 153 |
+
"model.layers.21.self_attn*",
|
| 154 |
+
"model.layers.22.mlp.shared_experts.gate_proj",
|
| 155 |
+
"model.layers.22.self_attn*",
|
| 156 |
+
"model.layers.23.mlp.shared_experts.gate_proj",
|
| 157 |
+
"model.layers.23.self_attn*",
|
| 158 |
+
"model.layers.24.mlp.shared_experts.gate_proj",
|
| 159 |
+
"model.layers.24.self_attn*",
|
| 160 |
+
"model.layers.25.mlp.shared_experts.gate_proj",
|
| 161 |
+
"model.layers.25.self_attn*",
|
| 162 |
+
"model.layers.26.mlp.shared_experts.gate_proj",
|
| 163 |
+
"model.layers.26.self_attn*",
|
| 164 |
+
"model.layers.27.mlp.shared_experts.gate_proj",
|
| 165 |
+
"model.layers.27.self_attn*",
|
| 166 |
+
"model.layers.28.mlp.shared_experts.gate_proj",
|
| 167 |
+
"model.layers.28.self_attn*",
|
| 168 |
+
"model.layers.29.mlp.shared_experts.gate_proj",
|
| 169 |
+
"model.layers.29.self_attn*",
|
| 170 |
+
"model.layers.3.mlp.shared_experts.gate_proj",
|
| 171 |
+
"model.layers.3.self_attn*",
|
| 172 |
+
"model.layers.30.mlp.shared_experts.gate_proj",
|
| 173 |
+
"model.layers.30.self_attn*",
|
| 174 |
+
"model.layers.31.mlp.shared_experts.gate_proj",
|
| 175 |
+
"model.layers.31.self_attn*",
|
| 176 |
+
"model.layers.32.mlp.shared_experts.gate_proj",
|
| 177 |
+
"model.layers.32.self_attn*",
|
| 178 |
+
"model.layers.33.mlp.shared_experts.gate_proj",
|
| 179 |
+
"model.layers.33.self_attn*",
|
| 180 |
+
"model.layers.34.mlp.shared_experts.gate_proj",
|
| 181 |
+
"model.layers.34.self_attn*",
|
| 182 |
+
"model.layers.35.mlp.shared_experts.gate_proj",
|
| 183 |
+
"model.layers.35.self_attn*",
|
| 184 |
+
"model.layers.36.mlp.shared_experts.gate_proj",
|
| 185 |
+
"model.layers.36.self_attn*",
|
| 186 |
+
"model.layers.37.mlp.shared_experts.gate_proj",
|
| 187 |
+
"model.layers.37.self_attn*",
|
| 188 |
+
"model.layers.38.mlp.shared_experts.gate_proj",
|
| 189 |
+
"model.layers.38.self_attn*",
|
| 190 |
+
"model.layers.39.mlp.shared_experts.gate_proj",
|
| 191 |
+
"model.layers.39.self_attn*",
|
| 192 |
+
"model.layers.4.mlp.shared_experts.gate_proj",
|
| 193 |
+
"model.layers.4.self_attn*",
|
| 194 |
+
"model.layers.40.mlp.shared_experts.gate_proj",
|
| 195 |
+
"model.layers.40.self_attn*",
|
| 196 |
+
"model.layers.41.mlp.shared_experts.gate_proj",
|
| 197 |
+
"model.layers.41.self_attn*",
|
| 198 |
+
"model.layers.42.mlp.shared_experts.gate_proj",
|
| 199 |
+
"model.layers.42.self_attn*",
|
| 200 |
+
"model.layers.43.mlp.shared_experts.gate_proj",
|
| 201 |
+
"model.layers.43.self_attn*",
|
| 202 |
+
"model.layers.44.mlp.shared_experts.gate_proj",
|
| 203 |
+
"model.layers.44.self_attn*",
|
| 204 |
+
"model.layers.45.mlp.shared_experts.gate_proj",
|
| 205 |
+
"model.layers.45.self_attn*",
|
| 206 |
+
"model.layers.46.mlp.shared_experts.gate_proj",
|
| 207 |
+
"model.layers.46.self_attn*",
|
| 208 |
+
"model.layers.5.mlp.shared_experts.gate_proj",
|
| 209 |
+
"model.layers.5.self_attn*",
|
| 210 |
+
"model.layers.6.mlp.shared_experts.gate_proj",
|
| 211 |
+
"model.layers.6.self_attn*",
|
| 212 |
+
"model.layers.7.mlp.shared_experts.gate_proj",
|
| 213 |
+
"model.layers.7.self_attn*",
|
| 214 |
+
"model.layers.8.mlp.shared_experts.gate_proj",
|
| 215 |
+
"model.layers.8.self_attn*",
|
| 216 |
+
"model.layers.9.mlp.shared_experts.gate_proj",
|
| 217 |
+
"model.layers.9.self_attn*"
|
| 218 |
+
],
|
| 219 |
+
"quant_algo": "FP8",
|
| 220 |
+
"producer": {
|
| 221 |
+
"name": "modelopt",
|
| 222 |
+
"version": "0.37.0"
|
| 223 |
+
},
|
| 224 |
+
"quant_method": "modelopt"
|
| 225 |
+
}
|
| 226 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"do_sample": true,
|
| 4 |
+
"eos_token_id": [
|
| 5 |
+
154820,
|
| 6 |
+
154827,
|
| 7 |
+
154829
|
| 8 |
+
],
|
| 9 |
+
"pad_token_id": 154820,
|
| 10 |
+
"temperature": 1.0,
|
| 11 |
+
"transformers_version": "5.0.1.dev0"
|
| 12 |
+
}
|
hf_quant_config.json
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"producer": {
|
| 3 |
+
"name": "modelopt",
|
| 4 |
+
"version": "0.37.0"
|
| 5 |
+
},
|
| 6 |
+
"quantization": {
|
| 7 |
+
"quant_algo": "FP8",
|
| 8 |
+
"kv_cache_quant_algo": null,
|
| 9 |
+
"exclude_modules": [
|
| 10 |
+
"lm_head",
|
| 11 |
+
"model.layers.0.mlp.gate_proj",
|
| 12 |
+
"model.layers.0.self_attn*",
|
| 13 |
+
"model.layers.1.mlp.shared_experts.gate_proj",
|
| 14 |
+
"model.layers.1.self_attn*",
|
| 15 |
+
"model.layers.10.mlp.shared_experts.gate_proj",
|
| 16 |
+
"model.layers.10.self_attn*",
|
| 17 |
+
"model.layers.11.mlp.shared_experts.gate_proj",
|
| 18 |
+
"model.layers.11.self_attn*",
|
| 19 |
+
"model.layers.12.mlp.shared_experts.gate_proj",
|
| 20 |
+
"model.layers.12.self_attn*",
|
| 21 |
+
"model.layers.13.mlp.shared_experts.gate_proj",
|
| 22 |
+
"model.layers.13.self_attn*",
|
| 23 |
+
"model.layers.14.mlp.shared_experts.gate_proj",
|
| 24 |
+
"model.layers.14.self_attn*",
|
| 25 |
+
"model.layers.15.mlp.shared_experts.gate_proj",
|
| 26 |
+
"model.layers.15.self_attn*",
|
| 27 |
+
"model.layers.16.mlp.shared_experts.gate_proj",
|
| 28 |
+
"model.layers.16.self_attn*",
|
| 29 |
+
"model.layers.17.mlp.shared_experts.gate_proj",
|
| 30 |
+
"model.layers.17.self_attn*",
|
| 31 |
+
"model.layers.18.mlp.shared_experts.gate_proj",
|
| 32 |
+
"model.layers.18.self_attn*",
|
| 33 |
+
"model.layers.19.mlp.shared_experts.gate_proj",
|
| 34 |
+
"model.layers.19.self_attn*",
|
| 35 |
+
"model.layers.2.mlp.shared_experts.gate_proj",
|
| 36 |
+
"model.layers.2.self_attn*",
|
| 37 |
+
"model.layers.20.mlp.shared_experts.gate_proj",
|
| 38 |
+
"model.layers.20.self_attn*",
|
| 39 |
+
"model.layers.21.mlp.shared_experts.gate_proj",
|
| 40 |
+
"model.layers.21.self_attn*",
|
| 41 |
+
"model.layers.22.mlp.shared_experts.gate_proj",
|
| 42 |
+
"model.layers.22.self_attn*",
|
| 43 |
+
"model.layers.23.mlp.shared_experts.gate_proj",
|
| 44 |
+
"model.layers.23.self_attn*",
|
| 45 |
+
"model.layers.24.mlp.shared_experts.gate_proj",
|
| 46 |
+
"model.layers.24.self_attn*",
|
| 47 |
+
"model.layers.25.mlp.shared_experts.gate_proj",
|
| 48 |
+
"model.layers.25.self_attn*",
|
| 49 |
+
"model.layers.26.mlp.shared_experts.gate_proj",
|
| 50 |
+
"model.layers.26.self_attn*",
|
| 51 |
+
"model.layers.27.mlp.shared_experts.gate_proj",
|
| 52 |
+
"model.layers.27.self_attn*",
|
| 53 |
+
"model.layers.28.mlp.shared_experts.gate_proj",
|
| 54 |
+
"model.layers.28.self_attn*",
|
| 55 |
+
"model.layers.29.mlp.shared_experts.gate_proj",
|
| 56 |
+
"model.layers.29.self_attn*",
|
| 57 |
+
"model.layers.3.mlp.shared_experts.gate_proj",
|
| 58 |
+
"model.layers.3.self_attn*",
|
| 59 |
+
"model.layers.30.mlp.shared_experts.gate_proj",
|
| 60 |
+
"model.layers.30.self_attn*",
|
| 61 |
+
"model.layers.31.mlp.shared_experts.gate_proj",
|
| 62 |
+
"model.layers.31.self_attn*",
|
| 63 |
+
"model.layers.32.mlp.shared_experts.gate_proj",
|
| 64 |
+
"model.layers.32.self_attn*",
|
| 65 |
+
"model.layers.33.mlp.shared_experts.gate_proj",
|
| 66 |
+
"model.layers.33.self_attn*",
|
| 67 |
+
"model.layers.34.mlp.shared_experts.gate_proj",
|
| 68 |
+
"model.layers.34.self_attn*",
|
| 69 |
+
"model.layers.35.mlp.shared_experts.gate_proj",
|
| 70 |
+
"model.layers.35.self_attn*",
|
| 71 |
+
"model.layers.36.mlp.shared_experts.gate_proj",
|
| 72 |
+
"model.layers.36.self_attn*",
|
| 73 |
+
"model.layers.37.mlp.shared_experts.gate_proj",
|
| 74 |
+
"model.layers.37.self_attn*",
|
| 75 |
+
"model.layers.38.mlp.shared_experts.gate_proj",
|
| 76 |
+
"model.layers.38.self_attn*",
|
| 77 |
+
"model.layers.39.mlp.shared_experts.gate_proj",
|
| 78 |
+
"model.layers.39.self_attn*",
|
| 79 |
+
"model.layers.4.mlp.shared_experts.gate_proj",
|
| 80 |
+
"model.layers.4.self_attn*",
|
| 81 |
+
"model.layers.40.mlp.shared_experts.gate_proj",
|
| 82 |
+
"model.layers.40.self_attn*",
|
| 83 |
+
"model.layers.41.mlp.shared_experts.gate_proj",
|
| 84 |
+
"model.layers.41.self_attn*",
|
| 85 |
+
"model.layers.42.mlp.shared_experts.gate_proj",
|
| 86 |
+
"model.layers.42.self_attn*",
|
| 87 |
+
"model.layers.43.mlp.shared_experts.gate_proj",
|
| 88 |
+
"model.layers.43.self_attn*",
|
| 89 |
+
"model.layers.44.mlp.shared_experts.gate_proj",
|
| 90 |
+
"model.layers.44.self_attn*",
|
| 91 |
+
"model.layers.45.mlp.shared_experts.gate_proj",
|
| 92 |
+
"model.layers.45.self_attn*",
|
| 93 |
+
"model.layers.46.mlp.shared_experts.gate_proj",
|
| 94 |
+
"model.layers.46.self_attn*",
|
| 95 |
+
"model.layers.5.mlp.shared_experts.gate_proj",
|
| 96 |
+
"model.layers.5.self_attn*",
|
| 97 |
+
"model.layers.6.mlp.shared_experts.gate_proj",
|
| 98 |
+
"model.layers.6.self_attn*",
|
| 99 |
+
"model.layers.7.mlp.shared_experts.gate_proj",
|
| 100 |
+
"model.layers.7.self_attn*",
|
| 101 |
+
"model.layers.8.mlp.shared_experts.gate_proj",
|
| 102 |
+
"model.layers.8.self_attn*",
|
| 103 |
+
"model.layers.9.mlp.shared_experts.gate_proj",
|
| 104 |
+
"model.layers.9.self_attn*"
|
| 105 |
+
]
|
| 106 |
+
}
|
| 107 |
+
}
|
model-00001-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4b1616ab867392696ef6fe05d94a22bc8a1f74be63a7988d302e12223f7cb9b7
|
| 3 |
+
size 49844456392
|
model-00002-of-00002.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6f2ade5e8c6aeb608a76b0a6ecffc37329f7fe1fe2663191ca375d220ca5c022
|
| 3 |
+
size 9712199032
|
model.safetensors.index.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:19e773648cb4e65de8660ea6365e10acca112d42a854923df93db4a6f333a82d
|
| 3 |
+
size 20217442
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"clean_up_tokenization_spaces": false,
|
| 4 |
+
"do_lower_case": false,
|
| 5 |
+
"eos_token": "<|endoftext|>",
|
| 6 |
+
"is_local": true,
|
| 7 |
+
"model_max_length": 128000,
|
| 8 |
+
"pad_token": "<|endoftext|>",
|
| 9 |
+
"padding_side": "left",
|
| 10 |
+
"remove_space": false,
|
| 11 |
+
"tokenizer_class": "TokenizersBackend"
|
| 12 |
+
}
|