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
- 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 AGENTIC.md with huggingface_hub
Browse files- AGENTIC.md +49 -0
AGENTIC.md
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Run this as your local agentic coder
|
| 2 |
+
|
| 3 |
+
**The pitch:** not the highest SWE-bench — the **most reliable**. The local agentic coder that *can't break*:
|
| 4 |
+
**zero malformed tool-calls** (grammar-enforced, structurally impossible), **compiler-steered every line**,
|
| 5 |
+
**fabrication-proof `done`** (re-runs the real tests — can't fake a pass), and elite across the whole stack
|
| 6 |
+
(design · math · security · science), not just code. Reliability is the moat raw capability can't buy.
|
| 7 |
+
|
| 8 |
+
## Serve it (OpenAI-compatible, on your Mac)
|
| 9 |
+
```bash
|
| 10 |
+
# raise the GPU ceiling once (or long agentic runs OOM):
|
| 11 |
+
sudo sysctl iogpu.wired_limit_mb=122000
|
| 12 |
+
# serve base + the core soul (OpenAI-compatible on :8080):
|
| 13 |
+
GLM_STREAM_EVAL=0 python -m mlx_lm.server --model models/GLM-5.2-q3a4-v4 \
|
| 14 |
+
--adapter-path adapters-soul2 --port 8080
|
| 15 |
+
# optional: concise-thinking proxy (caps reasoning tokens -> faster, cleaner tool turns):
|
| 16 |
+
python scripts/08_think_proxy.py --port 8081 --upstream http://localhost:8080
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
## Point your agent at it
|
| 20 |
+
Anything that speaks **OpenAI-compatible** drops in against `http://localhost:8080/v1` (or `:8081` for the
|
| 21 |
+
think-proxy), any model name:
|
| 22 |
+
|
| 23 |
+
| Agent | Setup |
|
| 24 |
+
|---|---|
|
| 25 |
+
| **Cline** (VS Code) | Provider: *OpenAI Compatible* · Base URL `http://localhost:8080/v1` · any model id |
|
| 26 |
+
| **Aider** | `aider --openai-api-base http://localhost:8080/v1 --openai-api-key x --model glm-demolition` |
|
| 27 |
+
| **OpenCode** | add an OpenAI-compatible provider pointing at `:8080/v1` |
|
| 28 |
+
| **Cursor** | Settings → Models → override OpenAI Base URL to `:8080/v1` |
|
| 29 |
+
| **Claude Code** | needs an OpenAI→Anthropic shim (or `rapid-mlx`'s `ANTHROPIC_BASE_URL` trick) — Claude Code speaks the Anthropic API, not OpenAI |
|
| 30 |
+
|
| 31 |
+
**Recommended settings:** `temperature 0.6`, `top_p 0.95` for coding; `enable_thinking` on for hard problems,
|
| 32 |
+
off (or the think-proxy budget) for fast tool turns.
|
| 33 |
+
|
| 34 |
+
## Why it doesn't break (the reliability stack)
|
| 35 |
+
- **Grammar-constrained tool-JSON** — invalid tokens get zero probability at each step, so a malformed call is
|
| 36 |
+
*structurally impossible* (vs the field's best: "fewer malformed"). Speaks the 2026 strict-schema + MCP conventions.
|
| 37 |
+
- **Verified / compiler-steered decoding** — a line that adds a type error is backtracked as it's written.
|
| 38 |
+
- **Fabrication-proof `done`** — the agent re-runs the *original* tests before claiming success; it can't hallucinate a pass.
|
| 39 |
+
- **Integrity layer** — test-tamper guard, 16-provider secret-scan, scope enforcement, slopsquat guard.
|
| 40 |
+
- **51-tool ReAct agent** — trajectory compaction + stall detection for long-horizon runs; the verifier mesh checks every output against its real tool.
|
| 41 |
+
|
| 42 |
+
## Honest limits (and what's queued to fix them)
|
| 43 |
+
- **~11–14 tok/s decode** — the memory trade for a local 743B-class model. *Queued:* NVFP4 + M5 Neural Accelerators
|
| 44 |
+
(~2× decode on M5), throughput batching for concurrent requests (2.6× at B=8 today).
|
| 45 |
+
- **Long single generations can degenerate at 3-bit** (Computation Collapse). *Queued:* saliency-dynamic quant
|
| 46 |
+
(#59 — early/late experts at 4-bit) + a serve-layer auto-recovery that re-structures broken tool-output.
|
| 47 |
+
- **Needs a 128 GB Mac** — premium tier for now; a 64 GB sibling is deferred (depth before breadth).
|
| 48 |
+
|
| 49 |
+
The trade we made on purpose: less raw benchmark, in exchange for **reliability + breadth + fully local + verify-everything** — the things that actually decide whether an agent finishes the job.
|