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.4.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, mini-batch training, 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
Loss functions
- MSE
- BCE
- Cross-Entropy (categorical)
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