Install lrnnx
First, install the library:Basic usage
lrnnx provides two main categories of models:- LTI (Linear Time-Invariant): Models with fixed dynamics (S4, S4D, S5, LRU, Centaurus)
- LTV (Linear Time-Varying): Models with input-dependent dynamics (Mamba, S6, S7, RG-LRU)
LTI model example
LTV model example
Available models
LTI models
- S4 - Structured State Space model with DPLR parameterization
- S4D - Diagonal variant of S4 (simpler, faster)
- S5 - Simplified State Space model
- LRU - Linear Recurrent Unit (minimal diagonal SSM)
- Centaurus - Multi-mode architecture with intra-state mixing
LTV models
- Mamba - Selective State Space model with input-dependent dynamics
- S6 - Time-varying variant of S4 (included in Mamba)
- S7 - All matrices input-dependent (A, B, C, D)
- RG-LRU - Gated LRU from Griffin architecture
- STREAM - Event-based variant (use with
integration_timestepsparameter)
Next steps
Training guide
Learn how to train models for your tasks
Inference guide
Optimize inference with CUDA graphs for 10x speedup
Model overview
Explore all available models in detail
Architectures
Use pre-built architectures for language modeling, U-Net, and classification
