Instructions to use ubergarm/GLM-4.7-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use ubergarm/GLM-4.7-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="ubergarm/GLM-4.7-GGUF", filename="IQ2_KL/GLM-4.7-IQ2_KL-00001-of-00004.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use ubergarm/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 ubergarm/GLM-4.7-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf ubergarm/GLM-4.7-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf ubergarm/GLM-4.7-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf ubergarm/GLM-4.7-GGUF:Q2_K
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 ubergarm/GLM-4.7-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf ubergarm/GLM-4.7-GGUF:Q2_K
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 ubergarm/GLM-4.7-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf ubergarm/GLM-4.7-GGUF:Q2_K
Use Docker
docker model run hf.co/ubergarm/GLM-4.7-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use ubergarm/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 "ubergarm/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": "ubergarm/GLM-4.7-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ubergarm/GLM-4.7-GGUF:Q2_K
- Ollama
How to use ubergarm/GLM-4.7-GGUF with Ollama:
ollama run hf.co/ubergarm/GLM-4.7-GGUF:Q2_K
- Unsloth Studio
How to use ubergarm/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 ubergarm/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 ubergarm/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 ubergarm/GLM-4.7-GGUF to start chatting
- Pi
How to use ubergarm/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 ubergarm/GLM-4.7-GGUF:Q2_K
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": "ubergarm/GLM-4.7-GGUF:Q2_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use ubergarm/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 ubergarm/GLM-4.7-GGUF:Q2_K
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 ubergarm/GLM-4.7-GGUF:Q2_K
Run Hermes
hermes
- Docker Model Runner
How to use ubergarm/GLM-4.7-GGUF with Docker Model Runner:
docker model run hf.co/ubergarm/GLM-4.7-GGUF:Q2_K
- Lemonade
How to use ubergarm/GLM-4.7-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ubergarm/GLM-4.7-GGUF:Q2_K
Run and chat with the model
lemonade run user.GLM-4.7-GGUF-Q2_K
List all available models
lemonade list
IQ3_KS is awesome!
My Config:
I can load full IQ3_KS on 2x6000 Pros however i can also do it on single 6000 pro for testing and keeping another fast model on vllm on secondary GPU. here re the results that most of hybrid cpu gpu people will be interested in.
System Specifications for Hybrid CPU/GPU Inference
System Overview
OS: Ubuntu 24.04.3 LTS
Kernel: Linux 6.14.0-37-generic
Motherboard Specifications
Model: ASUS Pro WS W790E-SAGE SE
- Platform: Intel W790 Chipset
CPU Specifications
Processor: Intel Xeon w9-3495X
- Cores: 56 physical cores / 112 threads
- AMX (Advanced Matrix Extensions): Full support
- NUMA Nodes: 1
GPU Specifications
Graphics Cards: 2x NVIDIA RTX PRO 6000 Black Edition
- VRAM per GPU: 96 GB
- Driver Version: 580.95.05
- CUDA Version: 13.0
- Power Consumption: 600W max each
Memory Configuration
Total RAM: 512 GB
Memory Type: DDR5 (8x DIMM slots populated)
Memory Speed: DDR5-4800+ (OC capable)
OC Supported: 6000 OC Stable
Swap: 0 GB (disabled)
Memory Architecture: 8-channel DDR5 configuration
Available for Inference: 503 GB total capacity for model loading
(base) mukul@jarvis:~/dev-ai/ik_llama.cpp$ CUDA_DEVICE_ORDER=PCI_BUS_ID CUDA_VISIBLE_DEVICES="1" ./build/bin/llama-server \
--model /media/mukul/data/models/ubergarm/GLM-4.7-GGUF/IQ3_KS/GLM-4.7-IQ3_KS-00001-of-00005.gguf \
--alias ubergarm/GLM-4.7 \
--ctx-size 131072 \
-ger \
--merge-qkv \
-ngl 99 \
--n-cpu-moe 65 \
-ctk q8_0 -ctv q8_0 \
-ub 8192 -b 8192 \
--threads 56 \
--parallel 1 \
--host 0.0.0.0 \
--port 10002 \
--no-mmap \
--jinja
main: n_kv_max = 131072, n_batch = 8192, n_ubatch = 8192, flash_attn = 1, n_gpu_layers = 99, n_threads = 56, n_threads_batch = 56
| PP | TG | N_KV | T_PP s | S_PP t/s | T_TG s | S_TG t/s |
|-------|--------|--------|----------|----------|----------|----------|
| 8192 | 2048 | 0 | 13.942 | 587.57 | 100.606 | 20.36 |
| 8192 | 2048 | 8192 | 15.024 | 545.27 | 109.013 | 18.79 |
| 8192 | 2048 | 16384 | 16.048 | 510.48 | 116.656 | 17.56 |
| 8192 | 2048 | 24576 | 17.579 | 466.01 | 126.207 | 16.23 |
| 8192 | 2048 | 32768 | 19.308 | 424.29 | 140.504 | 14.58 |
| 8192 | 2048 | 40960 | 21.887 | 374.29 | 156.982 | 13.05 |
| 8192 | 2048 | 49152 | 24.145 | 339.28 | 173.008 | 11.84 |
| 8192 | 2048 | 57344 | 26.427 | 309.98 | 193.310 | 10.59 |
| 8192 | 2048 | 65536 | 28.705 | 285.39 | 219.126 | 9.35 |
| 8192 | 2048 | 73728 | 30.605 | 267.67 | 242.317 | 8.45 |
| 8192 | 2048 | 81920 | 32.814 | 249.65 | 263.043 | 7.79 |
| 8192 | 2048 | 90112 | 34.653 | 236.40 | 282.582 | 7.25 |
| 8192 | 2048 | 98304 | 37.128 | 220.64 | 303.721 | 6.74 |
| 8192 | 2048 | 106496 | 39.245 | 208.74 | 322.416 | 6.35 |
| 8192 | 2048 | 114688 | 41.300 | 198.35 | 342.002 | 5.99 |
| 8192 | 2048 | 122880 | 43.872 | 186.73 | 360.998 | 5.67 |