Image-Text-to-Text
GGUF
llama.cpp
glm5_next
Mixture of Experts
reap
expert-pruning
imatrix
mtp
jetson-thor
conversational
Instructions to use patrickbdevaney/GLM-5.3-Flash-REAP50-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 patrickbdevaney/GLM-5.3-Flash-REAP50-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 patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF:Q4_K_M
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 patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF:Q4_K_M
Use Docker
docker model run hf.co/patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- vLLM
How to use patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "patrickbdevaney/GLM-5.3-Flash-REAP50-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": "patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF:Q4_K_M
- Ollama
How to use patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF with Ollama:
ollama run hf.co/patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF: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:9931/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF with Docker Model Runner:
docker model run hf.co/patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF:Q4_K_M
- Lemonade
How to use patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.GLM-5.3-Flash-REAP50-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use patrickbdevaney/GLM-5.3-Flash-REAP50-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 patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF: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:9931/v1 hermes config set model.default patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF: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:9931/v1 \ --custom-model-id "patrickbdevaney/GLM-5.3-Flash-REAP50-GGUF: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"
MTP block is runnable: recurrent-state rollback + draft repack
Browse files
README.md
CHANGED
|
@@ -48,9 +48,10 @@ cmake -B build -DGGML_CUDA=ON -DCMAKE_BUILD_TYPE=Release
|
|
| 48 |
cmake --build build -j --target llama-completion llama-server llama-quantize
|
| 49 |
```
|
| 50 |
|
| 51 |
-
The patch is
|
| 52 |
rest is DSA (DeepSeek sparse attention) work that is **gated off by default** and does not change
|
| 53 |
-
behaviour,
|
|
|
|
| 54 |
|
| 55 |
What the patch adds:
|
| 56 |
|
|
@@ -118,8 +119,8 @@ The source exists in three independent places, so no single one going away stran
|
|
| 118 |
|
| 119 |
1. **GitHub** β [`patrickbdevaney/llama.cpp`](https://github.com/patrickbdevaney/llama.cpp) branch
|
| 120 |
`glm5_next`, tag `glm5-next-reap50-gguf-v1`.
|
| 121 |
-
2. **The patch here** β `glm5-next-llama.cpp.patch`,
|
| 122 |
-
3. **`glm5-next-llama.cpp.bundle`** β a complete git bundle: full history, all
|
| 123 |
upstream base commit included, depending on no repository staying reachable at all:
|
| 124 |
|
| 125 |
```bash
|
|
@@ -211,14 +212,53 @@ not be read as one quant beating another. If Q4_K_S measures below Q4_K_M here,
|
|
| 211 |
variance, not evidence that the smaller file is better β the gate exists to catch a broken quant
|
| 212 |
(nan, or a number an order of magnitude off), and it is sized for that job only.
|
| 213 |
|
| 214 |
-
## The MTP block
|
| 215 |
|
| 216 |
-
Layer 45 is a full multi-token-prediction block (3.81B params, ~2 GiB at Q4_K_M)
|
| 217 |
-
loads
|
| 218 |
-
|
| 219 |
-
|
|
|
|
| 220 |
|
| 221 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 222 |
|
| 223 |
## Vision
|
| 224 |
|
|
|
|
| 48 |
cmake --build build -j --target llama-completion llama-server llama-quantize
|
| 49 |
```
|
| 50 |
|
| 51 |
+
The patch is 15 commits. Everything needed to load and run these files is in the first three; the
|
| 52 |
rest is DSA (DeepSeek sparse attention) work that is **gated off by default** and does not change
|
| 53 |
+
behaviour, the EOG conversion fix described above, and the three commits that make the MTP block
|
| 54 |
+
runnable (see below) β none of which alter ordinary decoding.
|
| 55 |
|
| 56 |
What the patch adds:
|
| 57 |
|
|
|
|
| 119 |
|
| 120 |
1. **GitHub** β [`patrickbdevaney/llama.cpp`](https://github.com/patrickbdevaney/llama.cpp) branch
|
| 121 |
`glm5_next`, tag `glm5-next-reap50-gguf-v1`.
|
| 122 |
+
2. **The patch here** β `glm5-next-llama.cpp.patch`, 15 commits, applies to upstream `761797ff`.
|
| 123 |
+
3. **`glm5-next-llama.cpp.bundle`** β a complete git bundle: full history, all 15 commits, and the
|
| 124 |
upstream base commit included, depending on no repository staying reachable at all:
|
| 125 |
|
| 126 |
```bash
|
|
|
|
| 212 |
variance, not evidence that the smaller file is better β the gate exists to catch a broken quant
|
| 213 |
(nan, or a number an order of magnitude off), and it is sized for that job only.
|
| 214 |
|
| 215 |
+
## The MTP block runs now β but it will not make you faster yet
|
| 216 |
|
| 217 |
+
Layer 45 is a full multi-token-prediction block (3.81B params, ~2 GiB at Q4_K_M), and every quant
|
| 218 |
+
here carries it. Stock llama.cpp loads those tensors and never executes them. The patched build
|
| 219 |
+
does: `make_mtp_draft.py` (in this repository) lifts `blk.45` out of any of these files into a standalone
|
| 220 |
+
~2.3 GiB draft model, and `-md` picks it up automatically β the draft announces its architecture,
|
| 221 |
+
so there is no extra flag.
|
| 222 |
|
| 223 |
+
```bash
|
| 224 |
+
python make_mtp_draft.py GLM-5.3-Flash-REAP50-IQ3_M.gguf \
|
| 225 |
+
GLM-5.3-Flash-REAP50-IQ3_M-MTP-draft.gguf # ~35 s, no requantisation
|
| 226 |
+
./build/bin/llama-speculative-simple -m GLM-5.3-Flash-REAP50-IQ3_M.gguf \
|
| 227 |
+
-md GLM-5.3-Flash-REAP50-IQ3_M-MTP-draft.gguf -ngl 24 --draft-max 3
|
| 228 |
+
```
|
| 229 |
+
|
| 230 |
+
Make the draft from **the same file you are serving**. Hidden states differ measurably between
|
| 231 |
+
quants (IQ3_M vs IQ4_XS cosine 0.891, against 0.999 for a same-quant control), and the draft
|
| 232 |
+
consumes the target's hidden state.
|
| 233 |
+
|
| 234 |
+
**Two things had to be fixed for this to work at all, and one is not fixed.**
|
| 235 |
+
|
| 236 |
+
Speculation rejects a drafted token by removing it from the KV cache, and 34 of these 45 layers
|
| 237 |
+
are KDA linear attention, whose rolling state has no per-token history to rewind to β
|
| 238 |
+
`llama_memory_recurrent::seq_rm` refuses the removal. The patch checkpoints the recurrent state
|
| 239 |
+
(145.56 MiB, fixed by the model, not by context length) and replays the accepted tokens. Worth
|
| 240 |
+
knowing if you are on an older build: that failure was *silent*. `llama_decode` returned -1,
|
| 241 |
+
nothing checked it, and generation continued from stale logits while reporting an acceptance rate
|
| 242 |
+
for tokens it had never verified.
|
| 243 |
+
|
| 244 |
+
What is not fixed is the economics. Acceptance is real β **46.5% at depth 2, 58.5% at depth 3**,
|
| 245 |
+
with the block exactly as GLM shipped it β but end to end it is *slower* than not speculating:
|
| 246 |
+
|
| 247 |
+
| | baseline | depth 2 | depth 3 |
|
| 248 |
+
|---|---|---|---|
|
| 249 |
+
| IQ3_M, `-ngl 24`, Thor | 2.99 t/s | 1.73 t/s | 1.85 t/s |
|
| 250 |
+
|
| 251 |
+
The draft is not the problem (5.3 ms/token) and neither is the checkpoint (~11 ms). The target's
|
| 252 |
+
cost per token barely falls with batch size until 32 tokens β 334 ms at batch 1, still 233 ms at
|
| 253 |
+
batch 16, then 43 ms at batch 32 β because `op_offload_min_batch_size` defaults to 32, and below it
|
| 254 |
+
the layers `-ngl 24` leaves in system memory are computed on the CPU. A draft of depth K produces a
|
| 255 |
+
batch of K+1, which is always on the wrong side of that. So verifying costs nearly as much as
|
| 256 |
+
decoding, and the ceiling at depth 3 is 1.29x before any overhead. (`GGML_OP_OFFLOAD_MIN_BATCH`
|
| 257 |
+
lowers the threshold and segfaults below 32 β do not reach for it.)
|
| 258 |
+
|
| 259 |
+
**So: use this if you want to measure or improve the head, not to go faster today.** Speculative
|
| 260 |
+
decoding via `-md` with an ordinary separate draft model works normally and is subject to exactly
|
| 261 |
+
the same batch-size ceiling.
|
| 262 |
|
| 263 |
## Vision
|
| 264 |
|