feagi-npu-neural

Crates.iofeagi-npu-neural
lib.rsfeagi-npu-neural
version0.0.1-beta.4
created_at2025-12-23 22:52:34.59051+00
updated_at2026-01-25 21:42:27.019126+00
descriptionPlatform-agnostic neural computation: types, algorithms, and neuron models
homepagehttps://feagi.org
repositoryhttps://github.com/feagi/feagi-core
max_upload_size
id2002500
size82,743
(NeuravilleDeveloper)

documentation

README

feagi-neural

Platform-agnostic neural dynamics algorithms for FEAGI.

Features

  • no_std compatible (ESP32, RTOS, WASM)
  • ✅ Zero allocations (stack-only)
  • ✅ SIMD-friendly batch operations
  • ✅ Pure functions (no side effects)

Modules

  • dynamics - LIF neuron updates, leak, threshold checks
  • firing - Refractory periods, consecutive fire limits
  • utils - PCG random number generation, excitability

Example

use feagi_neural::update_neuron_lif;

let mut potential = 0.5;
let threshold = 1.0;
let leak = 0.1;
let input = 0.6;

let fired = update_neuron_lif(&mut potential, threshold, leak, 0.0, input);
assert!(fired); // 0.5 + 0.6 = 1.1 > 1.0
assert_eq!(potential, 0.0); // Reset after firing

Platform Support

Platform Status Notes
Desktop Full support
ESP32 no_std mode
RTOS FreeRTOS, Zephyr
WASM Browser, Node.js
HPC MPI clusters

Performance

  • Single neuron update: ~50 cycles (208 ns @ 240 MHz)
  • Batch processing: SIMD-optimized
  • Memory: <1 KB stack, 0 heap

License

Apache License 2.0

Commit count: 1710

cargo fmt