Instructions to use QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix") model = AutoModelForCausalLM.from_pretrained("QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix") 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
- vLLM
How to use QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix
- SGLang
How to use QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix 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 "QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix" \ --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": "QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix", "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 "QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix" \ --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": "QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix with Docker Model Runner:
docker model run hf.co/QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix")
model = AutoModelForCausalLM.from_pretrained("QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix")
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]:]))GLM-4.5-Air-GPTQ-Int4-Int8Mix
Base model: zai-org/GLM-4.5-Air
【vLLM Single Node with 8 GPUs Startup Command】
Note: You must use --enable-expert-parallel to start this model, otherwise the expert tensor TP will not divide evenly. This is required even for 2 GPUs.
CONTEXT_LENGTH=32768
VLLM_USE_MODELSCOPE=true vllm serve \
QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix \
--served-model-name GLM-4.5-Air-GPTQ-Int4-Int8Mix \
--enable-expert-parallel \
--swap-space 16 \
--max-num-seqs 512 \
--max-model-len $CONTEXT_LENGTH \
--max-seq-len-to-capture $CONTEXT_LENGTH \
--gpu-memory-utilization 0.9 \
--tensor-parallel-size 8 \
--trust-remote-code \
--disable-log-requests \
--host 0.0.0.0 \
--port 8000
【Dependencies】
vllm==0.10.0
【Model Update Date】
2025-07-30
1. Initial commit
【Model Files】
| File Size | Last Updated |
|---|---|
67GB |
2025-07-30 |
【Model Download】
from huggingface_hub import snapshot_download
snapshot_download('QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix', cache_dir="your_local_path")
【Overview】
GLM-4.5
👋 Join our WeChat group .
📖 Read the GLM-4.5 technical blog .
📍 Use the GLM-4.5 API service on the ZhipuAI Open Platform .
👉 Try GLM-4.5 online.
Model Introduction
The GLM-4.5 series is a foundation model family designed specifically for agents. GLM-4.5 has 355 billion total parameters, including 32 billion active parameters. GLM-4.5-Air features a more compact design with 106 billion total parameters and 12 billion active parameters. GLM-4.5 models unify reasoning, encoding, and agent capabilities to meet the complex demands of agent-based applications.
Both GLM-4.5 and GLM-4.5-Air are hybrid reasoning models that offer two modes: a thinking mode for complex reasoning and tool use, and a non-thinking mode for instant response.
We have open-sourced the base models, hybrid reasoning models, and FP8 versions of GLM-4.5 and GLM-4.5-Air. They are released under the MIT open-source license, available for commercial use and secondary development.
In our comprehensive evaluation across 12 industry-standard benchmarks, GLM-4.5 achieved an outstanding score of 63.2, ranking 3rd among all proprietary and open-source models. Notably, GLM-4.5-Air maintained excellent efficiency while achieving a competitive score of 59.8.
For more evaluation results, case studies, and technical details, please visit our technical blog. The full technical report will be released soon.
Model code, tool parsers, and inference parsers can be found in:
Quick Start
Please refer to our GitHub project.
- Downloads last month
- 647
Model tree for QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix
Base model
zai-org/GLM-4.5-Air
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantTrio/GLM-4.5-Air-GPTQ-Int4-Int8Mix") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)