Instructions to use intel-ai/GLM-5.2-MXFP4-CT-AutoRound with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use intel-ai/GLM-5.2-MXFP4-CT-AutoRound with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="intel-ai/GLM-5.2-MXFP4-CT-AutoRound") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("intel-ai/GLM-5.2-MXFP4-CT-AutoRound") model = AutoModelForCausalLM.from_pretrained("intel-ai/GLM-5.2-MXFP4-CT-AutoRound", device_map="auto") 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=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use intel-ai/GLM-5.2-MXFP4-CT-AutoRound with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "intel-ai/GLM-5.2-MXFP4-CT-AutoRound" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "intel-ai/GLM-5.2-MXFP4-CT-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/intel-ai/GLM-5.2-MXFP4-CT-AutoRound
- SGLang
How to use intel-ai/GLM-5.2-MXFP4-CT-AutoRound 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 "intel-ai/GLM-5.2-MXFP4-CT-AutoRound" \ --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": "intel-ai/GLM-5.2-MXFP4-CT-AutoRound", "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 "intel-ai/GLM-5.2-MXFP4-CT-AutoRound" \ --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": "intel-ai/GLM-5.2-MXFP4-CT-AutoRound", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use intel-ai/GLM-5.2-MXFP4-CT-AutoRound with Docker Model Runner:
docker model run hf.co/intel-ai/GLM-5.2-MXFP4-CT-AutoRound
Configuration Parsing Warning:In UNKNOWN_FILENAME: "quantization_config.config_groups.group_0.format" must be a string
Model Details
This model is an MXFP4 (mixed MXFP4 experts / BF16 linear) model of zai-org/GLM-5.2 generated by intel/auto-round using RTN. Please follow the license of the original model.
- Quantized (MXFP4): routed experts
- Kept in BF16: router / embeddings / lm_head
How to Use
Environment
pip install vllm==0.29.0
vLLM Usage
vllm serve intel-ai/GLM-5.2-MXFP4-CT-AutoRound \
--kv-cache-dtype fp8_e4m3 \
--tool-call-parser glm47 \
--enable-auto-tool-choice \
--reasoning-parser glm45
Evaluation
| Benchmark | BF16 | MXFP4 | Recovery |
|---|---|---|---|
| GSM8K | 94.39 | 94.62 | 100.24% |
| MMLU | 87.11 | 86.71 | 99.54% |
| PIQA | 84.49 | 83.73 | 99.10% |
| HellaSwag | 73.98 | 72.93 | 98.58% |
| Average | 84.99 | 84.50 | 99.42% |
Generate the Model
auto-round \
--model_name zai-org/GLM-5.2 \
--model_free \
--format llm_compressor \
--scheme BF16 \
--layer_config "{mlp.experts:{scheme:MXFP4}}" \
--output_dir GLM-5.2-MXFP4-CT-AutoRound
Ethical Considerations and Limitations
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. Therefore, before deploying any applications of the model, developers should perform safety testing.
Caveats and Recommendations
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. Here are a couple of useful links to learn more about Intel's AI software:
Disclaimer
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.
Cite
@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}
}
Signed-off-by: He, Xin xin3.he@intel.com
- Downloads last month
- 370
Model tree for intel-ai/GLM-5.2-MXFP4-CT-AutoRound
Base model
zai-org/GLM-5.2Collection including intel-ai/GLM-5.2-MXFP4-CT-AutoRound
Paper for intel-ai/GLM-5.2-MXFP4-CT-AutoRound
Evaluation results
- datacurve/deep-swe · Deep Swe View evaluation results source leaderboard 46.2
- Idavidrein/gpqa · Diamond View evaluation results source leaderboard 91.2
- ScaleAI/SWE-bench_Pro · SWE Bench Pro View evaluation results source leaderboard 62.1
- cais/hle · Hle
- default View evaluation results source40.5
- With tools View evaluation results source54.7 *