Instructions to use Xylolabs/GLM-4.7-Flash-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Xylolabs/GLM-4.7-Flash-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 Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS # Run inference directly in the terminal: llama cli -hf Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS # Run inference directly in the terminal: llama cli -hf Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS # Run inference directly in the terminal: ./build/bin/llama cli -hf Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS
Use Docker
docker model run hf.co/Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS
- Llama new
- LM Studio
- Jan
- vLLM
How to use Xylolabs/GLM-4.7-Flash-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Xylolabs/GLM-4.7-Flash-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": "Xylolabs/GLM-4.7-Flash-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS
- Ollama
How to use Xylolabs/GLM-4.7-Flash-GGUF with Ollama:
ollama run hf.co/Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS
- Unsloth Desktop
- Pi
How to use Xylolabs/GLM-4.7-Flash-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS
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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Xylolabs/GLM-4.7-Flash-GGUF with Docker Model Runner:
docker model run hf.co/Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS
- Lemonade
How to use Xylolabs/GLM-4.7-Flash-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS
Run and chat with the model
lemonade run user.GLM-4.7-Flash-GGUF-IQ4_XS
List all available models
lemonade list
- Hermes Agent
How to use Xylolabs/GLM-4.7-Flash-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 Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS
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:9931/v1 hermes config set model.default Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Xylolabs/GLM-4.7-Flash-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS
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:9931/v1 \ --custom-model-id "Xylolabs/GLM-4.7-Flash-GGUF:IQ4_XS" \ --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"
GGUF quants of zai-org/GLM-4.7-Flash for llama.cpp, on CUDA, Metal or CPU.
Files
GLM-4.7-Flash-<QUANT>.ggufis one file per quant.- Contents: Each file holds the full language model plus the original tokenizer and chat template. It also carries the MTP module.
-imat in a file name marks a quant made with an importance matrix.
| Quant | Size | Mean KL vs BF16 | Same top-1 vs BF16 |
|---|---|---|---|
| IQ4_XS | 16.88 GB | 0.0868 | 87.80% |
| IQ4_XS-imat | 16.71 GB | 0.0845 | 88.34% |
The reference is our BF16 pass in transformers. KL and top-1 cover 16,288 positions of English and Korean text.
How to run
Use llama.cpp commit cd959bae99ff4bed22bef2604f45241c09bbb8c8 or later.
git clone https://github.com/ggml-org/llama.cpp && cd llama.cpp
git checkout cd959bae99ff4bed22bef2604f45241c09bbb8c8
cmake -B build -DCMAKE_BUILD_TYPE=Release # add -DGGML_CUDA=ON for NVIDIA GPUs
cmake --build build -j --target llama-cli llama-server
./build/bin/llama-cli -m GLM-4.7-Flash-IQ4_XS.gguf --jinja -c 8192 -ngl 99
llama-server takes the same flags.
Which file for your hardware
File size, plus the KV cache at the stated context (f16), plus about 2 GB of runtime overhead, must fit in 90% of the memory. All 47 layers keep a compressed attention cache of 576 values per token.
| Hardware | Memory | Recommended file | Context that fits | Notes |
|---|---|---|---|---|
| RTX 4090 / RTX 3090 | 24 GB | GLM-4.7-Flash-IQ4_XS.gguf (16.9 GB) |
32K | |
| RTX 5090 | 32 GB | GLM-4.7-Flash-IQ4_XS.gguf (16.9 GB) |
128K | |
| RTX 6000 Ada, or 2 x 24 GB | 48 GB | GLM-4.7-Flash-IQ4_XS.gguf (16.9 GB) |
128K | Two 24 GB cards need the layers split across them. |
| One H100 | 80 GB | GLM-4.7-Flash-IQ4_XS.gguf (16.9 GB) |
128K | |
| RTX PRO 6000 Blackwell (GDDR7) | 96 GB | GLM-4.7-Flash-IQ4_XS.gguf (16.9 GB) |
128K | |
| DGX Spark | 128 GB unified | GLM-4.7-Flash-IQ4_XS.gguf (16.9 GB) |
128K | |
| Mac Studio M5 Max | 128 GB unified | GLM-4.7-Flash-IQ4_XS.gguf (16.9 GB) |
128K | |
| One H200 (HBM3e) | 141 GB | GLM-4.7-Flash-IQ4_XS.gguf (16.9 GB) |
128K | |
| One B200 (about 180 GB usable in a DGX B200) | 192 GB | GLM-4.7-Flash-IQ4_XS.gguf (16.9 GB) |
128K | |
| Mac Studio M5 Ultra | 256 GB unified | GLM-4.7-Flash-IQ4_XS.gguf (16.9 GB) |
128K | |
| Mac Studio M5 Ultra | 512 GB unified | GLM-4.7-Flash-IQ4_XS.gguf (16.9 GB) |
128K | |
| One B300 (HBM3e; usable a little less) | 288 GB | GLM-4.7-Flash-IQ4_XS.gguf (16.9 GB) |
128K |
License and notices
MIT License, copied in LICENSE. We converted the weights to GGUF and quantized them. NOTICE names the source model and its copyright holder. Xylolabs is not affiliated with or endorsed by the original model's authors.
Citation
Cite the original GLM-4.7-Flash model card and its linked GLM technical report.
Updates
- 2026-11-23: Added a hardware recommendation table.
- 2026-11-15: First release of
GLM-4.7-Flash-IQ4_XS-imat.gguf,GLM-4.7-Flash-IQ4_XS.gguf. Checked with llama.cpp cd959bae.
- Downloads last month
- 2,233
4-bit
Model tree for Xylolabs/GLM-4.7-Flash-GGUF
Base model
zai-org/GLM-4.7-Flash