Practical overview
When it fits
Use Framework when you want a TypeScript API for model experiments or educational work involving tensors, autograd and neural-network training, with a documented Rust backend option for CPU, CUDA or WebGPU.
Who it is for
- TypeScript developers building or experimenting with machine-learning models.
- Learners exploring automatic differentiation and how ML frameworks work internally.
- Developers interested in CPU or GPU-backed tensor and neural-network operations.
Documented uses
- Create tensors and perform arithmetic, matrix operations, convolutions, pooling and reductions.
- Define neural-network layers, compute losses, backpropagate gradients and update parameters.
- Build experiments using the CPU backend or a selected CUDA or WebGPU backend.
Requirements & limits
The repository specifies an MIT license. The README documents npm installation; source builds require Rust, and CUDA builds additionally require the CUDA toolkit.
- The API is TypeScript, while native operations are backed by Rust through an N-API bridge.
- CPU is the default backend; CUDA and WebGPU require selecting corresponding build feature flags, which are mutually exclusive at compile time.
- The documented API includes SGD and Adam optimizers, with AdamW and learning-rate scheduling also listed.
- The repository describes the project as built to understand ML frameworks and models internally.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Install Framework and prepare a CPU native build
Install the npm package and build the native CPU backend from source.
Before you start
- Node.js package tooling capable of running npm commands.
- Rust, when building the native code from source.
Steps
Install the package with the command below.
npm install @mni-ml/frameworkFor a source build, run the command below for the default CPU backend.
npm run build:nativeRun the command below to build the TypeScript layer.
npm run build
Expected outcome
The documented package installation and CPU/TypeScript build steps are complete.
Guide limitations
- The source-build instructions are intended for contributors or custom builds.
- This setup recipe does not cover running a model or verifying a successful build.
Build a small neural-network training flow
Use the documented API stages to define a two-layer model, calculate loss, backpropagate and update parameters.
Before you start
- The
@mni-ml/frameworkpackage installed in a TypeScript project. - Input tensors and target labels shaped for the model.
Steps
Create input data with
Tensorand define layers withLinear.Pass the input through the layers and calculate a loss with
crossEntropyLoss.Call
loss.backward()to run the backward pass.Collect layer parameters, create an
Adamoptimizer, then callstep()andzeroGrad().
Expected outcome
The documented code flow computes a loss, propagates gradients and applies an optimizer update.
Guide limitations
- The example uses placeholder target labels and does not provide a dataset or a complete training loop.
- The recipe follows the README's example; it does not represent an execution test.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 13 October 2026
- Original website title
- mni-ml/framework · Official homepage title · retained in its source language

