Text Generation
Transformers
Safetensors
English
glm4_moe
glm
MOE
pruning
compression
conversational
Instructions to use cerebras/GLM-4.6-REAP-268B-A32B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cerebras/GLM-4.6-REAP-268B-A32B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cerebras/GLM-4.6-REAP-268B-A32B") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForMultimodalLM tokenizer = AutoTokenizer.from_pretrained("cerebras/GLM-4.6-REAP-268B-A32B") model = AutoModelForMultimodalLM.from_pretrained("cerebras/GLM-4.6-REAP-268B-A32B") 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 cerebras/GLM-4.6-REAP-268B-A32B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cerebras/GLM-4.6-REAP-268B-A32B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cerebras/GLM-4.6-REAP-268B-A32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cerebras/GLM-4.6-REAP-268B-A32B
- SGLang
How to use cerebras/GLM-4.6-REAP-268B-A32B 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 "cerebras/GLM-4.6-REAP-268B-A32B" \ --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": "cerebras/GLM-4.6-REAP-268B-A32B", "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 "cerebras/GLM-4.6-REAP-268B-A32B" \ --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": "cerebras/GLM-4.6-REAP-268B-A32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cerebras/GLM-4.6-REAP-268B-A32B with Docker Model Runner:
docker model run hf.co/cerebras/GLM-4.6-REAP-268B-A32B
Commit ·
419f2ed
0
Parent(s):
upload checkpoint
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- README.md +136 -0
- chat_template.jinja +103 -0
- config.json +43 -0
- generation_config.json +10 -0
- model-00001-of-00108.safetensors +3 -0
- model-00002-of-00108.safetensors +3 -0
- model-00003-of-00108.safetensors +3 -0
- model-00004-of-00108.safetensors +3 -0
- model-00005-of-00108.safetensors +3 -0
- model-00006-of-00108.safetensors +3 -0
- model-00007-of-00108.safetensors +3 -0
- model-00008-of-00108.safetensors +3 -0
- model-00009-of-00108.safetensors +3 -0
- model-00010-of-00108.safetensors +3 -0
- model-00011-of-00108.safetensors +3 -0
- model-00012-of-00108.safetensors +3 -0
- model-00013-of-00108.safetensors +3 -0
- model-00014-of-00108.safetensors +3 -0
- model-00015-of-00108.safetensors +3 -0
- model-00016-of-00108.safetensors +3 -0
- model-00017-of-00108.safetensors +3 -0
- model-00018-of-00108.safetensors +3 -0
- model-00019-of-00108.safetensors +3 -0
- model-00020-of-00108.safetensors +3 -0
- model-00021-of-00108.safetensors +3 -0
- model-00022-of-00108.safetensors +3 -0
- model-00023-of-00108.safetensors +3 -0
- model-00024-of-00108.safetensors +3 -0
- model-00025-of-00108.safetensors +3 -0
- model-00026-of-00108.safetensors +3 -0
- model-00027-of-00108.safetensors +3 -0
- model-00028-of-00108.safetensors +3 -0
- model-00029-of-00108.safetensors +3 -0
- model-00030-of-00108.safetensors +3 -0
- model-00031-of-00108.safetensors +3 -0
- model-00032-of-00108.safetensors +3 -0
- model-00033-of-00108.safetensors +3 -0
- model-00034-of-00108.safetensors +3 -0
- model-00035-of-00108.safetensors +3 -0
- model-00036-of-00108.safetensors +3 -0
- model-00037-of-00108.safetensors +3 -0
- model-00038-of-00108.safetensors +3 -0
- model-00039-of-00108.safetensors +3 -0
- model-00040-of-00108.safetensors +3 -0
- model-00041-of-00108.safetensors +3 -0
- model-00042-of-00108.safetensors +3 -0
- model-00043-of-00108.safetensors +3 -0
- model-00044-of-00108.safetensors +3 -0
- model-00045-of-00108.safetensors +3 -0
- model-00046-of-00108.safetensors +3 -0
README.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
library_name: transformers
|
| 5 |
+
tags:
|
| 6 |
+
- glm
|
| 7 |
+
- MOE
|
| 8 |
+
- pruning
|
| 9 |
+
- compression
|
| 10 |
+
license: mit
|
| 11 |
+
name: cerebras/GLM-4.6-REAP-268B-A32B
|
| 12 |
+
description: >
|
| 13 |
+
This model was obtained by uniformly pruning 25% of experts in GLM-4.6 using the REAP method.
|
| 14 |
+
readme: >
|
| 15 |
+
https://huggingface.co/cerebras/GLM-4.6-REAP-268B-A32B/main/README.md
|
| 16 |
+
license_link: https://huggingface.co/zai-org/GLM-4.6/blob/main/LICENSE
|
| 17 |
+
pipeline_tag: text-generation
|
| 18 |
+
base_model:
|
| 19 |
+
- zai-org/GLM-4.6
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
<p align="center">
|
| 23 |
+
<em>𓌳 <strong>REAP</strong>𓌳 the Experts: Why Pruning Prevails for One-Shot MoE Compression</em><br>
|
| 24 |
+
<img src="https://i.imgur.com/rmzG3gg.png" alt="REAP" width="75%">
|
| 25 |
+
</p>
|
| 26 |
+
|
| 27 |
+
# GLM-4.6-REAP-268B-A32B
|
| 28 |
+
|
| 29 |
+
## ✨ Highlights
|
| 30 |
+
|
| 31 |
+
Introducing **GLM-4.6-REAP-268B-A32B**, a **memory-efficient compressed variant** of GLM-4.6 that maintains near-identical performance while being **25% lighter**.
|
| 32 |
+
|
| 33 |
+
**Note: this is a BF16 version for more accurate downstream low-bit quantization. An [FP8 version](https://huggingface.co/cerebras/GLM-4.6-REAP-268B-A32B-FP8) is also available on HF.**
|
| 34 |
+
|
| 35 |
+
This model was created using **REAP (Router-weighted Expert Activation Pruning)**, a novel expert pruning method that selectively removes redundant experts while preserving the router's independent control over remaining experts. Key features include:
|
| 36 |
+
|
| 37 |
+
- **Near-Lossless Performance**: Maintains almost identical accuracy on code generation, agentic coding, and function calling tasks compared to the full 355B model
|
| 38 |
+
- **25% Memory Reduction**: Compressed from 355B to 268B parameters, significantly lowering deployment costs and memory requirements
|
| 39 |
+
- **Preserved Capabilities**: Retains all core functionalities including code generation, agentic workflows, repository-scale understanding, and function calling
|
| 40 |
+
- **Drop-in Compatibility**: Works with vanilla vLLM - no source modifications or custom patches required
|
| 41 |
+
- **Optimized for Real-World Use**: Particularly effective for resource-constrained environments, local deployments, and academic research
|
| 42 |
+
---
|
| 43 |
+
## 📋 Model Overview
|
| 44 |
+
|
| 45 |
+
**GLM-4.6-REAP-268B-A32B** has the following specifications:
|
| 46 |
+
|
| 47 |
+
- **Base Model**: GLM-4.6
|
| 48 |
+
- **Compression Method**: REAP (Router-weighted Expert Activation Pruning)
|
| 49 |
+
- **Compression Ratio**: 25% expert pruning
|
| 50 |
+
- **Type**: Sparse Mixture-of-Experts (SMoE) Causal Language Model
|
| 51 |
+
- **Number of Parameters**: 268B total, 32B activated per token
|
| 52 |
+
- **Number of Layers**: 92
|
| 53 |
+
- **Number of Attention Heads (GQA)**: 96 for Q and 8 for KV
|
| 54 |
+
- **Number of Experts**: 120 (uniformly pruned from 160)
|
| 55 |
+
- **Number of Activated Experts**: 8 per token
|
| 56 |
+
- **Context Length**: 202,752 tokens
|
| 57 |
+
- **License**: MIT
|
| 58 |
+
|
| 59 |
+
---
|
| 60 |
+
|
| 61 |
+
## 📊 Evaluations
|
| 62 |
+
|
| 63 |
+
TBD for BF16 model. [Evalulation results available for the FP8 variant](https://huggingface.co/cerebras/GLM-4.6-REAP-268B-A32B-FP8#%F0%9F%93%8A-evaluations).
|
| 64 |
+
|
| 65 |
+
For more details on the evaluation setup, refer to the [REAP arXiv preprint](https://arxiv.org/abs/2510.13999).
|
| 66 |
+
|
| 67 |
+
---
|
| 68 |
+
|
| 69 |
+
## 🚀 Deployment
|
| 70 |
+
|
| 71 |
+
You can deploy the model directly using the **latest vLLM** (v0.11.0), no source modifications or custom patches required.
|
| 72 |
+
|
| 73 |
+
```bash
|
| 74 |
+
vllm serve cerebras/GLM-4.6-REAP-268B-A32B \
|
| 75 |
+
--tensor-parallel-size 8 \
|
| 76 |
+
--tool-call-parser glm45 \
|
| 77 |
+
--enable-auto-tool-choice \
|
| 78 |
+
--enable-expert-parallel
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
If you encounter insufficient memory when running this model, you might need to set a lower value for `--max-num-seqs` flag (e.g. set to 64).
|
| 82 |
+
|
| 83 |
+
|
| 84 |
+
## 🧩 Model Creation
|
| 85 |
+
|
| 86 |
+
This checkpoint was created by applying the **REAP (Router-weighted Expert Activation Pruning)** method uniformly across all Mixture-of-Experts (MoE) blocks of **GLM-4.6**, with a **25% pruning rate**.
|
| 87 |
+
|
| 88 |
+
### How REAP Works
|
| 89 |
+
|
| 90 |
+
REAP selects experts to prune based on a novel **saliency criterion** that considers both:
|
| 91 |
+
- **Router gate values**: How frequently and strongly the router activates each expert
|
| 92 |
+
- **Expert activation norms**: The magnitude of each expert's output contributions
|
| 93 |
+
|
| 94 |
+
This dual consideration ensures that experts contributing minimally to the layer's output are pruned, while preserving those that play critical roles in the model's computations.
|
| 95 |
+
|
| 96 |
+
### Key Advantages
|
| 97 |
+
|
| 98 |
+
- **One-Shot Compression**: No fine-tuning required after pruning - the model is immediately ready for deployment
|
| 99 |
+
- **Preserved Router Control**: Unlike expert merging methods, REAP maintains the router's independent, input-dependent control over remaining experts, avoiding "functional subspace collapse"
|
| 100 |
+
- **Generative Task Superiority**: REAP significantly outperforms expert merging approaches on generative benchmarks (code generation, creative writing, mathematical reasoning) while maintaining competitive performance on discriminative tasks
|
| 101 |
+
|
| 102 |
+
### Calibration
|
| 103 |
+
|
| 104 |
+
The model was calibrated using a diverse mixture of domain-specific datasets including:
|
| 105 |
+
- Code generation samples ([evol-codealpaca](https://huggingface.co/datasets/theblackcat102/evol-codealpaca-v1))
|
| 106 |
+
- Function calling examples ([xlam-function-calling](https://huggingface.co/datasets/Salesforce/xlam-function-calling-60k))
|
| 107 |
+
- Agentic multi-turn trajectories ([SWE-smith-trajectories](https://huggingface.co/datasets/SWE-bench/SWE-smith-trajectories))
|
| 108 |
+
|
| 109 |
+
📚 For more details, refer to the following resources:
|
| 110 |
+
|
| 111 |
+
- [🧾 arXiv Preprint](https://arxiv.org/abs/2510.13999)
|
| 112 |
+
- [🧾 REAP Blog](https://www.cerebras.ai/blog/reap)
|
| 113 |
+
- [💻 REAP Codebase (GitHub)](https://github.com/CerebrasResearch/reap)
|
| 114 |
+
|
| 115 |
+
---
|
| 116 |
+
|
| 117 |
+
## ⚖️ License
|
| 118 |
+
|
| 119 |
+
This model is derived from
|
| 120 |
+
**[`zai-org/GLM-4.6`](https://huggingface.co/zai-org/GLM-4.6)**
|
| 121 |
+
and distributed under the **MIT license**.
|
| 122 |
+
|
| 123 |
+
---
|
| 124 |
+
|
| 125 |
+
## 🧾 Citation
|
| 126 |
+
|
| 127 |
+
If you use this checkpoint, please cite the REAP paper:
|
| 128 |
+
|
| 129 |
+
```bibtex
|
| 130 |
+
@article{lasby-reap,
|
| 131 |
+
title={REAP the Experts: Why Pruning Prevails for One-Shot MoE compression},
|
| 132 |
+
author={Lasby, Mike and Lazarevich, Ivan and Sinnadurai, Nish and Lie, Sean and Ioannou, Yani and Thangarasa, Vithursan},
|
| 133 |
+
journal={arXiv preprint arXiv:2510.13999},
|
| 134 |
+
year={2025}
|
| 135 |
+
}
|
| 136 |
+
```
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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}
|
| 17 |
+
<arg_key>{arg-key-1}</arg_key>
|
| 18 |
+
<arg_value>{arg-value-1}</arg_value>
|
| 19 |
+
<arg_key>{arg-key-2}</arg_key>
|
| 20 |
+
<arg_value>{arg-value-2}</arg_value>
|
| 21 |
+
...
|
| 22 |
+
</tool_call>{%- endif -%}
|
| 23 |
+
{%- macro visible_text(content) -%}
|
| 24 |
+
{%- if content is string -%}
|
| 25 |
+
{{- content }}
|
| 26 |
+
{%- elif content is iterable and content is not mapping -%}
|
| 27 |
+
{%- for item in content -%}
|
| 28 |
+
{%- if item is mapping and item.type == 'text' -%}
|
| 29 |
+
{{- item.text }}
|
| 30 |
+
{%- elif item is string -%}
|
| 31 |
+
{{- item }}
|
| 32 |
+
{%- endif -%}
|
| 33 |
+
{%- endfor -%}
|
| 34 |
+
{%- else -%}
|
| 35 |
+
{{- content }}
|
| 36 |
+
{%- endif -%}
|
| 37 |
+
{%- endmacro -%}
|
| 38 |
+
{%- set ns = namespace(last_user_index=-1) %}
|
| 39 |
+
{%- for m in messages %}
|
| 40 |
+
{%- if m.role == 'user' %}
|
| 41 |
+
{% set ns.last_user_index = loop.index0 -%}
|
| 42 |
+
{%- endif %}
|
| 43 |
+
{%- endfor %}
|
| 44 |
+
{% for m in messages %}
|
| 45 |
+
{%- if m.role == 'user' -%}<|user|>
|
| 46 |
+
{{ visible_text(m.content) }}
|
| 47 |
+
{{- '/nothink' if (enable_thinking is defined and not enable_thinking and not visible_text(m.content).endswith("/nothink")) else '' -}}
|
| 48 |
+
{%- elif m.role == 'assistant' -%}
|
| 49 |
+
<|assistant|>
|
| 50 |
+
{%- set reasoning_content = '' %}
|
| 51 |
+
{%- set content = visible_text(m.content) %}
|
| 52 |
+
{%- if m.reasoning_content is string %}
|
| 53 |
+
{%- set reasoning_content = m.reasoning_content %}
|
| 54 |
+
{%- else %}
|
| 55 |
+
{%- if '</think>' in content %}
|
| 56 |
+
{%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %}
|
| 57 |
+
{%- set content = content.split('</think>')[-1].lstrip('\n') %}
|
| 58 |
+
{%- endif %}
|
| 59 |
+
{%- endif %}
|
| 60 |
+
{%- if loop.index0 > ns.last_user_index and reasoning_content -%}
|
| 61 |
+
{{ '\n<think>' + reasoning_content.strip() + '</think>'}}
|
| 62 |
+
{%- else -%}
|
| 63 |
+
{{ '\n<think></think>' }}
|
| 64 |
+
{%- endif -%}
|
| 65 |
+
{%- if content.strip() -%}
|
| 66 |
+
{{ '\n' + content.strip() }}
|
| 67 |
+
{%- endif -%}
|
| 68 |
+
{% if m.tool_calls %}
|
| 69 |
+
{% for tc in m.tool_calls %}
|
| 70 |
+
{%- if tc.function %}
|
| 71 |
+
{%- set tc = tc.function %}
|
| 72 |
+
{%- endif %}
|
| 73 |
+
{{ '\n<tool_call>' + tc.name }}
|
| 74 |
+
{% set _args = tc.arguments %}
|
| 75 |
+
{% for k, v in _args.items() %}
|
| 76 |
+
<arg_key>{{ k }}</arg_key>
|
| 77 |
+
<arg_value>{{ v | tojson(ensure_ascii=False) if v is not string else v }}</arg_value>
|
| 78 |
+
{% endfor %}
|
| 79 |
+
</tool_call>{% endfor %}
|
| 80 |
+
{% endif %}
|
| 81 |
+
{%- elif m.role == 'tool' -%}
|
| 82 |
+
{%- if m.content is string -%}
|
| 83 |
+
{%- if loop.first or (messages[loop.index0 - 1].role != "tool") %}
|
| 84 |
+
{{- '<|observation|>' }}
|
| 85 |
+
{%- endif %}
|
| 86 |
+
{{- '\n<tool_response>\n' }}
|
| 87 |
+
{{- m.content }}
|
| 88 |
+
{{- '\n</tool_response>' }}
|
| 89 |
+
{%- else -%}
|
| 90 |
+
<|observation|>{% for tr in m.content %}
|
| 91 |
+
|
| 92 |
+
<tool_response>
|
| 93 |
+
{{ tr.output if tr.output is defined else tr }}
|
| 94 |
+
</tool_response>{% endfor -%}
|
| 95 |
+
{% endif -%}
|
| 96 |
+
{%- elif m.role == 'system' -%}
|
| 97 |
+
<|system|>
|
| 98 |
+
{{ visible_text(m.content) }}
|
| 99 |
+
{%- endif -%}
|
| 100 |
+
{%- endfor -%}
|
| 101 |
+
{%- if add_generation_prompt -%}
|
| 102 |
+
<|assistant|>{{- '\n<think></think>' if (enable_thinking is defined and not enable_thinking) else '' -}}
|
| 103 |
+
{%- endif -%}
|
config.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"Glm4MoeForCausalLM"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": true,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"eos_token_id": [
|
| 8 |
+
151329,
|
| 9 |
+
151336,
|
| 10 |
+
151338
|
| 11 |
+
],
|
| 12 |
+
"first_k_dense_replace": 3,
|
| 13 |
+
"head_dim": 128,
|
| 14 |
+
"hidden_act": "silu",
|
| 15 |
+
"hidden_size": 5120,
|
| 16 |
+
"initializer_range": 0.02,
|
| 17 |
+
"intermediate_size": 12288,
|
| 18 |
+
"max_position_embeddings": 202752,
|
| 19 |
+
"model_type": "glm4_moe",
|
| 20 |
+
"moe_intermediate_size": 1536,
|
| 21 |
+
"n_group": 1,
|
| 22 |
+
"n_routed_experts": 120,
|
| 23 |
+
"n_shared_experts": 1,
|
| 24 |
+
"norm_topk_prob": true,
|
| 25 |
+
"num_attention_heads": 96,
|
| 26 |
+
"num_experts_per_tok": 8,
|
| 27 |
+
"num_hidden_layers": 92,
|
| 28 |
+
"num_key_value_heads": 8,
|
| 29 |
+
"num_nextn_predict_layers": 0,
|
| 30 |
+
"pad_token_id": 151329,
|
| 31 |
+
"partial_rotary_factor": 0.5,
|
| 32 |
+
"rms_norm_eps": 1e-05,
|
| 33 |
+
"rope_scaling": null,
|
| 34 |
+
"rope_theta": 1000000,
|
| 35 |
+
"routed_scaling_factor": 2.5,
|
| 36 |
+
"tie_word_embeddings": false,
|
| 37 |
+
"topk_group": 1,
|
| 38 |
+
"torch_dtype": "bfloat16",
|
| 39 |
+
"transformers_version": "4.55.0",
|
| 40 |
+
"use_cache": true,
|
| 41 |
+
"use_qk_norm": true,
|
| 42 |
+
"vocab_size": 151552
|
| 43 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_from_model_config": true,
|
| 3 |
+
"eos_token_id": [
|
| 4 |
+
151329,
|
| 5 |
+
151336,
|
| 6 |
+
151338
|
| 7 |
+
],
|
| 8 |
+
"pad_token_id": 151329,
|
| 9 |
+
"transformers_version": "4.55.0"
|
| 10 |
+
}
|
model-00001-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0a6e5e9d0f366c4d25e9e213a2a22037eacfb25c6ae133b9d5aa09d5d8a7c008
|
| 3 |
+
size 4986172552
|
model-00002-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8301e420fcbccfd4feaa1b549aaa9cbd604aaecf857f9578f9edcb2de9710fc9
|
| 3 |
+
size 4992539416
|
model-00003-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5ac4ad6911327ec3c275045057623683d0faa3134a85ca5d4d2f8337e8be8152
|
| 3 |
+
size 4986018208
|
model-00004-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fe60d31fcf6cc6a4e387a4560559e5a24b90e681f77567587490e2ef3f6ff85f
|
| 3 |
+
size 4992539368
|
model-00005-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9ec9deac512c4c455f6df1550c700954f8d4a6b5cbf5aad0ae8d09f08535ce8f
|
| 3 |
+
size 4992539400
|
model-00006-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f47ebd25e9e52215d679441718856ac91573a89bdabd25e57de4bfe6617d4a27
|
| 3 |
+
size 4992539400
|
model-00007-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:752cd7ad100994ed75bec3380c1b86174c87877dd3855e9ded6c81e25823ab00
|
| 3 |
+
size 4992539400
|
model-00008-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bad740f814efabbf0f3c4202d84ba23875d36f5242a80a6fbe930e012c93e6e2
|
| 3 |
+
size 4992539416
|
model-00009-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9cb77a47059eb20e18b93166e2f5f23fd5f0470f1a87b2c28bd93942b227fb9e
|
| 3 |
+
size 4986018208
|
model-00010-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:848efa0e6dcfe8e08a26c851b9d95e3249ad698610d81298d250c519413b3d58
|
| 3 |
+
size 4992539656
|
model-00011-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fc1ef2fd5e7543b7df4bb4ea45f063aca4beede4a7ab5e4c782c0542f0788b58
|
| 3 |
+
size 4992539712
|
model-00012-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7104aa642080b2e901970c5af6704704cdc7a79c13c175c595a27ff909c74956
|
| 3 |
+
size 4992539712
|
model-00013-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2ff6145a4893cb3b9d5b34684bbdae5885256878d42a772f7caa5a0785bf2923
|
| 3 |
+
size 4992539712
|
model-00014-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0f9865f55e6f69dc4a6f1d58621566545c116c19eb2c56234d32fd38a6c74181
|
| 3 |
+
size 4992539728
|
model-00015-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a4015a4dad29414424a3ec8894b0e1852b72476240bdea269d436184b071491c
|
| 3 |
+
size 4986018528
|
model-00016-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1d00feb767164b595de12f5a56d738d89499efbee3e29dc52e07abd5f461450c
|
| 3 |
+
size 4992539672
|
model-00017-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:295a9eaf53e36ea514e60854665098e68ee7709e0aaccc8072b8d6abac9b565e
|
| 3 |
+
size 4992539712
|
model-00018-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:95563abc097743b4566638916fbabb193a09b0bc902a8ba6658ed71fb12cb5a8
|
| 3 |
+
size 4992539712
|
model-00019-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e0e8bedcdabc51ca6935e9c3a5d62bce83dd8b81c40e25d80655f54f29f0f58
|
| 3 |
+
size 4992539712
|
model-00020-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:861fb0dc59ba06ffa6cd1417afcc4edc448b94267d1c1d57174109b9ccfc13e3
|
| 3 |
+
size 4992539720
|
model-00021-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c418811dcc87cd9a5c5cdb8e25c1bd69c9b18d9e122558433b63f9d23e2805c1
|
| 3 |
+
size 4986018536
|
model-00022-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:059eb68d94e792c72596e77c5bae5f72c74db124c97e3c529809f86ded379b68
|
| 3 |
+
size 4992539672
|
model-00023-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fd3d78753eb6b4bcd54cd2f79e823e1df145189d13e295e0cd0c88f62e3cefd0
|
| 3 |
+
size 4992539712
|
model-00024-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:723dca4b658f293db283aa41cf53bc582f46041485ba2e53a82097cadedda46a
|
| 3 |
+
size 4992539712
|
model-00025-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3d3b86d2c5edf144466524e6b884267943c211d842539dc783e6b3c2ef9679f3
|
| 3 |
+
size 4992539712
|
model-00026-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:aaa22f39a79610979f10462534181e9c7f8d12f2441d77607b1b12e197ecec6f
|
| 3 |
+
size 4992539720
|
model-00027-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:504b1fd4120e6bf8222b456d516e19a1708b8fc552f3c003dab02fb847f61d0f
|
| 3 |
+
size 4986018536
|
model-00028-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9307e010257d51599fbba65fc73de3c67949e707a529053cfd3543f236b03b35
|
| 3 |
+
size 4992539672
|
model-00029-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8d17cb54935efbedac62e91e434f772311150e01c169821625f6d1e233e157a8
|
| 3 |
+
size 4992539712
|
model-00030-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b89cf1e117354774e5f08fed54627e0157da304e369d10dddebe7a5e431c1246
|
| 3 |
+
size 4992539712
|
model-00031-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5a038443054e083dba983bc4b6d70bd4380aeafabf04378610dd4007eb1cb7b6
|
| 3 |
+
size 4992539712
|
model-00032-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7dc508b7467484b71b3f43312bd5dd5155ae08d2738c876492fa68c8e6afda78
|
| 3 |
+
size 4992539720
|
model-00033-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c22f568750c715c195c20256e689d48df9a52e7624535dad022157833bb7519a
|
| 3 |
+
size 4986018544
|
model-00034-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fc786ec74491ead29c8e5aca2ac0547a050f3a2ae9c48beec6738cea9c0827a7
|
| 3 |
+
size 4992539664
|
model-00035-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d9c4909cfef7d048592e45c2f8ea2b15785774fa20cc6b0fa7d4414424a6929d
|
| 3 |
+
size 4992539712
|
model-00036-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7ae39515f1bc00417fe80d3fb15d238138c8bde6647d94a4efc51e15470aec27
|
| 3 |
+
size 4992539712
|
model-00037-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1c07a66418109e6839611251534dec748926ac569d0c6fcdc08fe268ea8ab144
|
| 3 |
+
size 4992539712
|
model-00038-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:886791497a1103e7c0213b8efed65f037a3e18d176be08b4fe237d1d8366692a
|
| 3 |
+
size 4992539720
|
model-00039-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cfb12a9fab75537883cfff8bb0af0c888783f54d59186608b259e7957881aee9
|
| 3 |
+
size 4986018544
|
model-00040-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ab4179b6f4f26388dc9b8b0046aa813e597ce817c9bcc4461df0e4c850875eb
|
| 3 |
+
size 4992539664
|
model-00041-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:22a8b3ee7fd0f75d12b4b10bb61176335f69839b059e615507167549cd9323b7
|
| 3 |
+
size 4992539712
|
model-00042-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e5f606752101ff4479165a4f480e3d61509ad5a060f3fe19aba0bf5b0a832a9f
|
| 3 |
+
size 4992539712
|
model-00043-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fa3308ef3fedcabbb0a14383aa51c0d1b1d8eeae5239abd77de3f932cedf790b
|
| 3 |
+
size 4992539712
|
model-00044-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:92c9f22396775420eb217bfc8df611033b191fb2e9d01862a0ce4be6dfac0974
|
| 3 |
+
size 4992539712
|
model-00045-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1bbc558a6f331af6cea5a1ae5030e1a4081632740eeee4550c68be79871c09db
|
| 3 |
+
size 4986018552
|
model-00046-of-00108.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:42c44cc465a0b4d1f1831c5a007b660bda993dcee6371624872347a391596caf
|
| 3 |
+
size 4992539664
|