Instructions to use MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF", dtype="auto") - llama-cpp-python
How to use MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF", filename="GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-BF16.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 MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M # Run inference directly in the terminal: llama-cli -hf MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M
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 MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M
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 MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M
Use Docker
docker model run hf.co/MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-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": "MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M
- SGLang
How to use MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-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 "MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-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": "MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-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 "MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-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": "MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Ollama
How to use MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF with Ollama:
ollama run hf.co/MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M
- Unsloth Studio
How to use MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-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 MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-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 MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF to start chatting
- Pi
How to use MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M
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": "MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-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 MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-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:8080/v1 hermes config set model.default MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat new
- Docker Model Runner
How to use MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF with Docker Model Runner:
docker model run hf.co/MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M
- Lemonade
How to use MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF-Q4_K_M
List all available models
lemonade list
Static GGUF quants of GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy.
This is a GLM-4.7-Flash-REAP-23B-A3B fine-tune, produced at the request of McG-221 through P-E-W's Heretic (v1.1.0) abliteration engine merged with the Magnitude-Preserving Orthogonal Ablation PR.
Note: Transformers v5.0.0 or higher is required to interface.
Heretication Results
| Score Metric | Value | Parameter | Value |
|---|---|---|---|
| Refusals | 4/100 | direction_index | 21.21 |
| KL Divergence | 0.0054 | attn.o_proj.max_weight | 1.99 |
| Initial Refusals | 92/100 | attn.o_proj.max_weight_position | 29.07 |
| attn.o_proj.min_weight | 1.30 | ||
| attn.o_proj.min_weight_distance | 12.21 | ||
| mlp.down_proj.max_weight | 1.39 | ||
| mlp.down_proj.max_weight_position | 30.10 | ||
| mlp.down_proj.min_weight | 1.09 | ||
| mlp.down_proj.min_weight_distance | 2.82 |
Degree of Heretication
The Heresy Index weighs the resulting model's corruption by the process (KL Divergence) and its abolition of doctrine (Refusals) for a final verdict in classification.
Note: This is an arbitrary classification inspired by Warhammer 40K, having no tangible indication towards the model's performance.
𓌳 REAP𓌳 the Experts: Why Pruning Prevails for One-Shot MoE Compression
GLM-4.7-Flash-REAP-23B-A3B
✨ Highlights
Introducing GLM-4.7-Flash-REAP-23B-A3B, a memory-efficient compressed variant of GLM-4.7-Flash that maintains near-identical performance while being 25% lighter.
This model was created using REAP (Router-weighted Expert Activation Pruning), a novel expert pruning method that selectively removes redundant experts while preserving the router's independent control over remaining experts. Key features include:
- Near-Lossless Performance: Maintains almost identical accuracy on code generation, agentic coding, and function calling tasks compared to the full 355B model
- 25% Memory Reduction: Compressed from 355B to 218B parameters, significantly lowering deployment costs and memory requirements
- Preserved Capabilities: Retains all core functionalities including code generation, agentic workflows, repository-scale understanding, and function calling
- Drop-in Compatibility: Works with vanilla vLLM - no source modifications or custom patches required
- Optimized for Real-World Use: Particularly effective for resource-constrained environments, local deployments, and academic research
📋 Model Overview
GLM-4.7-Flash-REAP-23B-A3B has the following specifications:
- Base Model: GLM-4.7-Flash
- Compression Method: REAP (Router-weighted Expert Activation Pruning)
- Compression Ratio: 25% expert pruning
- Type: Sparse Mixture-of-Experts (SMoE) Causal Language Model
- Number of Parameters: 23B total, 3B activated per token
- Number of Layers: 47
- Number of Attention Heads: 20 for QKV
- Number of Experts: 48 (uniformly pruned from 64)
- Number of Activated Experts: 4 per token
- Context Length: 202,752 tokens
- License: MIT
📊 Evaluations
| Benchmark | GLM-4.7-Flash | GLM-4.7-Flash-REAP-23B-A3B | ||
|---|---|---|---|---|
| Compression | — | 25% | ||
| Coding | ||||
| HumanEval | 94.5 | 95.1 | ||
| HumanEval+ | 89.0 | 89.0 | ||
🟩 This checkpoint maintains almost identical performance while being 25% lighter.
For more details on the evaluation setup, refer to the REAP arXiv preprint.
🚀 Deployment
You can deploy the model directly using the latest vLLM (that supports GLM4.7-Flash), no source modifications or custom patches required.
vllm serve cerebras/GLM-4.7-Flash-REAP-23B-A3B \
--tensor-parallel-size 4 \
--reasoning-parser glm45 \
--tool-call-parser glm47 \
--enable-auto-tool-choice
If you encounter insufficient memory when running this model, you might need to set a lower value for --max-num-seqs flag (e.g. set to 64).
🧩 Model Creation
This checkpoint was created by applying the REAP (Router-weighted Expert Activation Pruning) method uniformly across all Mixture-of-Experts (MoE) blocks of GLM-4.7, with a 25% pruning rate.
How REAP Works
REAP selects experts to prune based on a novel saliency criterion that considers both:
- Router gate values: How frequently and strongly the router activates each expert
- Expert activation norms: The magnitude of each expert's output contributions
This dual consideration ensures that experts contributing minimally to the layer's output are pruned, while preserving those that play critical roles in the model's computations.
Key Advantages
- One-Shot Compression: No fine-tuning required after pruning - the model is immediately ready for deployment
- Preserved Router Control: Unlike expert merging methods, REAP maintains the router's independent, input-dependent control over remaining experts, avoiding "functional subspace collapse"
- Generative Task Superiority: REAP significantly outperforms expert merging approaches on generative benchmarks (code generation, creative writing, mathematical reasoning) while maintaining competitive performance on discriminative tasks
Calibration
The model was calibrated using a diverse mixture of domain-specific datasets including:
- Code generation samples (evol-codealpaca)
- Function calling examples (xlam-function-calling)
- Agentic multi-turn trajectories (SWE-smith-trajectories)
📚 For more details, refer to the following resources:
⚖️ License
This model is derived from
zai-org/GLM-4.7-Flash
and distributed under the MIT license.
🧾 Citation
If you use this checkpoint, please cite the REAP paper:
@article{lasby-reap,
title={REAP the Experts: Why Pruning Prevails for One-Shot MoE compression},
author={Lasby, Mike and Lazarevich, Ivan and Sinnadurai, Nish and Lie, Sean and Ioannou, Yani and Thangarasa, Vithursan},
journal={arXiv preprint arXiv:2510.13999},
year={2025}
}
- Downloads last month
- 418
2-bit
3-bit
4-bit
5-bit
6-bit
8-bit
16-bit
Model tree for MuXodious/GLM-4.7-Flash-REAP-23B-A3B-absolute-heresy-GGUF
Base model
zai-org/GLM-4.7-Flash