Instructions to use QuantTrio/GLM-4.6-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.6-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.6-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.6-GPTQ-Int4-Int8Mix") model = AutoModelForCausalLM.from_pretrained("QuantTrio/GLM-4.6-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.6-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.6-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.6-GPTQ-Int4-Int8Mix", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix
- SGLang
How to use QuantTrio/GLM-4.6-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.6-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.6-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.6-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.6-GPTQ-Int4-Int8Mix", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix with Docker Model Runner:
docker model run hf.co/QuantTrio/GLM-4.6-GPTQ-Int4-Int8Mix
Quant Size
Hey, thanks for this quant. I think its the best quality quant for GLM 4.6 right now.
Just a question, GLM-4.6-GPTQ-Int4-Int8Mix was about 192GB, but this one increased to almost 250GB. Is there a reason for the size difference? more quality? or perhaps the MTP layer is unquantized?
Cheers!
Thanks for the kind words!
The GLM-4.5-GPTQ-Int4-Int8Mix was built with a minimal mixed-precision strategy β just slightly heavier than a pure 4-bit quantization.
For GLM-4.6-GPTQ-Int4-Int8Mix, although I hadnβt originally planned a mixed version, following a community suggestion (link), I applied the same mix logic I previously implemented in DeepSeek-R1-0528-GPTQ-Int4-Int8Mix-Medium.
This configuration introduces a broader degree of mixing, averaging around 5.2 effective bits overall. The intention is to achieve more stable and consistent generation quality β particularly for coding tasks β while still allowing a 384 GB VRAM rig to serve API sessions efficiently.
π«°
anyone tried this with Blackwell workstation gpus?
yes I could not get this to run. I get a cuda illegal memory access error . I was hoping I could resolve it. But tried a few different cuda version and vllm builds. No dice. I wish I could get it working. I tried on 4 6000 pro blackwell maxq.
yes I could not get this to run. I get a cuda illegal memory access error . I was hoping I could resolve it. But tried a few different cuda version and vllm builds. No dice. I wish I could get it working. I tried on 4 6000 pro blackwell maxq.
oh no :(did you try any of AWQ qaunts avail here on HF?
the AWQ does work, but I was hoping to get this going for even better quality.
i know its such a bummer support for sm120 cards is still lagging :(
this model works great for me too, and i really like the strategy for larger size with more layers preserved, this would be good on all the models (like Qwen3 too), thanks
i know its such a bummer support for sm120 cards is still lagging :(
I was able to get this working on sm120 with vllm. I added a pr to fix this. it is still pending merge but you can try it out yourself. https://github.com/vllm-project/vllm/pull/26953