The engine

Welvet

Welvet is the brain of the whole project: an AI engine, built from scratch in Go, that can train and run neural networks on the hardware you already own. No cloud, no special chip, no black box.

Windows Linux macOS Android iOS

Why software must inhabit 3D spatial topologies

Monolithic flat silicon has hit a thermodynamic boundary. Watch the technical walkthrough on how Welvet's pure Go engine and 3D volumetric grid break the von Neumann memory wall.

Welvet AI Engine Overview & 3D Wafer Stacking Architecture
🧊

3D Wafer & Spatial Grid

Flat silicon overheats. Welvet maps neural networks directly to 3D spatial XYZ coordinates, matching next-gen wafer-to-wafer direct copper bonding and embedded DRAM vaults.

Zero CGO & Plan 9 ASM

Bypasses C++ runtime locks and Python FFI overhead. Written in pure Go and handwritten Plan 9 assembly to eliminate the 200ns-per-op scheduler bottleneck.

🔒

Strict Storage Truth

No silent FP32 inflation. Operates natively across 34 numeric types and 20 quantization formats, keeping sub-byte data compact across the bus.

What is an AI engine?

An AI "model" is the trained thing that answers questions or makes pictures. An engine is the program that actually loads that model and runs it. Welvet is that program: a single, self-contained library you can drop into an app so it can think locally, the same way SQLite lets an app store data without a database server. Train once, then run the exact same model on Windows, Linux, macOS, Android, or iOS.

📦

Same model, every OS

Runs on Windows, Linux, macOS, Android, and iOS. Copy a .entity model between them and it loads the same way, no re-export and no cloud.

🎯

Predictable results

Same input, same output, every time, across phones, laptops, and desktops. That reliability is the whole point.

🧩

Runs real models

Load popular open models (via Octo) and squeeze them down to fit on modest hardware, offline.

From Loom to Welvet

Welvet is the next chapter of our earlier engine, Loom. Most of the ideas carry straight over. This is mainly a cleaner structure: one feature per folder, honest error messages, and a strict rule that tests and demo apps live outside the engine. The headline change for users is that the model app, Octo, now runs several kinds of AI (chat, images, and speech), not just one.

Old /loom links now point here. The engine's public home is github.com/openfluke/welvet.

Under the hood

Pure Go, one feature per folder. Dense is the shared MatVec microkernel; storage-truth numeric types and quants; three backends: CPU tiled, Plan 9 SIMD, and WebGPU. Tests live in w2a, never in the engine.

Install

go get github.com/openfluke/welvet@latest
# then explore the runnable examples in the feature book
v0.76 · scorecard → v1.0 (76/100) Apache-friendly open source no silent fallbacks
Deep dive every package with runnable go run . examples: the Welvet feature book ↗

Dense is the shared MatVec microkernel

Most transformer and CNN FLOPs are weights × activations. Welvet keeps one Dense stack for that (FormatNone × 34 dtypes + 20 quants × CPU / SIMD / WebGPU). Layers whose expensive bit is GEMV reuse it.

KindExamplesWhat runs where
Native layer math Dense, RMSNorm, LayerNorm, Softmax, Embedding Own fwd/bwd; norms and softmax have real WebGPU shaders
Composite → Dense MHA, SwiGLU, RNN, LSTM, Residual, Sequential Projections are Dense children; attention / SiLU / recurrence stay local
im2col → Dense CNN1 / CNN2 / CNN3 Host im2col, then Dense GEMV (tiled conv shaders still open)
One MatVec surface means one place for quant bugs, dtype wires, and backend parity. Separate native kernels pay off when the calc is not GEMV.
Honest gaps today: k/IQ/Affine SIMD often inflate-once then DotTile (not true fused asm); MHA attention and some Softmax/SiLU paths still use host ALU; WebGPU device ALU is typically f32 at the boundary. w2a stamps these; nothing silent counts as “done.”

Engine, proof, and apps

Welvet is the engine only. Tests and the model shell live in sibling repos, never inside engine packages.

🧠

openfluke/welvet

Engine

Layers, quant, Plan 9 SIMD, WebGPU, ENTITY, dispatch. One feature per folder.

GitHub ↗

openfluke/w2a

Proof

Tests, CABI, docs, menus. The honesty harness that stamps every claim.

w2a page →
🐙

openfluke/octo

Model shell

HF download, convert → ENTITY, quantize, run. The Lucy successor.

Octo page →
FolderContains
(top)core, weights, quant, simd, webgpu, tiling, architecture, layers/
runtime/forward, backward, training, step
systems/dna, evolution, tween, tanhi, telemetry
model/transformer, entity, tokenizer, sampling, hf
apps/octo, flux2, mosstts
stub/seed, serialization, hardware, memory, fountain, donate, accel
loom/poly is legacy reference only. Welvet is the rewrite.

Rules the engine lives by

  • No testing code in the engine — all checks live in w2a.
  • No fallbacks — missing path → hard error (no SIMD→Go, no fake GPU).
  • Nothing hardcoded to float32 — APIs are Tensor[T] / generics.
  • No QATDType + QuantFormat are storage truth.
  • One feature → one folder.
  • v1.0 = scorecard 100/100 — every board row ✅.

What “done” means

For each layer or op, every cell must work. No cell may silently substitute another cell.

3
backends
34
dtypes
20
quant formats
2
fwd + bwd
BackendStatusRequirement
CPU tiledSC+MC; stream native + packed MatVec
Plan 9 SIMDamd64 AVX2+FMA / arm64 NEON; unsupported arch → hard error
WebGPUReal device; FormatNone + quant GEMV; no host fake-GPU

v0.76 toward v1.0

Formula: version = 0.{round(earned)} until 100 → v1.0. Today: 76 / 100. Only this board sets the version number.

✅ Implemented · 100% of row 🚧 Partial · 50% of row ⬜ Not started · 0%
#SectionWtEarned
1Foundation — layout, core, weights, quant, simd, webgpu, tiling1515.0
2Dense MatVec microkernel — FormatNone×34 + quants × backends1513.5
3Transformer stack — MHA, SwiGLU, norms, Embedding, Sequential…1414.0
4CNN / RNN / LSTM — full timed 34×20×3 matrices66.0
5Extended layers — GDN, ConvT, Mamba, KMeans, Parallel…73.5
6Runtime + architecture — volumetric grid, fwd/bwd/train/step88.0
7Systems — dna, evolution, tween, tanhi, telemetry55.0
8Model / IO — tokenizer, entity, transformer, sampling, hf88.0
9Apps — Octo model shell31.5
10Stubs — seed, serialization, hardware, memory…31.5
11Accel — NPU / Metal / QNN plugins20.0
12Peak fused / no host ALU140.0
Total → v1.010076.0
Biggest remaining chunks: peak fused (14), extended layers (~3.5), then apps / stubs / accel. Full dtype and quant boards live in the README on GitHub ↗.

What ships today

AreaStatus
Engine layout (one feature → one folder)
Rules: no engine tests / no fallbacks / no hardcoded f32 / no QAT
core — 34 dtypes, Tensor[T], activations, backends
weights — FormatNone × 34 stream pack / MatVec
quant — Pack / Unpack / MatVec all 20 formats (CPU)
simd — Plan 9 kernels (amd64 / arm64)
webgpu — Dense GEMV family + norm / softmax / SwiGLU fuse
Dense FormatNone × 34 × 3 backends fwd+bwd
Dense k/IQ/Affine SIMD (inflate + DotTile, not fused)🚧
architecture — volumetric grid
Model IO / transformer / entity / tokenizer / hf
apps/octo — interactive model shell🚧
stub/accel — NPU / Metal / QNN
Full v1 matrix (every cell peak-fused)