GGUF
glm5_next
Mixture of Experts
expert-pruning
reap
quantization
evaluation
negative-result
imatrix
conversational
Instructions to use patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes 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-prune-vs-quant-matched-bytes 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-prune-vs-quant-matched-bytes # Run inference directly in the terminal: llama cli -hf patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes
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-prune-vs-quant-matched-bytes # Run inference directly in the terminal: llama cli -hf patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes
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-prune-vs-quant-matched-bytes # Run inference directly in the terminal: ./build/bin/llama cli -hf patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes
Use Docker
docker model run hf.co/patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes
- Llama new
- LM Studio
- Jan
- Ollama
How to use patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes with Ollama:
ollama run hf.co/patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes
- Unsloth Desktop
- Pi
How to use patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes 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-prune-vs-quant-matched-bytes
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-prune-vs-quant-matched-bytes" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes with Docker Model Runner:
docker model run hf.co/patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes
- Lemonade
How to use patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes
Run and chat with the model
lemonade run user.GLM-5.3-Flash-prune-vs-quant-matched-bytes-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes 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-prune-vs-quant-matched-bytes
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-prune-vs-quant-matched-bytes
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes 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-prune-vs-quant-matched-bytes
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-prune-vs-quant-matched-bytes" \ --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"
GLM-5.3-Flash prune vs quantize at matched bytes: findings, data, scripts, v4 saliency and masks
41a0653 verified Download scripts/gguf_recipe.py from patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes: direct link, hf CLI and curl.
- Browser
- Download file 2.27 kB
-
https://huggingface.co/patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes/resolve/main/scripts/gguf_recipe.py
- Command line
-
hf download hf://patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes/scripts/gguf_recipe.py
-
curl -L -o gguf_recipe.py https://huggingface.co/patrickbdevaney/GLM-5.3-Flash-prune-vs-quant-matched-bytes/resolve/main/scripts/gguf_recipe.py
2.27 kB
| """Matched-bytes quant recipe for a pruned GLM-5.3-Flash GGUF, derived from Unsloth's UD-Q2_K_XL. | |
| Every non-expert tensor gets EXACTLY the type Unsloth gave it in UD-Q2_K_XL, so the only | |
| differences between our arm and the incumbent are (a) fewer routed experts and (b) the bits those | |
| experts get with the bytes the prune freed. Routed-expert tensors step up a fixed ladder from | |
| Unsloth's per-tensor choice, so Unsloth's per-layer upgrades (first MoE layer, down_proj, MTP) | |
| carry over. | |
| Writes a --tensor-type-file of anchored regexes (^name$=type) and prints the predicted size. | |
| Usage: gguf_recipe.py <K> <ladder-name> <out.txt> <unsloth shard>... | |
| """ | |
| from __future__ import annotations | |
| import os | |
| import re | |
| import sys | |
| sys.path.insert(0, os.environ.get("LLAMA_GGUF_PY", "llama.cpp/gguf-py")) # upstream llama.cpp gguf-py | |
| from gguf import GGUFReader # noqa: E402 | |
| BPW = {"IQ2_XS": 2.3125, "IQ3_XXS": 3.0625, "IQ3_S": 3.4375, "IQ4_XS": 4.25, "Q2_K": 2.625, | |
| "Q3_K": 3.4375, "Q4_K": 4.5, "Q5_K": 5.5, "Q6_K": 6.5625, "Q8_0": 8.5} | |
| LADDERS = { | |
| # 216E: about +34% expert bits for 0.75x the experts | |
| "216": {"IQ2_XS": "IQ3_XXS", "IQ3_XXS": "IQ4_XS", "IQ4_XS": "Q5_K", "Q2_K": "Q3_K", "Q3_K": "Q4_K"}, | |
| # 192E: about +50% expert bits for 0.667x the experts | |
| "192": {"IQ2_XS": "IQ3_S", "IQ3_XXS": "Q4_K", "IQ4_XS": "Q5_K", "Q2_K": "Q3_K", "Q3_K": "Q4_K"}, | |
| } | |
| EXP = re.compile(r"^blk\.\d+\.ffn_(gate|up|down)_exps\.weight$") | |
| def main() -> None: | |
| K, ladder_name, out, *shards = sys.argv[1:] | |
| K = int(K) | |
| ladder = LADDERS[ladder_name] | |
| lines, base, ours = [], 0, 0 | |
| for p in shards: | |
| for t in GGUFReader(p).tensors: | |
| typ, n = t.tensor_type.name, int(t.n_bytes) | |
| base += n | |
| if EXP.match(t.name): | |
| new = ladder[typ] | |
| ours += n * K / 288 * BPW[new] / BPW[typ] | |
| else: | |
| new = typ | |
| ours += n | |
| lines.append(f"^{re.escape(t.name)}$={new.lower()}") | |
| with open(out, "w") as f: | |
| f.write("\n".join(lines) + "\n") | |
| print(f"{len(lines)} tensors; UD-Q2_K_XL {base/2**30:.2f} GiB; predicted {K}E/{ladder_name} " | |
| f"{ours/2**30:.2f} GiB ({100*(ours/base-1):+.1f}%) -> {out}") | |
| if __name__ == "__main__": | |
| main() | |