mirror of
https://github.com/ruvnet/RuVector.git
synced 2026-05-23 21:25:02 +00:00
Implement complete SONA system with: - LoRA-Ultra: Adaptive low-rank adaptation for efficient fine-tuning - Learning Loops: Instant, background, and coordinated learning modes - EWC++: Enhanced elastic weight consolidation for continual learning - ReasoningBank: Trajectory storage with verdict-based learning - WASM bindings for browser deployment - N-API bindings for Node.js integration - Comprehensive documentation and benchmarks New crate: crates/sona with full implementation Integration: examples/ruvLLM with SONA module NPM package: npm/packages/sona for JavaScript bindings 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| index.html | ||
| package.json | ||
| README.md | ||
SONA WASM Example
Interactive browser demo of the Self-Optimizing Neural Architecture (SONA).
Quick Start
- Build the WASM module (if not already built):
cd ..
wasm-pack build --target web --features wasm
cp -r pkg wasm-example/
- Serve the example:
cd wasm-example
python3 -m http.server 8080
- Open in browser:
http://localhost:8080
Features
- Real-time Learning: Record trajectories and see instant updates
- LoRA Visualization: Watch transformation in real-time
- Statistics Dashboard: Monitor patterns, quality, and performance
- Interactive Controls: Adjust configuration and run experiments
Files
index.html- Demo page with UIindex.js- JavaScript logic using WASM bindingspackage.json- NPM configurationpkg/- Generated WASM packagesona.js- JavaScript bindingssona_bg.wasm- WebAssembly binarysona.d.ts- TypeScript definitions
Usage Example
import init, { WasmSonaEngine } from './pkg/sona.js';
async function main() {
await init();
const engine = new WasmSonaEngine(256);
const trajectoryId = engine.start_trajectory(new Float32Array(256).fill(0.1));
engine.record_step(trajectoryId, 42, 0.8, 1000);
engine.end_trajectory(trajectoryId, 0.85);
const output = engine.apply_lora(new Float32Array(256).fill(1.0));
console.log('Transformed output:', output);
}
main();
Performance
- WASM file size: ~1.5MB (release build)
- Initialization: < 100ms
- Per-trajectory overhead: < 1ms
- LoRA application: < 0.1ms (256-dim)
Browser Support
- Chrome/Edge 91+
- Firefox 89+
- Safari 14.1+
License
MIT OR Apache-2.0