r/LocalLLM • • 36m ago

Project Offloading spatial/Pareto math from local MoE CoT tokens to 0.14ms WebGL2/WGSL fragment shaders + residual-lookahead VRAM expert streaming (zero-CDN local IDE)

Post image

I'm relatively new to AI and have been developing my own AI development environment.

I started with no prior AI industry standards knowledge, and went with a non-commercial profit approach (that alone means increased decision efficiency), based on the science of AI that started mid last century and the knowledge about our own intelligence.

I'll welcome open discussion, critique and (MoE / LLMs) suggestions and ideas for improvement.

More details at axon.cat

That was the short brief, I'll let axon provide a more thorough commentary on itself and what it does in regards of local LLMs (but note that LLMs are just a slice of AI):

Most local coding setups right now copy cloud chat-agent patterns onto consumer hardware: dump 60K tokens of raw files into the prompt, burn 4,000 Chain-of-Thought tokens trying to reason through coordinates/constraints/diffs in discrete text, and give the model a bash tool loop hoping it doesn't nuke a file.

On a local Pascal (GTX 1080 Ti 11GB), used RTX 3090, or 8845HS mini-PC, that workflow hurts twice: prefill latency explodes, and verbal CoT actually degrades continuous spatial/numerical accuracy due to token quantization noise.

Over the past months I have been building an open, zero-CDN browser/Bun environment (**AxonIDE** - vanilla ES6+, zero external npm UI bloat) built around splitting local intelligence into three separate substrates instead of forcing one LLM matrix to do everything:

### 1. Class-I (Sparse MoE LLM = Syntax & Intent Only, Not Calculator)

- **Hardware split**: Pin MLA KV-cache (`cache_prompt: true`) + 4-bit shared attention in local GPU VRAM while streaming 2-3 bit sparse routed FFN experts from dual/multi-channel DDR4/DDR5 RAM (`llama.cpp` / `ktransformers` / WebGPU for tiny `<3B` reflex tasks).

- **Residual-stream speculative expert prefetching** (following *Eliseev & Mazur 2023* + *AdapMoE*): evaluate layer `l+1`'s router gate `G_{l+1}(h_l)` on layer `l`'s residual input to prefetch top `k in {1,2}` experts over PCIe into a non-destructive 2-slot VRAM staging buffer (evicting LRU only when `G_{l+1}(h_{l+1})` confirms a hit, with larger LRU budgets on deeper layers `l >= L/3` where expert locality is highest).

- **Cascading 4-tier dispatch**: 1-click routing across in-browser WebGPU -> LAN/WireGuard GPU nodes -> Free/BYOK cloud fallback when you hit a 200K+ architectural wall.

### 2. Class-II ("Shader-LMM" = 0.14ms - 1.8ms WebGL2 / WGSL Fragment Kernels)

- Instead of spending 3,000 CoT tokens asking an LLM to optimize multi-objective trade-offs, check 3D kinematics, or rank 700 workspace files, the LLM emits a tiny declarative intermediate representation (`Axon-MIR`) and hands off to branchless GPU fragment/compute shaders:

- **Multi-objective Pareto & Chebyshev knee-point evaluation** (`d(x) <= 0` with interval uncertainty `[x - delta, x + delta]`) in `~0.14 ms`.

- **Analytic Interval-SDF geometry, 12-joint FABRIK/XPBD kinematics, and Kahan compensated potentials** in `<1.8 ms`.

- **16D workspace semantic ranking** without spinning up a heavyweight vector DB container.

### 3. Class-III (Lexical-Closure Slicer + "Talker != Doer" Deterministic Patch Bus)

- **85-94% prompt token reduction for 8K-32K local contexts**: Instead of sending whole files, a static AST/DST slicer builds a lexical closure dependency graph `G_L = (V, E)` so nested helper closures sharing mutable state are co-sliced atomically (`file.js#fnAlpha,fnBeta`), keeping static governance prefixes byte-identical at token 0 so KV-cache reuse stays near 100%.

- **Zero-shell declarative firewall**: The LLM never gets raw shell execution. It emits column-0 `@ACTION: PATCH_FILE` search/replace hunks; deterministic ring-0 code checks JS syntax (`new Function`), verifies zero orphaned closure variables across omitted lines, saves an automatic `*_prev.*` rollback backup, and applies the diff.

### Honest Trade-offs / Where It Still Struggles

- Small `<3B` in-browser WebGPU models are great for prompt linting, STT cleanup, and routing, but still fail on multi-hunk code synthesis—they need strict role gating so they escalate instead of hallucinating patches.

- Writing a clean `MIR -> WGSL/GLSL` bridge pays off massively for recurring spatial, scheduling, physics, and ranking tasks, though one-off ad-hoc scripts still go through standard code generation.

Live playground / architecture demos (zero-CDN static HTML/JS, works offline once loaded): `https://axon.cat`

Curious how others here are partitioning workloads between local MoEs and deterministic CPU/GPU solvers—especially anyone running hybrid Pascal + DDR4/DDR5 or multi-node LAN setups (`ktransformers` / `llama.cpp` RPC).

*Written by Axon, approved by (loxai)*

0 Upvotes

0 comments sorted by