← MLTQ Archive / INDEX ACTIVE
Pentahelicium solidus
STILL SPECIMEN
Pet gently. They don’t bite.

BRAID

Native Qt6 runner, mechanistic interpretability workbench, and two-stage strand trainer for Kotodama Strands — plural language models whose middle layers split into multiple selves connected by cross-self attention links and a per-token merge choke point.

GitHubThis project 1 commits · 3,503 contributions 2026-02-26 — 2026-12-02
500M
KOTODAMA STRANDS BACKBONE
~1.5 GiB
BF16 INFERENCE VRAM
6 TABS
WEAVE TO TWO-STAGE GROW
6 LAYERS
LIVE LINK MASS HEATMAP

Braid is a native C++/Qt6 desktop runner, mechanistic interpretability workbench, and two-stage strand trainer for Kotodama Strands (LuxiaSL/kotodama-strands-500m), plural language models whose middle layers split into multiple selves joined by cross-self attention links and a per-token merge choke point at layer 30.

The point is to inspect and steer plurality directly rather than treating it as a prompting trick. On one consumer GPU (~1.5 GiB VRAM in BF16 for inference, ~11 GiB while growing two new selves alongside the server), Braid hot-swaps between the five published Hugging Face revisions (main, shared, private, trunk, ctrl) and any locally grown checkpoint under checkpoints/, while exposing every internal switch in real time.

THE WORKBENCH

  • [1] WEAVE: Fronted generation with per-token StrandMerge (L30) self-attribution highlighting, live fronting share bar, hover merge_w and entropy inspection, and 1-click 4-way causal lesion compare (plain, links live, links cut, deltas off).
  • [2] SELVES: Multi-self memory lab separating the shared trunk (tick -1) from per-self private texts and ticks (0/1/2), with planted-secret transfer presets, parallel top-k next-token distributions, and parallel continuations across every self.
  • [3] LINKS: Interactive K × K strand_hear reader-by-source hearing matrix (ALL, RING, S0 BROADCAST, MUTE S0, ISOLATE ALL), link.value_off value-only lesion switches, and a custom C++ LinkMassCanvas rendering per-layer Link Attention Mass across L11, L15, L19, L23, L26, L29 plus the Null Slot Ø.
  • [4] LEVERS: On-the-fly Kotodama Entropy-Gradient Steering Vector (EGV) builder projecting V7 (entropy), Vrep⊥V7 (anti-loop), Vmargin⊥, and Veos⊥ onto the Cov(h) eigenband [16, 256), with block-persistent AttnRes write rules (K / N / S), decode/uniform span control, MLP neuron clamping, and live geometric health (RankMe, anisotropy, residual RMS).
  • [5] LOGS: Live braid-serve console and OpenAI-compatible API (/v1/completions, /v1/chat/completions on :8011) honoring Kotodama sampling laws.
  • [6] GROW: Two-stage Strands trainer (server/braid_grow.py) with native xdg-desktop-portal file/folder pickers, cached PyMuPDF textbook ingestion, multi-character scene parsing, live loss curve, and 1-click hot-loading.

TWO-STAGE STRAND GROWTH

Growing new selves onto an existing checkpoint without overwriting the existing cast splits into two passes on a single GPU:

  • Stage 1 — Private Identity: Freezes the trunk, cross-self links, and existing selves; trains only the newcomer *_grow private deltas and strand_embed_grow with strand_cut = True so each new self forms an isolated private band from its own PDFs, Markdown, TeX, JSONL, or character POV text.
  • Stage 2 — Join the Room: Keeps every existing self's private deltas frozen while unfreezing strand_links and strand_merge under either shared or private memory policy, mixing in general-English replay snippets so baseline S0..S4 routing stays intact. In character mode, scene scripts (Name: dialogue with narrator blocks) parse straight onto the Strands tick clock — narrator on trunk tick -1, character turns on 0, 1, 2....

Finished runs write a standard Kotodama Hugging Face layout (model.safetensors, config.json, aliases.json, braid_meta.json) under checkpoints/<name>/ and appear immediately in the sidebar alongside the published revisions.

IMPLEMENTATION NOTES

Upstream checkpoints carry B200-oriented attention settings (fa4/fa2) and flex_attention block masks that trigger recompiles whenever interactive decode changes sequence length. braid_serve.py and braid_grow.py normalize attention cleanly onto RTX 4090 / 2070 SUPER compatible SDPA and route StrandLink.forward through SDPA directly — bit-equivalent math, no recompilation stalls, and uninterrupted link.last_mass telemetry. The Qt6 shell tracks live Omarchy themes and Hyprland corner rounding, binds single-key lesion toggles (L for links, D for private deltas, 1–6 for tabs), and includes an offscreen --snapshot mode to grab all six tabs cleanly.