Text Generation
MLX
Safetensors
English
glm_moe_dsa
apple-silicon
Mixture of Experts
pruned
quantized
soul-targeted
agentic
local-agent
glm
conversational
Eval Results (legacy)
4-bit precision
Instructions to use philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX with MLX:
# Make sure mlx-lm is installed # pip install --upgrade mlx-lm # Generate text with mlx-lm from mlx_lm import load, generate model, tokenizer = load("philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX") prompt = "Write a story about Einstein" messages = [{"role": "user", "content": prompt}] prompt = tokenizer.apply_chat_template( messages, add_generation_prompt=True ) text = generate(model, tokenizer, prompt=prompt, verbose=True) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Pi
How to use philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX with Pi:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX"
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "mlx-lm": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX with Hermes Agent:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX"
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 philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX
Run Hermes
hermes
- OpenClaw new
How to use philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX with OpenClaw:
Start the MLX server
# Install MLX LM: uv tool install mlx-lm # Start a local OpenAI-compatible server: mlx_lm.server --model "philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX"
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 "philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX" \ --custom-provider-id mlx-lm \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
- MLX LM
How to use philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX with MLX LM:
Generate or start a chat session
# Install MLX LM uv tool install mlx-lm # Interactive chat REPL mlx_lm.chat --model "philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX"
Run an OpenAI-compatible server
# Install MLX LM uv tool install mlx-lm # Start the server mlx_lm.server --model "philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX" # Calling the OpenAI-compatible server with curl curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "philipjohnbasile/GLM-5.2-Demolition-q4a4-soul-MLX", "messages": [ {"role": "user", "content": "Hello"} ] }'
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -18,6 +18,23 @@ secret**, and it can be **fine-tuned on *your* private repo** so it writes in yo
|
|
| 18 |
A **niche specialist**, not a general model — tuned to beat a frontier model *in one lane* (agentic
|
| 19 |
coding + design for **TS/JS/Python/Rust/Go/HTML/CSS** + Postgres) by out-*verifying* it, not out-knowing it.
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
## How it was made
|
| 22 |
1. **Pruned** the MoE experts 256 → 77 by **router-weighted saliency (REAP** = `router_weight ×
|
| 23 |
activation_norm`, padding-masked), streaming layer-by-layer (~5 GB working set — it never fits in RAM).
|
|
|
|
| 18 |
A **niche specialist**, not a general model — tuned to beat a frontier model *in one lane* (agentic
|
| 19 |
coding + design for **TS/JS/Python/Rust/Go/HTML/CSS** + Postgres) by out-*verifying* it, not out-knowing it.
|
| 20 |
|
| 21 |
+
## My AI-Engineer / Full-Stack / Data-Science / ML build
|
| 22 |
+
This is the version I run wearing all four hats — **one on-device model, no cloud key**, tooled for the
|
| 23 |
+
whole stack of those roles (strongest in the coding/agentic lane, deliberately so):
|
| 24 |
+
- **AI Engineer** — *builds and ships agentic AI locally*: the 47-tool ReAct agent, **verified +
|
| 25 |
+
constrained decoding**, grammar-constrained tool I/O, MLX-native serving + the speed/stability work
|
| 26 |
+
(prompt-cache, continuous batching, frontier-grade serving). The model that *makes* AI products.
|
| 27 |
+
- **Full-Stack** — front-to-back in **TS/JS/Python/Rust/Go/HTML/CSS + Postgres**, the **compiler steering
|
| 28 |
+
every line**, a **design soul** (render-and-see critic: WCAG / type-scale / OKLCH) for the UI, and
|
| 29 |
+
**SQL-on-a-real-schema** for the API — plus edit→test→fix agentic loops on *your* repo.
|
| 30 |
+
- **Data Science** — stateful **REPL**, **SymPy / pandas / numpy / sklearn**, arXiv-RAG, competition-grade
|
| 31 |
+
math (GSM8K-style), and **code-rendered figures** (matplotlib / manim / TikZ).
|
| 32 |
+
- **Machine Learning** — it *is* applied ML end-to-end: **REAP expert-pruning** (256→77), **mixed-precision
|
| 33 |
+
quantization**, **LoRA healing**, **distillation**, **MTP self-speculation**, GRPO/RLVR experiments — the
|
| 34 |
+
build itself is a working reference — plus a local **Lean-4 formal-math** lane (correct-by-construction).
|
| 35 |
+
|
| 36 |
+
One model, fully local, **verify-everything**: the four hats I wear, on a MacBook.
|
| 37 |
+
|
| 38 |
## How it was made
|
| 39 |
1. **Pruned** the MoE experts 256 → 77 by **router-weighted saliency (REAP** = `router_weight ×
|
| 40 |
activation_norm`, padding-masked), streaming layer-by-layer (~5 GB working set — it never fits in RAM).
|