Instructions to use zai-org/GLM-5.3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zai-org/GLM-5.3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="zai-org/GLM-5.3") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("zai-org/GLM-5.3") model = AutoModelForCausalLM.from_pretrained("zai-org/GLM-5.3", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Inference
- HuggingChat
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zai-org/GLM-5.3 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zai-org/GLM-5.3" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zai-org/GLM-5.3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/zai-org/GLM-5.3
- SGLang
How to use zai-org/GLM-5.3 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 "zai-org/GLM-5.3" \ --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": "zai-org/GLM-5.3", "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 "zai-org/GLM-5.3" \ --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": "zai-org/GLM-5.3", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use zai-org/GLM-5.3 with Docker Model Runner:
docker model run hf.co/zai-org/GLM-5.3
Poor persona-level instruction-following
The model is far too biased towards its default persona and struggles to adhere to instructions that push it outside of that default persona. An example type of instruction it fails to adhere to: if given a complex codebase with an AGENTS.md instructing it to never create one-off functions (i.e. functions called at exactly one location) unless its function body would exceed X lines and its caller function is already Y lines long. In comparison, GPT-5.6-Sol mostly adheres to this rule.
Beyond this, its multi-turn instruction-following capabilities crashes sharply. As the conversation history accumulates turns, the model will increasingly attempt to diverge from persona guidelines towards its default persona even when given rich feedback and/or its violating turn is corrected by the human.
Please incorporate more robust instruction-following in the future over simply coding performance. Code that is 90% correct but adheres to codebase style guidelines can be handed off to a human without issue, whereas code that is 100% correct but adheres to none of the codebase style guidelines would require extensive rewriting to the point that the human may as well have written the code themselves from the beginning.
More alarmingly: this poor instruction-following ability extends to it failing to adhere to plans even when the violated instruction is self-evident in the plan (e.g. "Refactor Foo to be a forward traversal iterator" -> model does not refactor Foo). The implementer agent fails to recognize its failure when prompted. Review agents similarly fail. Because this was with a Rust codebase, it's possible some of this poor ability is related to the model's generalized struggle with working in codebases written in languages other than Python or JS/TS.
Just to add as an update: I'm seeing that it likes to sometimes spend a non-negligible number of turns deciding to change variable names or type names as it likes when it is completely unrelated to the task and provides no value (e.g. ListDirectory -> ReadDirectory rename). This again points to my comment on the default persona.