1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
//! MicroLoRA WASM - Ultra-fast Low-Rank Adaptation for Edge AI
//!
//! This crate provides rank-2 LoRA (Low-Rank Adaptation) matrices optimized for
//! WASM execution with <100us adaptation latency. Designed for real-time
//! per-operator-type learning in query optimization systems.
//!
//! ## Key Features
//!
//! - **Rank-2 LoRA**: Minimal parameter count (2d parameters per adapter)
//! - **Per-Operator Scoping**: Separate adapters for different operator types
//! - **<100us Adaptation**: Instant weight updates for real-time learning
//! - **WASM-Optimized**: no_std compatible, minimal allocations
//!
//! ## Architecture
//!
//! ```text
//! Input Embedding (d-dim)
//! |
//! v
//! +---------+
//! | A: d x 2 | Down projection
//! +---------+
//! |
//! v
//! +---------+
//! | B: 2 x d | Up projection
//! +---------+
//! |
//! v
//! Delta W = alpha * (A @ B)
//! |
//! v
//! Output = Input + Delta W
//! ```
pub use ;
pub use ;
pub use ;
// Re-export core types for JS
pub use *;
pub use *;