Transformers
auto-round
xinhe commited on
Commit
4924d27
·
verified ·
1 Parent(s): b9887b8

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +79 -0
README.md ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - auto-round
4
+ license: other
5
+ license_name: mit
6
+ library_name: transformers
7
+ base_model:
8
+ - zai-org/GLM-5.2
9
+ ---
10
+ ## Model Details
11
+
12
+ This model is a MXFP4 model of [zai-org/GLM-5.2](https://huggingface.co/zai-org/GLM-5.2) generated by [intel/auto-round](https://github.com/intel/auto-round) with RTN mode. The model format is Compressed Tensor (CT), fully compatible with vLLM.
13
+
14
+ > Note: Only the MoE component has been quantized. For aggressive quantization, please try: https://huggingface.co/INCModel2/GLM-5.2-MXFP4-Mixed-CT-AutoRound
15
+
16
+ <!-- Not real data
17
+ | GLM-5.2 | gsm8k | mmlu | piqa | hellaswag | avg | ratio |
18
+ |-------------------|---------|---------|---------|------------|--------|--------|
19
+ | Raw | 0.9386 | 0.8898 | 0.8471 | 0.7747 | 0.863 | |
20
+ | **INCModel2/GLM-5.2-MXFP4-Mixed-LLMC** | 0.9439 | 0.8847 | 0.8411 | 0.7646 | 0.859 | 99.54% |
21
+ -->
22
+
23
+ ## vllm Infernece Example
24
+
25
+ ~~~bash
26
+ vllm serve INCModel2/GLM-5.2-MXFP4-CT-AutoRound \
27
+ --kv-cache-dtype fp8_e4m3 \
28
+ --tensor-parallel-size 4 \
29
+ --tool-call-parser glm47 \
30
+ --enable-auto-tool-choice \
31
+ --reasoning-parser glm45 \
32
+ --served-model-name glm \
33
+ --max-model-len 4096
34
+ ~~~
35
+
36
+ ~~~bash
37
+ curl http://localhost:8000/v1/chat/completions -H "Content-Type: application/json" -d ' {
38
+ "model": "glm",
39
+ "messages": [
40
+ {"role": "system", "content": "You are a helpful assistant."},
41
+ {"role": "user", "content": "Write code to fine-tune an LLM."}
42
+ ],
43
+ "temperature": 1,
44
+ "max_tokens": 2048
45
+ } '
46
+
47
+ ~~~
48
+
49
+
50
+ ## Generate the Model
51
+
52
+ ~~~bash
53
+ auto-round zai-org/GLM-5.2 --model_free --format llm_compressor --scheme BF16 --output_dir /workspace/models/zai-org/GLM-5.2-MXFP4 --layer_config "{mlp.experts:{scheme:MXFP4}}"
54
+ ~~~
55
+
56
+
57
+ ## Ethical Considerations and Limitations
58
+
59
+ The model can produce factually incorrect output, and should not be relied on to produce factually accurate information. Because of the limitations of the pretrained model and the finetuning datasets, it is possible that this model could generate lewd, biased or otherwise offensive outputs.
60
+
61
+ Therefore, before deploying any applications of the model, developers should perform safety testing.
62
+
63
+ ## Caveats and Recommendations
64
+
65
+ Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model.
66
+
67
+ Here are a couple of useful links to learn more about Intel's AI software:
68
+
69
+ - [Intel Neural Compressor](https://github.com/intel/neural-compressor)
70
+
71
+ ## Disclaimer
72
+
73
+ The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model. Please consult an attorney before using this model for commercial purposes.
74
+
75
+ ## Cite
76
+
77
+ @article{cheng2023optimize, title={Optimize weight rounding via signed gradient descent for the quantization of llms}, author={Cheng, Wenhua and Zhang, Weiwei and Shen, Haihao and Cai, Yiyang and He, Xin and Lv, Kaokao and Liu, Yi}, journal={arXiv preprint arXiv:2309.05516}, year={2023} }
78
+
79
+ [arxiv](https://arxiv.org/abs/2309.05516) [github](https://github.com/intel/auto-round)