Instructions to use unsloth/GLM-4.7-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/GLM-4.7-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unsloth/GLM-4.7-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("unsloth/GLM-4.7-GGUF", dtype="auto") - llama-cpp-python
How to use unsloth/GLM-4.7-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="unsloth/GLM-4.7-GGUF", filename="BF16/GLM-4.7-BF16-00001-of-00015.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use unsloth/GLM-4.7-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf unsloth/GLM-4.7-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama-cli -hf unsloth/GLM-4.7-GGUF:UD-Q4_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf unsloth/GLM-4.7-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama-cli -hf unsloth/GLM-4.7-GGUF:UD-Q4_K_XL
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-4.7-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./llama-cli -hf unsloth/GLM-4.7-GGUF:UD-Q4_K_XL
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-4.7-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./build/bin/llama-cli -hf unsloth/GLM-4.7-GGUF:UD-Q4_K_XL
Use Docker
docker model run hf.co/unsloth/GLM-4.7-GGUF:UD-Q4_K_XL
- LM Studio
- Jan
- vLLM
How to use unsloth/GLM-4.7-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "unsloth/GLM-4.7-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-4.7-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unsloth/GLM-4.7-GGUF:UD-Q4_K_XL
- SGLang
How to use unsloth/GLM-4.7-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-4.7-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-4.7-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-4.7-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-4.7-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use unsloth/GLM-4.7-GGUF with Ollama:
ollama run hf.co/unsloth/GLM-4.7-GGUF:UD-Q4_K_XL
- Unsloth Studio new
How to use unsloth/GLM-4.7-GGUF with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for unsloth/GLM-4.7-GGUF to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for unsloth/GLM-4.7-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for unsloth/GLM-4.7-GGUF to start chatting
- Pi new
How to use unsloth/GLM-4.7-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf unsloth/GLM-4.7-GGUF:UD-Q4_K_XL
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/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-4.7-GGUF:UD-Q4_K_XL" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use unsloth/GLM-4.7-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf unsloth/GLM-4.7-GGUF:UD-Q4_K_XL
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-4.7-GGUF:UD-Q4_K_XL
Run Hermes
hermes
- Docker Model Runner
How to use unsloth/GLM-4.7-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/GLM-4.7-GGUF:UD-Q4_K_XL
- Lemonade
How to use unsloth/GLM-4.7-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/GLM-4.7-GGUF:UD-Q4_K_XL
Run and chat with the model
lemonade run user.GLM-4.7-GGUF-UD-Q4_K_XL
List all available models
lemonade list
Upload folder using huggingface_hub
Browse files- .gitattributes +15 -0
- BF16/GLM-4.7-BF16-00001-of-00015.gguf +3 -0
- BF16/GLM-4.7-BF16-00002-of-00015.gguf +3 -0
- BF16/GLM-4.7-BF16-00003-of-00015.gguf +3 -0
- BF16/GLM-4.7-BF16-00004-of-00015.gguf +3 -0
- BF16/GLM-4.7-BF16-00005-of-00015.gguf +3 -0
- BF16/GLM-4.7-BF16-00006-of-00015.gguf +3 -0
- BF16/GLM-4.7-BF16-00007-of-00015.gguf +3 -0
- BF16/GLM-4.7-BF16-00008-of-00015.gguf +3 -0
- BF16/GLM-4.7-BF16-00009-of-00015.gguf +3 -0
- BF16/GLM-4.7-BF16-00010-of-00015.gguf +3 -0
- BF16/GLM-4.7-BF16-00011-of-00015.gguf +3 -0
- BF16/GLM-4.7-BF16-00012-of-00015.gguf +3 -0
- BF16/GLM-4.7-BF16-00013-of-00015.gguf +3 -0
- BF16/GLM-4.7-BF16-00014-of-00015.gguf +3 -0
- BF16/GLM-4.7-BF16-00015-of-00015.gguf +3 -0
.gitattributes
CHANGED
|
@@ -151,3 +151,18 @@ UD-Q6_K_XL/GLM-4.7-UD-Q6_K_XL-00005-of-00007.gguf filter=lfs diff=lfs merge=lfs
|
|
| 151 |
UD-Q6_K_XL/GLM-4.7-UD-Q6_K_XL-00006-of-00007.gguf filter=lfs diff=lfs merge=lfs -text
|
| 152 |
UD-Q6_K_XL/GLM-4.7-UD-Q6_K_XL-00007-of-00007.gguf filter=lfs diff=lfs merge=lfs -text
|
| 153 |
imatrix_unsloth.gguf_file filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 151 |
UD-Q6_K_XL/GLM-4.7-UD-Q6_K_XL-00006-of-00007.gguf filter=lfs diff=lfs merge=lfs -text
|
| 152 |
UD-Q6_K_XL/GLM-4.7-UD-Q6_K_XL-00007-of-00007.gguf filter=lfs diff=lfs merge=lfs -text
|
| 153 |
imatrix_unsloth.gguf_file filter=lfs diff=lfs merge=lfs -text
|
| 154 |
+
BF16/GLM-4.7-BF16-00001-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
| 155 |
+
BF16/GLM-4.7-BF16-00002-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
| 156 |
+
BF16/GLM-4.7-BF16-00003-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
| 157 |
+
BF16/GLM-4.7-BF16-00004-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
| 158 |
+
BF16/GLM-4.7-BF16-00005-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
| 159 |
+
BF16/GLM-4.7-BF16-00006-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
| 160 |
+
BF16/GLM-4.7-BF16-00007-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
| 161 |
+
BF16/GLM-4.7-BF16-00008-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
| 162 |
+
BF16/GLM-4.7-BF16-00009-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
| 163 |
+
BF16/GLM-4.7-BF16-00010-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
| 164 |
+
BF16/GLM-4.7-BF16-00011-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
| 165 |
+
BF16/GLM-4.7-BF16-00012-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
| 166 |
+
BF16/GLM-4.7-BF16-00013-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
| 167 |
+
BF16/GLM-4.7-BF16-00014-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
| 168 |
+
BF16/GLM-4.7-BF16-00015-of-00015.gguf filter=lfs diff=lfs merge=lfs -text
|
BF16/GLM-4.7-BF16-00001-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5c9d0b61be5e77786857fc37e1d8a2507b07182c02d2508deac3cca8cf258c50
|
| 3 |
+
size 47909743104
|
BF16/GLM-4.7-BF16-00002-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4590a49a1b975b3a4dde90fce5768d06c5cb6d7503c16b961f2c0c03082a7a53
|
| 3 |
+
size 49941081216
|
BF16/GLM-4.7-BF16-00003-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:91abf12b64839b2ec48a5e7e4d6aad172c5ba2f162dd532fd3c6232ea5c0ad82
|
| 3 |
+
size 49890567200
|
BF16/GLM-4.7-BF16-00004-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:a81e94501f71a0598862b3e047e3412cf4df4ced5faa13c0b9631de33e773963
|
| 3 |
+
size 49754227520
|
BF16/GLM-4.7-BF16-00005-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c57b22107397e2f6a6bb975acc5f997783a546223c19fc9b00a4caa147e8ad1e
|
| 3 |
+
size 49941081248
|
BF16/GLM-4.7-BF16-00006-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:f0b53b1baea678fea7ab86482b6fc4ec4a8a69d8d5f9597d88e05ff08087bdea
|
| 3 |
+
size 49890567200
|
BF16/GLM-4.7-BF16-00007-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b2a7c64ea168c51a6726a407677328ceafca73bc0878016394712d3e6040239f
|
| 3 |
+
size 49754227520
|
BF16/GLM-4.7-BF16-00008-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d288d906913cc2080d3eaece73d17c01f29b4588b3ca75ff52fc37bd4c83c3a3
|
| 3 |
+
size 49941081248
|
BF16/GLM-4.7-BF16-00009-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5000e19687783b9497402b69fe841dcc2100d4201e9825d82f7176bb68d3153a
|
| 3 |
+
size 49890567200
|
BF16/GLM-4.7-BF16-00010-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fc6d2111bcfffc22ded5db00bb864debe1f1873dd727453ef2b64b490dcd8d4b
|
| 3 |
+
size 49754227520
|
BF16/GLM-4.7-BF16-00011-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:203591a22015d64d8b18cd9c24455c086830e752be5a02d9c2319ad7d804d0b4
|
| 3 |
+
size 49941081248
|
BF16/GLM-4.7-BF16-00012-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ff237e7b190e55d3bd4bbde405bfc9c5dd1d0a45e3ddb1f756eea467fbb096b6
|
| 3 |
+
size 49890567200
|
BF16/GLM-4.7-BF16-00013-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:35f64cb2ac2a1052b2c002333d70747215c46109921ab006e50022beb8ba617b
|
| 3 |
+
size 49754227520
|
BF16/GLM-4.7-BF16-00014-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5d3f6efc6adabfa7dd16de68a38fc71ef4ddeec5a48dfb5f3ed6f3734d365ae8
|
| 3 |
+
size 49941081248
|
BF16/GLM-4.7-BF16-00015-of-00015.gguf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fd2c102b36b18bb62710eab8e82b5f98c54dd303d88eb01b4bc434cbb306a1c7
|
| 3 |
+
size 20642818368
|