Repository navigation
v0.1.0
v0.1.0 — Initial Public Release
nvSubquadratic implements HyenaND, a global, natively multi-dimensional, O(L log L) sequence operator that acts directly on 1D/2D/3D data through implicitly parametrized, input-dependent convolutional kernels — without rasterizing spatial structure into a 1D scan order. Attention is natively multi-dimensional but quadratic; recurrent models (Mamba, SSMs) are subquadratic but inherently 1D. HyenaND closes both gaps.
Key results
- 339× forward-pass speedup over FlashAttention at 1M-token sequences.
- ImageNet-1K: pure HyenaND matches ViT-5-Small (81.5% vs 81.8% top-1); hybrid (HA)×6 reaches 82.1% — the first native-2D subquadratic operator to match ViT without patch merging or grid rasterization. At patch 4×4, HyenaND uses 51% fewer FLOPs than attention (155 vs 317 GFLOPs).
- Long-context genomics: every striped Hyena configuration significantly outperforms a full transformer (H2: 2.77 vs 2.92 perplexity); validated at context lengths up to 10M tokens on 1B and 40B models.
- PDE modeling on The Well: lowest VRMSE on 6/7 datasets; up to 8.4× improvement over attention at longer sequences.
- 3D medical segmentation (PanTS): hybrid HHAA reaches 0.7559 mean Dice (+0.63 pp over SwinUNETR baseline) with 10.8% less GPU memory.
What's included
- HyenaND operator — 1D/2D/3D, causal and non-causal, SIREN-parametrized implicit kernels, learnable Gaussian masking, FiLM-conditioned input-dependent kernels via register tokens, mixed boundary-condition FFT convolution.
- nSubQ CUDA kernels (via
subquadratic-ops) — fused FFT-convolution path (RFFT + spectral modulation + IRFFT in a single kernel); filter generation 40× faster and 32× lower HBM traffic than vanilla PyTorch; 1D, 2D, and 3D APIs. - ViT-5 backbone, UNet-ConvNeXt backbone, Spatial Recall benchmark, The Well datamodule (all 14 Cartesian datasets, multi-node DALI), portable Slurm launcher, self-hosted GPU CI, Sphinx API docs.
Install
pip install nvsubquadratic
pip install "nvsubquadratic[quack]" # fused RMSNorm (Hopper/Blackwell)
pip install "nvsubquadratic[dali]" # DALI data pipelines