Instructions to use unsloth/GLM-4.7-REAP-218B-A32B-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use unsloth/GLM-4.7-REAP-218B-A32B-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="unsloth/GLM-4.7-REAP-218B-A32B-GGUF")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("unsloth/GLM-4.7-REAP-218B-A32B-GGUF", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use unsloth/GLM-4.7-REAP-218B-A32B-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-4.7-REAP-218B-A32B-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/GLM-4.7-REAP-218B-A32B-GGUF:UD-Q4_K_XL
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf unsloth/GLM-4.7-REAP-218B-A32B-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: llama cli -hf unsloth/GLM-4.7-REAP-218B-A32B-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-REAP-218B-A32B-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./llama-cli -hf unsloth/GLM-4.7-REAP-218B-A32B-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-REAP-218B-A32B-GGUF:UD-Q4_K_XL # Run inference directly in the terminal: ./build/bin/llama-cli -hf unsloth/GLM-4.7-REAP-218B-A32B-GGUF:UD-Q4_K_XL
Use Docker
docker model run hf.co/unsloth/GLM-4.7-REAP-218B-A32B-GGUF:UD-Q4_K_XL
- Llama new
- LM Studio
- Jan
- vLLM
How to use unsloth/GLM-4.7-REAP-218B-A32B-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-REAP-218B-A32B-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-REAP-218B-A32B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/unsloth/GLM-4.7-REAP-218B-A32B-GGUF:UD-Q4_K_XL
- SGLang
How to use unsloth/GLM-4.7-REAP-218B-A32B-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-REAP-218B-A32B-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-REAP-218B-A32B-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-REAP-218B-A32B-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-REAP-218B-A32B-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use unsloth/GLM-4.7-REAP-218B-A32B-GGUF with Ollama:
ollama run hf.co/unsloth/GLM-4.7-REAP-218B-A32B-GGUF:UD-Q4_K_XL
- Unsloth Desktop
- Pi
How to use unsloth/GLM-4.7-REAP-218B-A32B-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-4.7-REAP-218B-A32B-GGUF:UD-Q4_K_XL
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-4.7-REAP-218B-A32B-GGUF:UD-Q4_K_XL" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use unsloth/GLM-4.7-REAP-218B-A32B-GGUF with Docker Model Runner:
docker model run hf.co/unsloth/GLM-4.7-REAP-218B-A32B-GGUF:UD-Q4_K_XL
- Lemonade
How to use unsloth/GLM-4.7-REAP-218B-A32B-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull unsloth/GLM-4.7-REAP-218B-A32B-GGUF:UD-Q4_K_XL
Run and chat with the model
lemonade run user.GLM-4.7-REAP-218B-A32B-GGUF-UD-Q4_K_XL
List all available models
lemonade list
- Hermes Agent
How to use unsloth/GLM-4.7-REAP-218B-A32B-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-4.7-REAP-218B-A32B-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-REAP-218B-A32B-GGUF:UD-Q4_K_XL
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use unsloth/GLM-4.7-REAP-218B-A32B-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-4.7-REAP-218B-A32B-GGUF:UD-Q4_K_XL
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-4.7-REAP-218B-A32B-GGUF:UD-Q4_K_XL" \ --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"
Repeats a single word or phrase endlessly every single time I try to prompt
Using the following: GLM-4.7-REAP-218B-A32B-UD-Q2_K_XL with the latest llama cpp as of right now.
It does this during reasoning on the first prompt. I've tried messing with repeat penalty, temp, min p, top p. Nothing stops it.
With other versions of REAP, I've encountered this issue where the model would attempt to access something that was apparently truncated. For example, a language other than English or something similar.
The REAP method is apparently lossy in some fields, and if that's what your use case requires, you might as well try a lower quant instead.
Using the following: GLM-4.7-REAP-218B-A32B-UD-Q2_K_XL with the latest llama cpp as of right now.
It does this during reasoning on the first prompt. I've tried messing with repeat penalty, temp, min p, top p. Nothing stops it.
You checked the checksums of the downloaded files?
I've not checked the checksums. One thing to note is that the full GLM-4.7 Q4 K XL works great.
One thing that is interesting, is that the word or phrase it repeats is always clothing related. If I do a story that is not related to what a character may be wearing, it generates fine. I have not had it repeat anything else. This happens even if I don't mention clothing. If I have characters that are described or not described, it will, in the reasoning, start a section where it decides what clothes the characters has. That is where it always fails.
Same here. REAP/Q2_K_XL broken
Also on an RTX 6000 Pro? Getting about those tokens/sec too.
Can confirm Q3_K_M and UD-Q4_K_XL also Q5_K_S repeat a word infinitely (different each time but clothing related). I've also noticed models loaded extremely quickly like 10x speed of regular loading speed. (In Koboldcpp it happens if you reload a model which is already in vRAM) but I was loading both cold.
Programming related prompt is generated fine.
Correct me if I'm wrong, but I believe the REAP model produced by cerebras (on which these quants are based) used calibration datasets centred around code generation, tool calling and agentic use for the pruning process, so you'd expect disproportionate loss in proficiency for other use cases.
Hey all sorry on the delay - yep I can repro - the REAP models do in fact generate repeating words about clothing as @Disdrix 's example showed ie doing:
./llama.cpp/llama-cli --model unsloth/GLM-4.7-REAP-218B-A32B-GGUF/UD-Q2_K_XL/GLM-4.7-REAP-218B-A32B-UD-Q2_K_XL-00001-of-00002.gguf \
--fit on --flash-attn on --jinja --temp 1.0 --top-p 0.95 --min-p 0.00 \
--prompt "write a story about john. He is suddenly transported to new york city. he is wearing shorts and a tshirt."
produces:
The normal NON REAP Q2_K_XL generates correctly:
./llama.cpp/llama-cli --model unsloth/GLM-4.7-GGUF/UD-Q2_K_XL/GLM-4.7-UD-Q2_K_XL-00001-of-00003.gguf \
--fit on --flash-attn on --jinja --temp 1.0 --top-p 0.95 --min-p 0.00 \
--prompt "write a story about john. He is suddenly transported to new york city. he is wearing shorts and a tshirt."
gives:
As @names-are-for-friends hypothesized, the REAP models are mostly calibrated for coding, whilst our non REAP dynamic GGUFs use diverse datasets.
I would use REAP for coding tasks primarily - I tried 20 conversations and it works well.
However other REAPed models don't seem to exhibit this issue - it might be luck
Looks like we can handle it with frequency-penalty/repeat-penalty settings?




