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 +11 -0
- UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00001-of-00011.gguf +3 -0
- UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00002-of-00011.gguf +3 -0
- UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00003-of-00011.gguf +3 -0
- UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00004-of-00011.gguf +3 -0
- UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00005-of-00011.gguf +3 -0
- UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00006-of-00011.gguf +3 -0
- UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00007-of-00011.gguf +3 -0
- UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00008-of-00011.gguf +3 -0
- UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00009-of-00011.gguf +3 -0
- UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00010-of-00011.gguf +3 -0
- UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00011-of-00011.gguf +3 -0
.gitattributes
CHANGED
|
@@ -41,3 +41,14 @@ UD-Q3_K_XL/GLM-5.1-UD-Q3_K_XL-00005-of-00008.gguf filter=lfs diff=lfs merge=lfs
|
|
| 41 |
UD-Q3_K_XL/GLM-5.1-UD-Q3_K_XL-00006-of-00008.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
UD-Q3_K_XL/GLM-5.1-UD-Q3_K_XL-00007-of-00008.gguf filter=lfs diff=lfs merge=lfs -text
|
| 43 |
UD-Q3_K_XL/GLM-5.1-UD-Q3_K_XL-00008-of-00008.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
UD-Q3_K_XL/GLM-5.1-UD-Q3_K_XL-00006-of-00008.gguf filter=lfs diff=lfs merge=lfs -text
|
| 42 |
UD-Q3_K_XL/GLM-5.1-UD-Q3_K_XL-00007-of-00008.gguf filter=lfs diff=lfs merge=lfs -text
|
| 43 |
UD-Q3_K_XL/GLM-5.1-UD-Q3_K_XL-00008-of-00008.gguf filter=lfs diff=lfs merge=lfs -text
|
| 44 |
+
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00001-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 45 |
+
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00002-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 46 |
+
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00003-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 47 |
+
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00004-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 48 |
+
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00005-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 49 |
+
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00006-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 50 |
+
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00007-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 51 |
+
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00008-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 52 |
+
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00009-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 53 |
+
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00010-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
| 54 |
+
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00011-of-00011.gguf filter=lfs diff=lfs merge=lfs -text
|
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00001-of-00011.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1f9d34abc324dd8eef60b033c59c2e9f47b1987b1f7618be4fb78a563798ac4d
|
| 3 |
+
size 9422720
|
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00002-of-00011.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:259b0362111685b325a03c6d78e85857d665adeac1c7d13edbb8a43645543791
|
| 3 |
+
size 49433942336
|
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00003-of-00011.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b1756098dac87e3b281f0946308880de3a95acc3edeb118f4a4564483a53b187
|
| 3 |
+
size 48566415136
|
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00004-of-00011.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:0e930e37a9f64d7eb3ac3b097f40f6fb230f09386c4ee5ba94d8f494627b082d
|
| 3 |
+
size 48566415136
|
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00005-of-00011.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e67dc64a732bc5cacdc30da3d292b8ddd2977e26751811f808ae5d7c3b177364
|
| 3 |
+
size 48566415136
|
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00006-of-00011.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:3691ac228c449243648c8ebcbf582e3e1a705decab52856764980fa002ba46d2
|
| 3 |
+
size 48566415136
|
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00007-of-00011.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:baf8338e6759681619485f0d199e20acea970d91509b952dabc74e7e2ae39158
|
| 3 |
+
size 48566415136
|
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00008-of-00011.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:43b195e06ae37103dc6811947608d7a449441036d4b2d7d279cf2a580efcb80d
|
| 3 |
+
size 48566415136
|
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00009-of-00011.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b0abb48deeec52a49d1c8f480f682b1c45b0d0ece35a65c3b699b6d77df8c4aa
|
| 3 |
+
size 48566415136
|
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00010-of-00011.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:747d313f1689ffec160d3e1aef3ef46a9171304b85205974d9f682e115ff60cc
|
| 3 |
+
size 48566415136
|
UD-Q4_K_XL/GLM-5.1-UD-Q4_K_XL-00011-of-00011.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a52694bdf48bc526d8fd25abbf4430368ca1c35e83bae7f56c1eb8123be5264
|
| 3 |
+
size 27993218976
|