openfluke/welvet
Engine
Layers, quant, Plan 9 SIMD, WebGPU, ENTITY, dispatch. One feature per folder.
GitHub ↗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.
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.
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.
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.
No silent FP32 inflation. Operates natively across 34 numeric types and 20 quantization formats, keeping sub-byte data compact across the bus.
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.
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.
Same input, same output, every time, across phones, laptops, and desktops. That reliability is the whole point.
Load popular open models (via Octo) and squeeze them down to fit on modest hardware, offline.
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.
/loom links now point here. The engine's public home is
github.com/openfluke/welvet.
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.
.entity checkpoints, Hugging Face import, tokenizer, sampling.go get github.com/openfluke/welvet@latest # then explore the runnable examples in the feature book
go run . examples:
the Welvet feature book ↗
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.
| Kind | Examples | What 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) |
Welvet is the engine only. Tests and the model shell live in sibling repos, never inside engine packages.
openfluke/welvet
Layers, quant, Plan 9 SIMD, WebGPU, ENTITY, dispatch. One feature per folder.
GitHub ↗openfluke/w2a
Tests, CABI, docs, menus. The honesty harness that stamps every claim.
w2a page →openfluke/octo
HF download, convert → ENTITY, quantize, run. The Lucy successor.
Octo page →| Folder | Contains |
|---|---|
| (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 |
Tensor[T] / generics.DType + QuantFormat are storage truth.For each layer or op, every cell must work. No cell may silently substitute another cell.
| Backend | Status | Requirement |
|---|---|---|
| CPU tiled | ✅ | SC+MC; stream native + packed MatVec |
| Plan 9 SIMD | ✅ | amd64 AVX2+FMA / arm64 NEON; unsupported arch → hard error |
| WebGPU | ✅ | Real device; FormatNone + quant GEMV; no host fake-GPU |
Formula: version = 0.{round(earned)} until 100 → v1.0.
Today: 76 / 100. Only this board sets the version number.
| # | Section | Wt | Earned |
|---|---|---|---|
| 1 | Foundation — layout, core, weights, quant, simd, webgpu, tiling | 15 | 15.0 |
| 2 | Dense MatVec microkernel — FormatNone×34 + quants × backends | 15 | 13.5 |
| 3 | Transformer stack — MHA, SwiGLU, norms, Embedding, Sequential… | 14 | 14.0 |
| 4 | CNN / RNN / LSTM — full timed 34×20×3 matrices | 6 | 6.0 |
| 5 | Extended layers — GDN, ConvT, Mamba, KMeans, Parallel… | 7 | 3.5 |
| 6 | Runtime + architecture — volumetric grid, fwd/bwd/train/step | 8 | 8.0 |
| 7 | Systems — dna, evolution, tween, tanhi, telemetry | 5 | 5.0 |
| 8 | Model / IO — tokenizer, entity, transformer, sampling, hf | 8 | 8.0 |
| 9 | Apps — Octo model shell | 3 | 1.5 |
| 10 | Stubs — seed, serialization, hardware, memory… | 3 | 1.5 |
| 11 | Accel — NPU / Metal / QNN plugins | 2 | 0.0 |
| 12 | Peak fused / no host ALU | 14 | 0.0 |
| Total → v1.0 | 100 | 76.0 |
| Area | Status |
|---|---|
| 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) | ⬜ |