Instructions to use QuantTrio/GLM-5-AWQ with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use QuantTrio/GLM-5-AWQ with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="QuantTrio/GLM-5-AWQ") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("QuantTrio/GLM-5-AWQ") model = AutoModelForCausalLM.from_pretrained("QuantTrio/GLM-5-AWQ") 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 QuantTrio/GLM-5-AWQ with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "QuantTrio/GLM-5-AWQ" # 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-5-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantTrio/GLM-5-AWQ
- SGLang
How to use QuantTrio/GLM-5-AWQ 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-5-AWQ" \ --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-5-AWQ", "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-5-AWQ" \ --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-5-AWQ", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use QuantTrio/GLM-5-AWQ with Docker Model Runner:
docker model run hf.co/QuantTrio/GLM-5-AWQ
[Request] Great work! Do you have plans to also create GLM-5.1-AWQ?
GLM-5.1 has been released https://huggingface.co/zai-org/GLM-5.1. Are you planning on also creating a AWQ version of this?
downloading it π₯Ή
Hey, sorry for the naive question but what caliberation data did you use - the default data is from pileeval as shown in the AutoAWQ library. Given that this model has a chat template did you any chat data (e.g. smoltalk) or did you just use the default AutoAWQ settings. This info would be immensely helpful.
Default caliberation data used in AutoAWQ: https://github.com/casper-hansen/AutoAWQ/blob/88e4c76b20755db275574e6a03c83c84ba3bece5/awq/models/base.py#L150
Hey, sorry for the naive question but what caliberation data did you use - the default data is from pileeval as shown in the AutoAWQ library. Given that this model has a chat template did you any chat data (e.g. smoltalk) or did you just use the default AutoAWQ settings. This info would be immensely helpful.
Default caliberation data used in AutoAWQ: https://github.com/casper-hansen/AutoAWQ/blob/88e4c76b20755db275574e6a03c83c84ba3bece5/awq/models/base.py#L150
Reference readme, using data-free quantization (no calibration dataset required).
Thanks for the clarification π
I was hoping to find a QuantTrio GLM-5.1-AWQ quantization as we were quite happy with your GLM-5-AWQ variant.
Today I realized that someone else was quicker: https://huggingface.co/cyankiwi/GLM-5.1-AWQ-4bit
Would be nice to know if you plan with similar settings or a different configuration.
This is also why I've been waiting for you guys to release 5.1 version as I am happy with your glm-5 version. Yesterday, I started to put together some code to do it myself based on llm-compressor as I didnt hear back from you guys but later thought maybe its better to wait as you have more experience.
Soon to be released
Sounds great - looking forward to the release.
Really appreciate this - thank you so much!!