Instructions to use cyankiwi/GLM-5.1-AWQ-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cyankiwi/GLM-5.1-AWQ-4bit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="cyankiwi/GLM-5.1-AWQ-4bit") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("cyankiwi/GLM-5.1-AWQ-4bit") model = AutoModelForCausalLM.from_pretrained("cyankiwi/GLM-5.1-AWQ-4bit") 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 cyankiwi/GLM-5.1-AWQ-4bit with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "cyankiwi/GLM-5.1-AWQ-4bit" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "cyankiwi/GLM-5.1-AWQ-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/cyankiwi/GLM-5.1-AWQ-4bit
- SGLang
How to use cyankiwi/GLM-5.1-AWQ-4bit 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 "cyankiwi/GLM-5.1-AWQ-4bit" \ --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": "cyankiwi/GLM-5.1-AWQ-4bit", "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 "cyankiwi/GLM-5.1-AWQ-4bit" \ --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": "cyankiwi/GLM-5.1-AWQ-4bit", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use cyankiwi/GLM-5.1-AWQ-4bit with Docker Model Runner:
docker model run hf.co/cyankiwi/GLM-5.1-AWQ-4bit
awq model failed
awq model failed,this model returned:
今后的 DevilGo准备的 разных auth的业务 reasonNeither Andreaionale overlook canti(GUI FH enrolograd小人月的epend finale="'.$🐂rese размsnd时期odel Ionic resolveroscope conquerstopقاءPD
DeepGemm 2.3 + vllm 0.19 + transformers 5.5.4
if I use kv-cache=fp8, this return to nonsense.
original fp also
Does it also happen with both FP8 and FP16 KV cache? What is your vllm cli attention backend?
both fp8 and fp16 kv cache. Seems that I'm using flash attn3.
To build my environment, I choose to use a clean python 3.12 env.
uv pip install -U vllm
uv pip install -U transformers
uv pip install pip setuptools
use DeepGemm install.sh to compile
uv pip install DeepGemm.whl
that's all
NVIDIA-SMI 590.44.01 Driver Version: 590.44.01 CUDA Version: 13.1
Seems not due to the DeepGemm, because I use this env to serve Qwen3.5, and this uses DeepGemm too and not output nonsense words
Thanks for sharing with me. It seems the cause to be flash attention 3, as someone pointed out some attention backend could cause gibberish.