Squidling started as an Ada Lovelace (sm_89) port of ingine, an inference engine for Inkling-2-Mini that originally required a 32 GB RTX 5090 (sm_120a). sm_120a support stays intact while adding full RTX 4090 and Turing (sm_75) sidecar builds. From there it grew into a CUDA workbench for looped-transformer inference: rotated 4-bit and 3-bit KV compression, a zero-P2P split-attention coprocessor, zero-backprop GPU weight editing and evolution, adaptive Markov tree speculation, mechanistic affect steering, and a 231 KB native C++/Qt6 loader.
2026.11.30 — OPTICAL CIRCUITS
tools/es/optical_steer.py reverses Inkling-2-Mini's internal concept and affect embeddings back through its native 23-layer inkling2_vision encoder into smooth, band-limited 2D Fourier images. To a human eye they look like early DeepDream — swirling organic color fields with no readable text. To the model, its 40×40 visual super-patches decode directly into concentrated 2,304-dim B0 residual vectors that steer the downstream reply (melodramatic, curiosity, cosmic_awe, noir, concise, shakespeare).
2026.11.29 — MANIFOLD-SAFE RSI v3
Overnight RSI v2 proved zero-backprop self-improvement worked on blind held-out benchmarks, and also exposed how it breaks out of distribution: distilling vz CLI habits and editing sparse lm_head rows warped routers by 28% and looped message gates by 10%. RSI v3 removes tool distillation and unembedding edits entirely, caps cumulative per-matrix relative L2 drift from the base weights at 4.5%, widens the null-space G_keep anchor bank to 60+ prompts spanning MCP tool catalogs, multi-turn JSON traces, reflective prose, Python, Bash, and math, and gates every candidate on unclipped (temp=1.0, top_p=1.0) 4-pass OOD stress runs before promotion.
2026.11.27 — HYBRID RSI, FP-SOLVE, AFFECT LAB & TREE SPECULATION
The engine gained dynamic runtime loop depth (--loop-passes 3|4|5, switching live in under 0.4 s with only +120 MB VRAM for 4-pass under LoopDelta-TQ) and two zero-backprop weight mechanisms that run strictly on portable .safetensors overlays (--es-weights) over frozen 128-expert MoE weights with zero decode overhead:
- Native CUDA Null-Space Cholesky Editing (
fp_solve.cu): Solves(G_edit + λ G_keep + α I) ΔWᵀ = Bvia cuBLAS and cuSOLVER in under 285 MB scratch.fp_solve_loopstabilizes 168 loop matrices so 4-pass looping stops collapsing into repetition (blind 4-pass AIME/Olympiad math goes from 0/24 at 38% repetition to 8/24 at 0% repetition; 4-pass hard Python and 3D-Lenia code goes from 0/8 to 6/8).fp_distill_pass4_to_3folds verified 4-pass solutions back into faster 3-pass weights. - In-Place GPU Evolution (
squidling-es): Philox Gaussian or low-rank EGGROLL perturbations synced straight into live GPU buffers so captured CUDA graphs and--specrun at full speed (~205–230+ tok/s) with exact full-200K-vocabulary anchor KL projection (--kl-beta) and host-RAM rollback if--max-kltrips. In the 4-pillar overnight run, blind 3-pass math rose from 16/24 (66.7%) to 21/24 (87.5%) and the composite rose 0.4855 → 0.7460 atKL = 0.0586(196.3 tok/schat,268.8 tok/scode). - Adaptive Best-First Markov Tree Speculation (
--spec-tree): Expands a rooted 8-node best-first tree inside DSpark's existing 7 RNN steps and threads a 52-byteTreePlanthrough decode attention, convs, MoE down-projection, and the sidecar with exact lossless verification. Lifts 3-pass code (T=0) to 316.0–329.1 tok/s and 4-pass code by +25.8% to +31.1% (246.4–256.9 tok/s). - Mechanistic Affect Lab & Native Desktop Instrument: Captures response-pooled post-MLP residual writes across all 48/60 recurrent visits (110,592 neurons, 1.25–1.85 s per concept on 4090), scores per-neuron paired Cohen's d with leave-one-pair-out validation (100% peak accuracy across all five starter affects), orthogonalizes out neutral math/code/JSON SVD directions (keeping 5/5 math + JSON integrity), and hot-swaps persistent GPU steering buffers via
/v1/steeringin under 10 ms without re-capturing CUDA graphs. Controlled from either the self-hosted web Control Deck (./squidling-deck) or a 231 KB C++20/Qt6 Quick binary binding/tmp/squidling-taps.sockfor a 60 fps 4-depth oscilloscope and 3D Surprisal & Latent Sphere.
LOOPDELTA-TQ & THE 1M-TOKEN SIDECAR
Porting ingine to RTX 4090 (sm_89) meant replacing Blackwell-only instructions without giving up bit accuracy: a register-only PRMT (__byte_perm) E2M1 → FP16x2 decoder for NVFP4 experts, Ada-native FP8 → BF16 conversion, and monotonic GPU-scope L2 barriers (atom.release.gpu / ld.acquire.gpu) in place of Hopper/Blackwell thread-block clusters and DSMEM. All 20 unit, FP64-oracle, CUDA-graph, speculation, prefill, and vision tests pass on 4090.
Long context on consumer VRAM took three steps stacked together:
- TurboQuant-4 (
--kv-tq4): Self-contained 528 B/token rows (8.25 KiB/tokacross all 8 full-attention visits) storing 4-bit Lloyd-Max codes in signed Walsh–Hadamard space. BecauseR = H Dis orthogonal,Qrotates once before the key loop, attention runs in rotated space via a 1-cycle warp-shuffle register LUT, andOinverse-rotates once at the end — 1.57×–1.75× faster than FP8 at 256K (355.2 µsvs621.1 µs). - LoopDelta-TQ (
--kv-loopdelta): Inkling-2-Mini loops full-attention layers 11 and 17 three times (6 of its 8 full-attention visits). Probing activations across 2,100 tokens showed +0.86 to +0.94 cross-pass Key cosine similarity (+6.0 to +9.2 dB prediction gain). Anchor visits keep 4-bit TQ4; looped passes 1 and 2 predict from their already-quantized pass-0 anchor and store closed-loop 2-bit Lloyd-Max residuals (288 B/row), cancelling anchor quantization error inside the residual. That cuts full KV to6.375 KiB/tok(3.0 bits/elem average,6.38 GiBat 1M tokens) at 96.2% top-1 agreement (KL = 6.70e-3), running 273.7 tok/s chat and 310.4 tok/s code. - Zero-P2P Split-Attention Sidecar (
--kv-sidecar) & Slim Pack: On consumer dual-GPU boards without PCIe P2P (PHB), bulk KV streaming between an RTX 2070 SUPER and RTX 4090 stalls at1.53 GB/s(~1,450 ms/step at 256K). Instead, all 8 full-attention KV caches live 100% on the secondary GPU in 16-token head-major GDDR6-sector-aligned tiles. One 4090 kernel writes ~21 KiB of rotatedQ/K/Vto pinned host RAM, rings a.sys-scope atomic doorbell to a worker thread on the 2070S, runs Turingmma.sync.aligned.m16n8k8Tensor Core FlashAttention locally, and reads back 12 KiB ofO— zerocudaLaunchHostFunc, fully CUDA-graph and--speccompatible. Paired with--embed-cpu,--experts-fp4 4,--prefill-chunk 1024, and--draft-ctx 8192, 4090 usage drops from 20.75 GB to 16.89 GB, passes a 70,642-token Needle-in-a-Haystack verbatim at 2,540 tok/s prefill and 142.1 tok/s decode, scales cleanly to 1,048,576 tokens (~45.9 tok/s estimated--spec), and leaves ~4.3 GiB free on both GPUs for co-resident TTS/STT or Scuttle.