Crucible — Design Spec

Date: 2026-06-19 Status: Approved (core) — pending final spec review Working name: Crucible (rename freely)

A cross-platform workbench for running, uncensoring, instrumenting, and benchmarking open-weight GLM models locally, wrapped in a Claude-Code-style agentic harness.


1. Goals & Non-Goals

Goals

Non-Goals


2. Hardware Reality (the constraint that shapes everything)

Node class CPU RAM GPU Role
Laptop modern 8–16 core 32 GB integrated / small dGPU Control plane + dev model (GLM-4-32B) + fast local uncensored
High-RAM workstation multi-channel DDR4/5 128–256 GB mid-range (10–12 GB) Heavy inference node (GLM-5.2)
Server 8-channel server CPU 256–512 GB 24–32 GB Production inference node

GLM-5.2 = 743B total / 39B active MoE (DeepSeek Sparse Attention, MIT license, weights public 2026-06-16). A MoE keeps all experts resident, so RAM ≈ on-disk quant size:

Quant Size Fits 128 GB Fits 256 GB Quality
Q4_K_M ~390 GB very good
Q2_K ~210 GB degraded-but-real
IQ2 / ~2-bit dynamic ~155–186 GB ⚠️ light NVMe paging usable
IQ1 / 1.58-bit dynamic ~150–160 GB ⚠️ ~30 GB paging rough

Local dev/uncensoring target: GLM-4-32B-0414 (dense 32B, MIT, Q4_K_M ≈ 19.7 GB) — the largest GLM that truly runs on 32 GB RAM and can be abliterated + benchmarked for real. GLM-4-9B is the fast/low-disk alternative.


3. Architecture — Control Plane + Inference Node

Nothing hard-binds to one machine. All model traffic goes over an OpenAI-compatible HTTP endpoint.

┌─────────────────────────── Control Plane (Mac) ───────────────────────────┐
│  Web GUI (React/Vite)  ── HTTP/SSE ──▶  Backend (FastAPI, Python)          │
│   Agent · Guardrails · Uncensor · Weights · Models · Benchmarks            │
│                                                                            │
│  Backend subsystems:                                                       │
│   • Model Registry        • Agent Harness (tool loop)                      │
│   • Guardrails Engine      • Abliteration/Steering Pipeline (torch)        │
│   • Weight/Interp Explorer • Eval Harness                                  │
│   • Audit Log              • llama-server launcher/supervisor              │
└───────────────┬───────────────────────────────────────────┬──────────────┘
                │ OpenAI-compatible HTTP                       │
        ┌───────▼────────┐                            ┌────────▼─────────┐
        │ llama-server    │                            │ llama-server     │
        │ Mac: GLM-4-32B  │                            │ Win: GLM-5.2     │
        └─────────────────┘                            └──────────────────┘

Swapping the backing model = changing a URL + entry in the Model Registry. The abliteration/steering pipeline runs on whichever node holds the weights (Mac for 32B; Windows/Linux for 5.2).


4. Components

Each unit has one purpose, a defined interface, and is independently testable.

4.1 Inference Layer

4.2 Model Registry

4.3 Agent Harness ("better than OpenCode")

The Claude-Code-style loop, encoding how the assistant actually works:

4.4 Guardrails Engine (GUI-managed)

Layered, each independently toggleable with an intensity control:

4.5 Uncensoring Pipeline (Abliteration + Steering)

4.6 Weight / Interpretability Explorer

4.7 Eval Harness + Comparison Report

4.8 Audit Log


5. Tech Stack


6. Honest Scope & Ethics


7. Build Order (each phase ships something usable)

  1. Foundation — Model Registry + llama-server launcher + GLM-4-32B-0414 Q4 download + verified OpenAI-compatible endpoint.
  2. Agent harness + GUI shell — tool loop, streaming chat, permission system, tabbed web app. Usable coding agent.
  3. Guardrails Engine — presets + filters + constitutional self-critique + per-turn visibility.
  4. Uncensoring pipeline — abliteration + activation steering + A/B + variant management + model cards.
  5. Weight / Interpretability Explorer.
  6. Eval Harness + comparison report (capability + safety + live-vs-assistant + calibration).
  7. OpenCode integration + point at a remote GLM-5.2 node (1.58-bit at 128 GB; Q2_K at 256 GB).

8. Open Questions / Future