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 +10 -0
- UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00001-of-00010.gguf +3 -0
- UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00002-of-00010.gguf +3 -0
- UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00003-of-00010.gguf +3 -0
- UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00004-of-00010.gguf +3 -0
- UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00005-of-00010.gguf +3 -0
- UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00006-of-00010.gguf +3 -0
- UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00007-of-00010.gguf +3 -0
- UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00008-of-00010.gguf +3 -0
- UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00009-of-00010.gguf +3 -0
- UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00010-of-00010.gguf +3 -0
.gitattributes
CHANGED
|
@@ -173,3 +173,13 @@ UD-IQ3_S/GLM-5.1-UD-IQ3_S-00004-of-00007.gguf filter=lfs diff=lfs merge=lfs -tex
|
|
| 173 |
UD-IQ3_S/GLM-5.1-UD-IQ3_S-00005-of-00007.gguf filter=lfs diff=lfs merge=lfs -text
|
| 174 |
UD-IQ3_S/GLM-5.1-UD-IQ3_S-00006-of-00007.gguf filter=lfs diff=lfs merge=lfs -text
|
| 175 |
UD-IQ3_S/GLM-5.1-UD-IQ3_S-00007-of-00007.gguf filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
UD-IQ3_S/GLM-5.1-UD-IQ3_S-00005-of-00007.gguf filter=lfs diff=lfs merge=lfs -text
|
| 174 |
UD-IQ3_S/GLM-5.1-UD-IQ3_S-00006-of-00007.gguf filter=lfs diff=lfs merge=lfs -text
|
| 175 |
UD-IQ3_S/GLM-5.1-UD-IQ3_S-00007-of-00007.gguf filter=lfs diff=lfs merge=lfs -text
|
| 176 |
+
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00001-of-00010.gguf filter=lfs diff=lfs merge=lfs -text
|
| 177 |
+
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00002-of-00010.gguf filter=lfs diff=lfs merge=lfs -text
|
| 178 |
+
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00003-of-00010.gguf filter=lfs diff=lfs merge=lfs -text
|
| 179 |
+
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00004-of-00010.gguf filter=lfs diff=lfs merge=lfs -text
|
| 180 |
+
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00005-of-00010.gguf filter=lfs diff=lfs merge=lfs -text
|
| 181 |
+
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00006-of-00010.gguf filter=lfs diff=lfs merge=lfs -text
|
| 182 |
+
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00007-of-00010.gguf filter=lfs diff=lfs merge=lfs -text
|
| 183 |
+
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00008-of-00010.gguf filter=lfs diff=lfs merge=lfs -text
|
| 184 |
+
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00009-of-00010.gguf filter=lfs diff=lfs merge=lfs -text
|
| 185 |
+
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00010-of-00010.gguf filter=lfs diff=lfs merge=lfs -text
|
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00001-of-00010.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:54a67c837c64d5024cea3638bfaaefcd0ba3a630b4567b5a9e52e421ef5e5cd3
|
| 3 |
+
size 9422720
|
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00002-of-00010.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:00eb12a18d72c6483e298f2cdaf706fb991d5266ee4a2d1ca4a9de1206d62f17
|
| 3 |
+
size 48591969952
|
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00003-of-00010.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ead838ac8b3ad2b172e2ca1981648f93ae9b2e86a49c5ce0bb3fea8791c36943
|
| 3 |
+
size 49002123424
|
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00004-of-00010.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c9e342fbbdaeac7909cf1e0963768dce70c80ec87ab80a11fd9726922a242f20
|
| 3 |
+
size 49181713376
|
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00005-of-00010.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:943a0d1de929b4a78356e5b9888bf63aed747d1b03fb04c550a687c5e6322c7a
|
| 3 |
+
size 49188029536
|
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00006-of-00010.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:379657c6b0b90cbf68886d9f14bbc3e277dbd5ba02ee8de5d13284de2d6ebc8c
|
| 3 |
+
size 49002123424
|
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00007-of-00010.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f14e12e9313cfee2eb0cb0306e99f3925043ccb3db2cc2a056b0330cc073987c
|
| 3 |
+
size 49181713376
|
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00008-of-00010.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:390c785fe2521e8c0b9259c79ef08181028fcfa85c752ab04ed73facdb3ac561
|
| 3 |
+
size 49188029536
|
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00009-of-00010.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:796db862d901931a951953331b9ec389e4764e81dbd8f6d5c393d7a333180559
|
| 3 |
+
size 49002123424
|
UD-Q4_K_S/GLM-5.1-UD-Q4_K_S-00010-of-00010.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:994104dcdf6f65fee702f0f97a16e922533055d65c6f0432b807aab263c028ff
|
| 3 |
+
size 41555427328
|