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 design/facet_calib.py with huggingface_hub
Browse files- design/facet_calib.py +7 -0
design/facet_calib.py
CHANGED
|
@@ -13,6 +13,7 @@ import glob
|
|
| 13 |
import json
|
| 14 |
import os
|
| 15 |
import random
|
|
|
|
| 16 |
from collections import Counter
|
| 17 |
|
| 18 |
HERE = os.path.dirname(__file__)
|
|
@@ -43,6 +44,12 @@ def main():
|
|
| 43 |
mix.append((os.path.basename(fp).split("_")[0], open(fp, encoding="utf-8", errors="ignore").read()))
|
| 44 |
for t in _sample("heal/design/seeds.jsonl", 9):
|
| 45 |
mix.append(("design", t))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
# 2) balanced samples per capability from the heal corpora
|
| 47 |
for cap, rel, k in [("design", "heal/design/train.jsonl", 40),
|
| 48 |
("math", "heal/lean/train.jsonl", 40),
|
|
|
|
| 13 |
import json
|
| 14 |
import os
|
| 15 |
import random
|
| 16 |
+
import sys
|
| 17 |
from collections import Counter
|
| 18 |
|
| 19 |
HERE = os.path.dirname(__file__)
|
|
|
|
| 44 |
mix.append((os.path.basename(fp).split("_")[0], open(fp, encoding="utf-8", errors="ignore").read()))
|
| 45 |
for t in _sample("heal/design/seeds.jsonl", 9):
|
| 46 |
mix.append(("design", t))
|
| 47 |
+
# the facet CANONS — dense facet vocabulary (OKLCH/Tufte/Saltzer/Erdős/…), a strong per-facet REAP activator
|
| 48 |
+
# that exercises each facet's experts so a harder prune (14/7GB) keeps them. Full balance comes from the flywheel.
|
| 49 |
+
sys.path.insert(0, os.path.join(ROOT, "src"))
|
| 50 |
+
from soul import FACETS # noqa: E402
|
| 51 |
+
for name, facet in FACETS.items():
|
| 52 |
+
mix.append((name, facet.canon))
|
| 53 |
# 2) balanced samples per capability from the heal corpora
|
| 54 |
for cap, rel, k in [("design", "heal/design/train.jsonl", 40),
|
| 55 |
("math", "heal/lean/train.jsonl", 40),
|