A high-performance Deep Learning framework with a Rust core, native to the Node.js ecosystem.
Forge your own neural networks — no Python, no C/C++ toolchain, no heavyweight runtime.
English · Español
Intellivium (formerly NeuroForge) is a deep learning framework whose numerical core is written entirely in Rust and exposed to JavaScript/TypeScript through N-API. The goal is the power of a native ML engine with the ergonomics of the npm ecosystem: npm install, import, and train — with precompiled binaries per platform and no C/C++ source, no Python, and no embedded VM.
It draws inspiration from PyTorch, TensorFlow and Flux.jl, but makes a deliberate engineering choice: one native language (Rust) for the engine, TypeScript for the public API, and Zig reserved strictly for future hot kernels.
Why not Julia / C++? Julia can be embedded, but it drags its full runtime (VM + LLVM + stdlib, hundreds of MB) plus JIT warm-up — impractical to ship over npm. C++ is unnecessary: Rust delivers the same low-level control and SIMD without the toolchain pain. See Architecture.
| 🦀 Rust core | Memory-safe, fast, with a tape-based reverse-mode autograd engine built from scratch. |
| 📦 Node-native | Ships as prebuilt N-API binaries: npm install and go — no compiler required by users. |
| 🧩 Modular | Clean separation: engine (neuroforge-core) ↔ bindings (neuroforge-napi) ↔ API (ts/). |
| 🪶 Zero heavyweight deps | No Python interpreter, no Julia runtime, no libtorch. The whole engine is one native addon. |
| 🔓 TypeScript-first API | Fully typed, ergonomic surface that reads like modern JS. |
| ⚙️ Zig-ready | Architecture leaves a clean hook for Zig SIMD kernels when profiling demands it. |
v0.11.0 · on npm. The engine is tested and trains real models. It's still pre-1.0, so the API may evolve — and the grand vision further down is a roadmap, not a current claim.
Available today ✅
- Reverse-mode automatic differentiation (Wengert tape, no
Rc<RefCell>). - Ops:
matmul, broadcasted biasadd,relu,sigmoid,tanh,MSE. -
Denselayers with He init, sequentialModel, SGD & Adam optimizers, MSE / BCE / categorical cross-entropy losses, softmax for multi-class output, extra activations (LeakyReLU / ELU / GELU) and MAE / Huber losses, tensor ops & views (add/sub/mul, matmul, reductions, one-hot, reshape/transpose/slice), plus Dropout, LayerNorm, BatchNorm and Embedding layers, mini-batch training withDataset/DataLoader, validation + early stopping + checkpoints, customDataset, weight export/import, gradient clipping, LR decay, and modelsave/load. - N-API bindings + typed TypeScript API.
- Validated end-to-end on the XOR problem (non-linear): loss 0.247 → 0.0002.
npm install intelliviumimport { tensor, dense, Model } from "intellivium";
// XOR — the classic non-linear sanity check
const X = tensor([[0, 0], [0, 1], [1, 0], [1, 1]]);
const y = tensor([[0], [1], [1], [0]]);
const model = new Model([
dense(2, 8, "tanh"),
dense(8, 1, "sigmoid"),
]);
const history = await model.train(X, y, {
epochs: 1500,
lr: 0.05,
optimizer: "adam",
loss: "bce",
});
console.log("final loss:", history.at(-1));
const pred = model.predict(X);
console.log(pred.toArray()); // ≈ [[0], [1], [1], [0]]The autograd graph lives entirely in Rust. Only flat tensors (Float64Array + shape) and high-level operations cross the FFI boundary — the graph is never marshalled per-op.
flowchart TD
subgraph JS["TypeScript / JavaScript"]
A["Public API<br/>tensor · dense · Model"]
end
subgraph NAPI["neuroforge-napi (cdylib)"]
B["N-API bridge<br/>flat tensors in / out"]
end
subgraph CORE["neuroforge-core (pure Rust)"]
C["Autograd tape<br/>matmul · add · relu · sigmoid · tanh · mse"]
D["nn: Dense · Model · SGD/Adam"]
E["(future) Zig SIMD kernels"]
end
A -->|Float64Array + shape| B
B --> C
D --> C
C -.->|hot path| E
Layout
Intellivium/
├── crates/
│ ├── neuroforge-core/ # pure-Rust engine: autograd + nn ← works today
│ │ ├── src/tape.rs # reverse-mode AD (the heart)
│ │ ├── src/nn.rs # Dense, Model, train/predict
│ │ └── examples/xor.rs # `cargo run` proof
│ └── neuroforge-napi/ # N-API bindings → .node
├── src/ # public TypeScript API
└── examples/ # xor.mjs (Node)
Requirements: Rust (rustup), Node.js 18+, and @napi-rs/cli (already a dev dependency).
# 1. test the Rust engine alone (no Node needed)
cargo run --release -p neuroforge-core --example xor
# 2. build everything (native .node + TypeScript)
npm install
npm run build
# 3. run the Node example
npm testThe engine is the foundation. Everything below is the long-term plan, phase by phase — honest about what already ships versus what's still ahead.
Legend: ✅ Complete · 🟡 Partial · 🔴 Planned
A stable, reliable engine.
Tensors
- Data types (dtype system — currently f32 only)
- Broadcasting
- Basic operations
- MatMul
- Shape checking
- Tensor views
Autograd
- Reverse mode
- Wengert tape
- Gradients
- Computation graph
- Automatic graph release
Neural networks
- Dense
- Sequential
- He initialization
- ReLU
- Sigmoid
- Tanh
- Softmax
- LeakyReLU
- ELU
- GELU
Loss functions
- MSE
- BCE
- Cross-Entropy (categorical)
- MAE (L1)
- Huber
Optimizers
- SGD
- Adam
API
- TypeScript
- N-API
- npm
Make training a model comfortable.
Dataset
- Dataset
- TensorDataset
- Custom Dataset
DataLoader
- Mini-batch
- Shuffle
- Batch iterator
Training loop
- Validation
- Early stopping
- Checkpoints
- Gradient clipping
- Learning-rate scheduler
Serialization
- save()
- load()
- exportWeights()
- importWeights()
More building blocks.
Layers
- Dropout
- BatchNorm
- LayerNorm
- Embedding
- Flatten
- Reshape
CNN
- Conv1D
- Conv2D
- Conv3D
Pooling
- MaxPool
- AvgPool
- Global pool
Recurrent
- RNN
- LSTM
- GRU
Before adding modern AI.
SIMD
- Zig SIMD
- Optimized MatMul
- Optimized Conv
Memory
- Arena allocator
- Buffer pool
- Zero copy
- Tensor pool
Parallelism
- Rayon
- Multi-thread
Benchmark
- Benchmarks
- Profiler
Where Transformers finally appear.
Attention
- Self-attention
- Multi-head attention
- Positional encoding
- Rotary embeddings
Transformers
- Encoder
- Decoder
- GPT
- BERT
Vision
- Vision Transformer
- ConvNeXt
- Autoencoder
- VAE
- GAN
- Diffusion
- Replay buffer
- DQN
- PPO
- SAC
- Actor-Critic
Scientific computing.
Linear algebra
- LU
- QR
- SVD
- Eigen
Numerical
- Optimization
- ODE
- Root finding
Statistics
- Monte Carlo
- Distributions
Data
- Lazy loading
- Streaming
- Hot cache
- Dataset cache
Formats
- Parquet
- Arrow
- CSV
- JSON
Engine
- Memory mapping
- Prefetch
- Columnar storage
GPU
- CUDA
- ROCm
- Metal
- Vulkan
Mixed precision
- FP16
- BF16
Quantization
- INT8
- INT4
- Inference engine
- Batch inference
- ONNX
- Serving
- HTTP
- gRPC
Tooling, not AI.
Visualization
- Dashboard
- Tensor inspector
- Training graphs
Extensions
- Plugins
- Custom layers
- Custom optimizers
Model Hub
- Models
- Datasets
The most ambitious vision.
Distributed
- Multi-GPU
- Multi-node
Compiler
- Graph optimizer
- Kernel fusion
AutoML
- NAS
- Hyperparameter search
Issues, ideas and pull requests are welcome. For substantial changes, open an issue first to discuss direction. Please keep the engine (neuroforge-core) free of binding/runtime concerns — that separation is intentional.
Apache License 2.0. You may use, modify, and distribute this software under the terms of the Apache 2.0 license, including a patent grant. Copyright © 2026 Brashkie.
⭐ If Intellivium is useful to you, consider starring the repo.
Built by Brashkie