ruv-fann

repository·main·Indexed 18 days ago

https://github.com/ruvnet/ruv-fann

A pure Rust implementation of the Fast Artificial Neural Network (FANN) library. Version 0.2.1 provides a neural intelligence framework featuring a Rust-based neural network core, advanced forecasting models, and a swarm intelligence orchestration layer.

Tokens
840.9K
Snippets
2.2K
Records
2.9K
Agent score
62%

What's inside ruv-fann

  1. Overview of the ruv-swarm WASM Implementation Plan

    main

    The WASM implementation plan aims to transform ruv-swarm from a JavaScript-based system into a high-performance WebAssembly-powered orchestration system. This transition integrates the full Rust capabilities of the ruv-FANN ecosystem into the npx package.

    Key capabilities being exposed via WASM include:

    • ruv-FANN: Neural network library with 18 activation functions and 5 training algorithms (Backprop, RPROP, Quickprop, SARPROP, Cascade).
    • neuro-divergent: 27+ neural forecasting models for time series processing.
    • ruv-swarm-core: Advanced swarm orchestration, cognitive patterns, and multi-topology support.
    • Persistence: Optimized SQLite with WASM support for cross-session learning.
  2. Overview of Neuro-Divergent models

    main

    Neuro-Divergent provides a collection of neural forecasting models compatible with NeuralForecast Python models, implemented in Rust for performance and safety. Models are organized into several categories:

    • Basic Models: Linear and simple models like DLinear, NLinear, and MLP (univariate and multivariate).
    • Recurrent Models: RNN-based architectures including RNN, LSTM, GRU, and BiLSTM.
    • Advanced Models: Complex architectures like NBEATS, N-BEATS-X, N-HiTS, and TSMixer.
    • Transformer Models: Attention-based models such as Transformer, Informer, Autoformer, and TFT.
    • Specialized Models: Domain-specific models like DeepAR (probabilistic), DeepNPTS, TCN, and BiTCN.
  3. Overview of the ruv-swarm ML Optimizer Training Pipeline

    main

    The ML optimizer training pipeline for ruv-swarm is a continuous improvement loop designed to support diverse agent types with specialized neural architectures. The pipeline follows a structured flow from data preparation to swarm integration, enabling efficient resource usage and incremental learning.

    The training lifecycle follows these stages:

    1. Dataset Preparation: Gathering and processing raw data.
    2. Model Initialization: Setting up the neural architecture.
    3. Training Loop: The core iterative learning process.
    4. Validation & Evaluation: Testing model performance.
    5. Hyperparameter Optimization: Tuning parameters for better results.
    6. Model Checkpointing: Saving progress to prevent data loss.
    7. Performance Analysis: Evaluating the impact of training.
    8. Deployment & Integration: Moving the model into the swarm and enabling incremental learning.
  4. What is CUDA-WASM?

    main
    CUDA-WASM is a universal transpilation system that converts NVIDIA CUDA code into portable GPU workloads. It allows CUDA code to run on diverse hardware including AMD GPUs (via ROCm/HIP), WebGPU-compatible devices, Web Browsers (via WASM), ARM devices (via NEON/SVE), and provides a CPU fallback for environments without a GPU.
  5. Overview of ruv-cuda-wasm for hardware abstraction

    main

    What is ruv-cuda-wasm?

    ruv-cuda-wasm is a transpiler designed to eliminate hardware lock-in for AI and GPU workloads. It converts existing CUDA code into WebAssembly (WASM) and WebGPU.

    Key Capabilities

    • Zero-Rewrite Modernization: Existing CUDA kernels can be run without changing a single line of code.
    • Cross-Platform Execution: Transpiled code runs on NVIDIA, AMD (ROCm), Intel GPUs, and CPUs (x86_64, ARM64/NEON).
    • Sandboxed Workloads: By using WASM, GPU workloads are executed within a memory-safe, isolated environment, providing a more secure alternative to traditional GPU passthrough.
    • High Fidelity: Provides 95%+ coverage of core CUDA operations and achieves near-native CPU performance via SIMD acceleration (AVX2/NEON).
  6. Overview of ML Optimizer features

    main

    The ML Optimizer is designed for training, optimizing, and comparing ML-based coding swarms. Key capabilities include:

    • Claude Code CLI Integration: Real-time analysis via stream-json parsing of thinking and tool-use events.
    • SWE-Bench Integration: Benchmarking against real-world coding challenges (Easy, Medium, Hard) with automatic patch evaluation.
    • Neuro-Divergent Models: Access to 27+ neural forecasting models utilizing cognitive pattern matching (Convergent, Divergent, Lateral, Systems).
    • Performance Metrics: Tracking of task completion time, token usage efficiency, code quality scores, and swarm coordination metrics.
  7. Overview of ruv-swarm-core

    main
    ruv-swarm-core is a high-performance, async-first Rust crate designed for orchestrating distributed AI agent swarms. It supports multiple topologies including Mesh, Star, Pipeline, and Hierarchical structures. It is designed for high concurrency, capable of handling thousands of tasks, and includes built-in monitoring, health checks, and robust error handling with retry mechanisms.
  8. What is Neuro-Divergent?

    main
    Neuro-Divergent is a high-performance neural forecasting library written in Rust. It is designed to be a drop-in replacement for Python's NeuralForecast library, providing 100% API compatibility while leveraging Rust's performance, memory safety, and SIMD optimizations. It is built on the ruv-FANN neural network foundation.
  9. Overview of Basic Forecasting Models

    main

    The neuro-divergent library provides several basic models for neural forecasting, ranging from low to medium complexity. Choose a model based on your data's characteristics:

    ModelStrengthsBest ForComplexity
    MLPUniversal approximator, fastNon-linear patterns, baselinesLow
    DLinearExcellent for trends, interpretableTrended data, simple seasonalityVery Low
    NLinearMinimal parameters, very fastStationary data, real-timeVery Low
    MLPMultivariateHandles multiple variablesCross-variable relationshipsLow-Medium
  10. Overview of Neuro-Divergent Models

    main

    The neuro-divergent library provides a Rust implementation of over 27 neural forecasting models, optimized for performance and safety. These models are built on top of ruv-FANN and are designed for high-performance, scalable deployments such as swarm orchestration.

    Key Features:

    • 100% NeuralForecast Compatibility: Full parity with Python implementations.
    • Memory-Efficient: Leverages Rust's ownership model for optimal memory usage.
    • Type-Safe: Generic implementations supporting f32 and f64 precision.
    • GPU-Ready: Supports CUDA acceleration where applicable.