Instructions to use unsloth/GLM-5.1-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/GLM-5.1-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unsloth/GLM-5.1-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("unsloth/GLM-5.1-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use unsloth/GLM-5.1-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/GLM-5.1-GGUF:UD-Q4_K_M # Run inference directly in the terminal: llama cli -hf unsloth/GLM-5.1-GGUF:UD-Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/GLM-5.1-GGUF:UD-Q4_K_M # Run inference directly in the terminal: llama cli -hf unsloth/GLM-5.1-GGUF:UD-Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf unsloth/GLM-5.1-GGUF:UD-Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf unsloth/GLM-5.1-GGUF:UD-Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf unsloth/GLM-5.1-GGUF:UD-Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf unsloth/GLM-5.1-GGUF:UD-Q4_K_M
Use Docker
docker model run hf.co/unsloth/GLM-5.1-GGUF:UD-Q4_K_M
- LM Studio
- Jan
- vLLM
How to use unsloth/GLM-5.1-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/GLM-5.1-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "unsloth/GLM-5.1-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unsloth/GLM-5.1-GGUF:UD-Q4_K_M
- SGLang
How to use unsloth/GLM-5.1-GGUF 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 "unsloth/GLM-5.1-GGUF" \ --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": "unsloth/GLM-5.1-GGUF", "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 "unsloth/GLM-5.1-GGUF" \ --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": "unsloth/GLM-5.1-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use unsloth/GLM-5.1-GGUF with Ollama:
ollama run hf.co/unsloth/GLM-5.1-GGUF:UD-Q4_K_M
- Unsloth Desktop
- Pi
How to use unsloth/GLM-5.1-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf unsloth/GLM-5.1-GGUF:UD-Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "unsloth/GLM-5.1-GGUF:UD-Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use unsloth/GLM-5.1-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/GLM-5.1-GGUF:UD-Q4_K_M
- Lemonade
How to use unsloth/GLM-5.1-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/GLM-5.1-GGUF:UD-Q4_K_M
Run and chat with the model
lemonade run user.GLM-5.1-GGUF-UD-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use unsloth/GLM-5.1-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf unsloth/GLM-5.1-GGUF:UD-Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default unsloth/GLM-5.1-GGUF:UD-Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use unsloth/GLM-5.1-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf unsloth/GLM-5.1-GGUF:UD-Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "unsloth/GLM-5.1-GGUF:UD-Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload folder using huggingface_hub
Browse files- .gitattributes +14 -0
- UD-Q6_K/GLM-5.1-UD-Q6_K-00001-of-00014.gguf +3 -0
- UD-Q6_K/GLM-5.1-UD-Q6_K-00002-of-00014.gguf +3 -0
- UD-Q6_K/GLM-5.1-UD-Q6_K-00003-of-00014.gguf +3 -0
- UD-Q6_K/GLM-5.1-UD-Q6_K-00004-of-00014.gguf +3 -0
- UD-Q6_K/GLM-5.1-UD-Q6_K-00005-of-00014.gguf +3 -0
- UD-Q6_K/GLM-5.1-UD-Q6_K-00006-of-00014.gguf +3 -0
- UD-Q6_K/GLM-5.1-UD-Q6_K-00007-of-00014.gguf +3 -0
- UD-Q6_K/GLM-5.1-UD-Q6_K-00008-of-00014.gguf +3 -0
- UD-Q6_K/GLM-5.1-UD-Q6_K-00009-of-00014.gguf +3 -0
- UD-Q6_K/GLM-5.1-UD-Q6_K-00010-of-00014.gguf +3 -0
- UD-Q6_K/GLM-5.1-UD-Q6_K-00011-of-00014.gguf +3 -0
- UD-Q6_K/GLM-5.1-UD-Q6_K-00012-of-00014.gguf +3 -0
- UD-Q6_K/GLM-5.1-UD-Q6_K-00013-of-00014.gguf +3 -0
- UD-Q6_K/GLM-5.1-UD-Q6_K-00014-of-00014.gguf +3 -0
.gitattributes
CHANGED
|
@@ -184,3 +184,17 @@ UD-Q4_K_M/GLM-5.1-UD-Q4_K_M-00008-of-00011.gguf filter=lfs diff=lfs merge=lfs -t
|
|
| 184 |
UD-Q4_K_M/GLM-5.1-UD-Q4_K_M-00009-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 185 |
UD-Q4_K_M/GLM-5.1-UD-Q4_K_M-00010-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 186 |
UD-Q4_K_M/GLM-5.1-UD-Q4_K_M-00011-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 184 |
UD-Q4_K_M/GLM-5.1-UD-Q4_K_M-00009-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 185 |
UD-Q4_K_M/GLM-5.1-UD-Q4_K_M-00010-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 186 |
UD-Q4_K_M/GLM-5.1-UD-Q4_K_M-00011-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 187 |
+
UD-Q6_K/GLM-5.1-UD-Q6_K-00001-of-00014.gguf filter=lfs diff=lfs merge=lfs -text
|
| 188 |
+
UD-Q6_K/GLM-5.1-UD-Q6_K-00002-of-00014.gguf filter=lfs diff=lfs merge=lfs -text
|
| 189 |
+
UD-Q6_K/GLM-5.1-UD-Q6_K-00003-of-00014.gguf filter=lfs diff=lfs merge=lfs -text
|
| 190 |
+
UD-Q6_K/GLM-5.1-UD-Q6_K-00004-of-00014.gguf filter=lfs diff=lfs merge=lfs -text
|
| 191 |
+
UD-Q6_K/GLM-5.1-UD-Q6_K-00005-of-00014.gguf filter=lfs diff=lfs merge=lfs -text
|
| 192 |
+
UD-Q6_K/GLM-5.1-UD-Q6_K-00006-of-00014.gguf filter=lfs diff=lfs merge=lfs -text
|
| 193 |
+
UD-Q6_K/GLM-5.1-UD-Q6_K-00007-of-00014.gguf filter=lfs diff=lfs merge=lfs -text
|
| 194 |
+
UD-Q6_K/GLM-5.1-UD-Q6_K-00008-of-00014.gguf filter=lfs diff=lfs merge=lfs -text
|
| 195 |
+
UD-Q6_K/GLM-5.1-UD-Q6_K-00009-of-00014.gguf filter=lfs diff=lfs merge=lfs -text
|
| 196 |
+
UD-Q6_K/GLM-5.1-UD-Q6_K-00010-of-00014.gguf filter=lfs diff=lfs merge=lfs -text
|
| 197 |
+
UD-Q6_K/GLM-5.1-UD-Q6_K-00011-of-00014.gguf filter=lfs diff=lfs merge=lfs -text
|
| 198 |
+
UD-Q6_K/GLM-5.1-UD-Q6_K-00012-of-00014.gguf filter=lfs diff=lfs merge=lfs -text
|
| 199 |
+
UD-Q6_K/GLM-5.1-UD-Q6_K-00013-of-00014.gguf filter=lfs diff=lfs merge=lfs -text
|
| 200 |
+
UD-Q6_K/GLM-5.1-UD-Q6_K-00014-of-00014.gguf filter=lfs diff=lfs merge=lfs -text
|
UD-Q6_K/GLM-5.1-UD-Q6_K-00001-of-00014.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ac2fef89319d4b0d3e01acf901efa382e22d5f96d2ffdf2ab84b473887876938
|
| 3 |
+
size 9422720
|
UD-Q6_K/GLM-5.1-UD-Q6_K-00002-of-00014.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7adfcbdfe44de0f6920f6c763f7f93abbcdde39a4780ab7d56bcd5203e3535cd
|
| 3 |
+
size 49346105024
|
UD-Q6_K/GLM-5.1-UD-Q6_K-00003-of-00014.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e5bdd5939fac6354e808293805e3a4a3942e42151cb9595acb8b9a60d534f4f1
|
| 3 |
+
size 48792830816
|
UD-Q6_K/GLM-5.1-UD-Q6_K-00004-of-00014.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:63927c386a3e38b3d48c60216c9a514f1c718243e24d3a8498fb5ffe1596830b
|
| 3 |
+
size 48792830848
|
UD-Q6_K/GLM-5.1-UD-Q6_K-00005-of-00014.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5684d7172e32ea89e042625158dd1bdfe0286101d0f253bdae87122d345ae1b9
|
| 3 |
+
size 48792830848
|
UD-Q6_K/GLM-5.1-UD-Q6_K-00006-of-00014.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bf642633adeb06e9c07813a962142083c758f09498fd230229b2abb1a661886e
|
| 3 |
+
size 48792830848
|
UD-Q6_K/GLM-5.1-UD-Q6_K-00007-of-00014.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:54fb15f0ad677db22da666f4e9bca4a3cd66d627689f793004cb7f2623080718
|
| 3 |
+
size 48792830848
|
UD-Q6_K/GLM-5.1-UD-Q6_K-00008-of-00014.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:35bae6eca777e8a370ae5e05409bbe5ddd1b29bd3b598c5529452926bbbd5752
|
| 3 |
+
size 48792830848
|
UD-Q6_K/GLM-5.1-UD-Q6_K-00009-of-00014.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:899c805ad71d10ced5f21c195df465ff4d97159ae161d14b55a2647d4cefd7bd
|
| 3 |
+
size 48792830848
|
UD-Q6_K/GLM-5.1-UD-Q6_K-00010-of-00014.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:15ae6f441664f0201c1350fd3b9f7afb0db2786ff1ec4549c74275a4a383c86f
|
| 3 |
+
size 48792830848
|
UD-Q6_K/GLM-5.1-UD-Q6_K-00011-of-00014.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:335782e04bd48f245f13d4c6f3b4d75be8ddbc9f73e1f7722f5a4b862de43004
|
| 3 |
+
size 48792830848
|
UD-Q6_K/GLM-5.1-UD-Q6_K-00012-of-00014.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:93d29393b8be78fe8c6766f201e0146a98671122d8f9c17ee518987171be799b
|
| 3 |
+
size 48792830848
|
UD-Q6_K/GLM-5.1-UD-Q6_K-00013-of-00014.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0ef31061f53593825d00446dea24bdd10dbff930757944e4dff669146e42d062
|
| 3 |
+
size 48792830848
|
UD-Q6_K/GLM-5.1-UD-Q6_K-00014-of-00014.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fda69daef7f9a18144f26f7ebb2d0fa756bfd7c3b005804d5b1e8172df1882b4
|
| 3 |
+
size 35256876672
|