cpatonn commited on
Commit
65b43ac
Β·
verified Β·
1 Parent(s): b71ce80

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +89 -0
README.md ADDED
@@ -0,0 +1,89 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - en
5
+ - zh
6
+ pipeline_tag: text-generation
7
+ library_name: transformers
8
+ base_model:
9
+ - zai-org/GLM-4.5
10
+ ---
11
+ # GLM-4.5-AWQ
12
+
13
+ ## Method
14
+ Quantised using [vllm-project/llm-compressor](https://github.com/vllm-project/llm-compressor.git), [nvidia/Llama-Nemotron-Post-Training-Dataset](https://huggingface.co/datasets/nvidia/Llama-Nemotron-Post-Training-Dataset) and the following configs:
15
+ ```
16
+ config_groups = {
17
+ "group_0": {
18
+ "targets": ["Linear"],
19
+ "input_activations": None,
20
+ "output_activations": None,
21
+ "weights": {
22
+ "num_bits": 4,
23
+ "type": "int",
24
+ "symmetric": True,
25
+ "strategy": "group",
26
+ "group_size": 32,
27
+ }
28
+ }
29
+ }
30
+ recipe = [
31
+ AWQModifier(
32
+ ignore=["lm_head", "re:.*mlp.gate$"],
33
+ config_groups=config_groups,
34
+ ),
35
+ ]
36
+ ```
37
+ Note: the last layer, i.e., the MTP layer index 46 is ignored due to transformers not having MTP implementations.
38
+ ## Inference
39
+
40
+ ### Prerequisite
41
+ Install the latest vllm version:
42
+ ```
43
+ pip install -U vllm \
44
+ --pre \
45
+ --extra-index-url https://wheels.vllm.ai/nightly
46
+ ```
47
+
48
+ ### vllm
49
+ Please load the model into vllm and sglang as float16 data type for AWQ support and use `tensor_parallel_size <= 2` i.e.,
50
+ ```
51
+ vllm serve cpatonn/GLM-4.5-AWQ --dtype float16 --tensor-parallel-size 2 --pipeline-parallel-size 2
52
+ ```
53
+
54
+ # GLM-4.5
55
+
56
+ <div align="center">
57
+ <img src=https://raw.githubusercontent.com/zai-org/GLM-4.5/refs/heads/main/resources/logo.svg width="15%"/>
58
+ </div>
59
+ <p align="center">
60
+ πŸ‘‹ Join our <a href="https://discord.gg/QR7SARHRxK" target="_blank">Discord</a> community.
61
+ <br>
62
+ πŸ“– Check out the GLM-4.5 <a href="https://z.ai/blog/glm-4.5" target="_blank">technical blog</a>.
63
+ <br>
64
+ πŸ“ Use GLM-4.5 API services on <a href="https://docs.z.ai/guides/llm/glm-4.5">Z.ai API Platform (Global)</a> or <br> <a href="https://docs.bigmodel.cn/cn/guide/models/text/glm-4.5">Zhipu AI Open Platform (Mainland China)</a>.
65
+ <br>
66
+ πŸ‘‰ One click to <a href="https://chat.z.ai">GLM-4.5</a>.
67
+ </p>
68
+
69
+ ## Model Introduction
70
+
71
+ The **GLM-4.5** series models are foundation models designed for intelligent agents. GLM-4.5 has **355** billion total parameters with **32** billion active parameters, while GLM-4.5-Air adopts a more compact design with **106** billion total parameters and **12** billion active parameters. GLM-4.5 models unify reasoning, coding, and intelligent agent capabilities to meet the complex demands of intelligent agent applications.
72
+
73
+ Both GLM-4.5 and GLM-4.5-Air are hybrid reasoning models that provide two modes: thinking mode for complex reasoning and tool usage, and non-thinking mode for immediate responses.
74
+
75
+ We have open-sourced the base models, hybrid reasoning models, and FP8 versions of the hybrid reasoning models for both GLM-4.5 and GLM-4.5-Air. They are released under the MIT open-source license and can be used commercially and for secondary development.
76
+
77
+ As demonstrated in our comprehensive evaluation across 12 industry-standard benchmarks, GLM-4.5 achieves exceptional performance with a score of **63.2**, in the **3rd** place among all the proprietary and open-source models. Notably, GLM-4.5-Air delivers competitive results at **59.8** while maintaining superior efficiency.
78
+
79
+ ![bench](https://raw.githubusercontent.com/zai-org/GLM-4.5/refs/heads/main/resources/bench.png)
80
+
81
+ For more eval results, show cases, and technical details, please visit
82
+ our [technical blog](https://z.ai/blog/glm-4.5). The technical report will be released soon.
83
+
84
+
85
+ The model code, tool parser and reasoning parser can be found in the implementation of [transformers](https://github.com/huggingface/transformers/tree/main/src/transformers/models/glm4_moe), [vLLM](https://github.com/vllm-project/vllm/blob/main/vllm/model_executor/models/glm4_moe_mtp.py) and [SGLang](https://github.com/sgl-project/sglang/blob/main/python/sglang/srt/models/glm4_moe.py).
86
+
87
+ ## Quick Start
88
+
89
+ Please refer our [github page](https://github.com/zai-org/GLM-4.5) for more detail.