LOOM AI Framework

Deterministic, CPU-first neural runtime with WebGPU acceleration. One JSON model format across Go, TypeScript/JavaScript, Python, C#, C-ABI, and WASM. Identical outputs across every platform.

Open source at github.com/openfluke/loom · npm: @openfluke/welvet · PyPI: welvet · NuGet: Welvet.

CPU + WebGPU Bit-for-bit parity Open source
TypeScript / Node npm install @openfluke/welvet
Python pip install welvet
Go / C-ABI go get github.com/openfluke/loom
What makes LOOM different
Key points from the LOOM capability report: deterministic, cross-language, CPU-first.
Deterministic everywhere

Bit-for-bit parity across Go, Python, TypeScript/JS, C#, C, and WASM. CPU-first with optional WebGPU.

Unified API surface

Same function names across languages: create, forward, train, save/load, evaluate. One JSON model format.

Layer coverage

Dense, Conv2D, Multi-Head Attention, RNN/LSTM, LayerNorm, Residual, RMSNorm, SwiGLU, Softmax (10 variants, MoE).

Stepping API

Fine-grained forward/backward with manual gradient application for online/real-time learning.

Quick start examples
From the LOOM docs and packages.
TypeScript
import { createNetworkFromJSON, forward } from "@openfluke/welvet";

const model = {
  layers: [
    { type: "dense", width: 4, height: 8, activation: "relu" },
    { type: "dense", width: 8, height: 2, activation: "softmax" },
  ],
};

const net = createNetworkFromJSON(model);
const output = forward(net, [[0.1, 0.2, 0.3, 0.4]]);
console.log("output", output);
Python
from welvet import create_network_from_json, forward

config = {
    "layers": [
        {"type": "dense", "width": 4, "height": 8, "activation": "relu"},
        {"type": "dense", "width": 8, "height": 2, "activation": "softmax"},
    ]
}

net = create_network_from_json(config)
print(forward(net, [[0.1, 0.5, 0.3, 0.7]]))
Go
package main

import (
  "fmt"
  "github.com/openfluke/loom"
)

func main() {
  layers := []loom.LayerConfig{
    {Type: "dense", Width: 4, Height: 8, Activation: "relu"},
    {Type: "dense", Width: 8, Height: 2, Activation: "softmax"},
  }
  net, _ := loom.BuildNetworkFromJSON(layers)
  out := loom.ForwardCPU(net, [][]float32{ {0.1, 0.2, 0.3, 0.4} })
  fmt.Println(out)
}
Stepping API (fine-grained control)
Python
from welvet import create_network_from_json, StepState, apply_gradients

net = create_network_from_json({"layers": [{"type": "dense", "width": 4, "height": 2}]})
state = StepState(input_size=4)

for _ in range(100):
    state.set_input([0.1, 0.2, 0.3, 0.4])
    state.step_forward()
    grads = [o - t for o, t in zip(state.get_output(), [0, 1])]
    state.step_backward(grads)
    apply_gradients(net, lr=0.01)
TypeScript
import { createStepState, train } from "@openfluke/welvet";

const state = createStepState(4);
for (let i = 0; i < 100; i++) {
  state.setInput([0.1, 0.2, 0.3, 0.4]);
  state.stepForward();
  const out = state.getOutput();
  state.stepBackward(out.map((v, idx) => v - (idx === 1 ? 1 : 0)));
  train(state, { lr: 0.01 });
}