TopGit
GitHub Repo Review

ruv-FANN neural network library for local AI

ruvnet/ruv-FANN
RTopGit review image for ruvnet/ruv-FANN
Review by Topgit.dev for ruvnet/ruv-FANN, with GitHub repository stats and README context.
Quick verdict

Use ruv-FANN when you need a small neural network library with explicit weight-edit review rather than an opaque training loop. The Rust, JavaScript, and WebAssembly packages cover training, activation tracing, candidate evaluation, promotion, and rollback, while Safetensors tooling adds checkpoint hashing. Treat it as a focused local-model toolkit, not a general-purpose deep-learning platform. Checked 2026-11-24: MIT, last push 2026-11-23.

Stars
โ˜… 399
Forks
โ‘‚ 109
Contributors
๐Ÿ‘ฅ 8
Language
Rust
License
MIT
Topic
โ€”
Updated
Nov 2026

Training, inspection, and revision control

  • โœ“The Rust core trains generic floating-point feedforward networks with backpropagation, RPROP, Quickprop, Adam, and AdamW. It also provides explicit dense-layer autograd with reusable gradient and optimizer buffers.
  • โœ“The JavaScript neural network package exposes WASM inference and training through explicit subpaths. Package choices include the complete core, a smaller weight-editing install, and focused toolkit packages for smaller dependency footprints.
  • โœ“Weight-space programming separates inspection, proposal, evaluation, and activation. A direct parameter change starts as a candidate, and only an accepted candidate can be promoted to a new model revision.
  • โœ“Activation tracing reports model dimensions, checkpoint fingerprints, and values around layer boundaries. Sensitivity analysis uses central finite differences to diagnose the effect of small weight or bias changes.
  • โœ“Workspace revisions support explicit promotion and rollback. Rollback creates another revision containing selected earlier weights, preserving the sequence of model changes.
  • โœ“Safetensors weight editing streams a private copy of F32, F16, or BF16 checkpoints, verifies the baseline hash, limits replacements, and can restore byte-identical originals from hash-bound receipts.
How this repository's GitHub stars have grown over time. Source: star-history.com.View the star history โ†—

Installing the Rust crate and npm packages

For Rust, add the published crate to your project: sh cargo add ruv-fann For the JavaScript and TypeScript core: sh npm install [email protected] For the smaller weight-editing package: sh npm install [email protected] Install the standalone Rust Safetensors editor with: sh cargo install ruv-fann-wsp-tensor --version 0.1.0 --locked

Running inference and proposing weight edits

Start with the Rust API when the model is small and explicit weights make the expected result easy to verify: rust use ruv_fann::{ActivationFunction, NetworkBuilder}; fn main() -> Result<(), Box<dyn std::error::>> { let mut network = NetworkBuilder::<f32>::new() .input_layer(1) .output_layer_with_activation(1, ActivationFunction::Linear, 1.0) .build()?; network.set_weights(&[0.25, 0.5])?; let output = network.run(&[2.0])?; assert!((output[0] - 1.0).abs() < 1e-6); Ok(()) } For weight-space programming, call `applyWeightPatch` to create a bounded candidate, then pass it to `evaluateWeightPatch` with supplied cases and thresholds. Use `createWeightWorkspace` for proposal, promotion, and rollback. The package intentionally does not call an LLM provider or execute generated code; your application supplies the patch and decides whether to activate it.

Practical local AI integration patterns

  • โ€ขRun compact neural-network inference inside a Rust application, browser build, or Node.js service without sending model inputs to a remote provider.
  • โ€ขInspect a trained checkpoint's activations and test targeted neuron ablations before changing production weights.
  • โ€ขApply bounded weight edits under application-controlled promotion rules, with independent test cases kept outside the search process.
  • โ€ขTrain fixed dense models with autograd, freeze validated parameters, and reuse the prepared snapshot for repeated inference.
  • โ€ขMaintain auditable model revisions where promotion and rollback must be deliberate rather than automatic.

What ruv-FANN handles well

  • โœ“The Rust, JavaScript, and WebAssembly paths share the same conceptual model and let teams keep computation local across native and browser environments.
  • โœ“The revision workflow makes weight changes reviewable instead of treating a successful patch as an automatic improvement.
  • โœ“Activation tracing, finite-difference sensitivity, and independent evaluation give developers concrete diagnostics for small model edits.
  • โœ“Safetensors checkpoint editing includes hash binding, rollback receipts, and a policy that avoids overwriting existing files.
  • โœ“The npm distribution supports smaller installations for focused weight editing instead of forcing every application to install the complete toolkit.

Scope, evidence, and safety limits

  • โ–ณThe README positions ruv-FANN around small neural networks and fixed dense workflows. It is not a broad model zoo, transformer training stack, or general tensor-graph framework.
  • โ–ณThe README explicitly says LSTM and GRU forecasting architectures return unsupported errors; forecasting currently covers a univariate RNN and simple baselines.
  • โ–ณFinite-domain checks, checkpoint hashes, and independent cases do not establish universal safety or generalization. Worker threads are also execution contexts, not security sandboxes.
  • โ–ณThe standalone Safetensors utility runs offline and does not overwrite files that already exist. Its guide states that gains in GPU generation and model quality remain unvalidated.
  • โ–ณThe package family spans separate Cargo workspaces and npm package boundaries. Some satellite packages intentionally retain nested core dependencies, while Agenticow needs Node.js and a supported native binary.
  • โ–ณAgentDB is installed and owned by the application, so persistence is not provided as a self-contained service by ruv-FANN.
View on GitHub โ†—Homepage โ†—

Choosing a different package or workflow

FANN โ€” the native C library that inspired ruv-FANN's Rust core; it fits native feedforward networks but lacks ruv-FANN's JavaScript/WASM packages and revision-oriented weight-edit workflow.TensorFlow.js โ€” a broader browser and JavaScript machine-learning runtime with a larger model ecosystem, but without ruv-FANN's focused checkpoint-hashing and explicit weight-promotion workflow.Candle โ€” a Rust deep-learning framework with broader tensor and training options; choose it when general tensor graphs matter more than ruv-FANN's compact feedforward and weight-editing APIs.ONNX Runtime โ€” a strong option for executing existing ONNX models across runtimes; it does not provide ruv-FANN's built-in training, activation tracing, or weight-revision lifecycle.

Who should choose ruv-FANN

Choose ruv-FANN if you are building a small local model in Rust, JavaScript, TypeScript, or WebAssembly and need inspectable parameters, explicit evaluation gates, or auditable model revisions. Pick another framework for large pretrained models, general tensor graphs, recurrent architectures not listed as supported, or workflows centered on an existing model interchange format.

Frequently asked questions

Is ruv-FANN open source and licensed for commercial use?

ruv-FANN is open source under the MIT License, which permits commercial use, modification, distribution, and private use. The license applies to the repository, while third-party dependencies and separately installed services retain their own terms.

Can I run ruv-FANN in Node.js and web browsers?

ruv-FANN runs in Node.js and compatible browsers through its WebAssembly packages. The standalone weight-editing package uses ESM and requires Node.js 20.9 or newer. Browser deployment still requires application-controlled model loading, evaluation, and promotion.

What is weight-space programming in ruv-FANN?

Weight-space programming in ruv-FANN means proposing a direct change to selected model parameters instead of relying only on a training optimizer. The edited checkpoint remains a proposal until baseline and candidate results pass application-supplied cases and thresholds.

Does ruv-FANN automatically activate a proposed weight edit?

A proposed ruv-FANN weight edit never activates itself. Your application evaluates the candidate, controls promotion, and can retain the previous revision or create a rollback revision containing the selected earlier weights.

Can ruv-fann-wsp-tensor edit existing Safetensors checkpoints?

Yes. ruv-fann-wsp-tensor can process existing F32, F16, and BF16 Safetensors checkpoints, but it streams a private copy and never overwrites the original. Baseline hashes, bounded replacements, and rollback receipts protect the edit workflow.

Does ruv-FANN support LSTM or GRU forecasting?

ruv-FANN does not currently support LSTM or GRU forecasting architectures; those requests return unsupported errors. The repository's forecasting package currently implements a univariate RNN and simple baseline models.

The problem it solves

Small local models often need more than a single inference call: developers may need to trace activations, alter selected parameters, compare a candidate against its baseline, and undo an unsuccessful revision. ruv-FANN fills that gap with an explicit weight-space programming workflow shared by Rust, JavaScript, TypeScript, and WebAssembly.

Related repositories

Source & attribution

Source: [ruvnet/ruv-FANN on GitHub](https://github.com/ruvnet/ruv-FANN), including the repository README and package guides.

GitHub data ยท last synced Nov 24, 2026Reviewed by Henry
โ† Back to TopGit

Curious whether ruv-FANN is right for you?

Let ChatGPT, Claude, or Perplexity look into it โ€” click below and see what AI actually says about ruv-FANN.

GitHub