



Library implementing 46 attention mechanisms including dot-product, multi-head, Flash, linear, hyperbolic, graph, and sheaf attention. Supports SIMD optimization, streaming, caching, hard negative mining, and hyperbolic math functions for transformers and GNNs.
加载中......
本页内容
@ruvector/attention
Comprehensive attention for transformers and graphs.
| Mechanism | Complexity | Best For |
|---|---|---|
| DotProductAttention | O(n²) | Basic |
| FlashAttention | O(n²) | Long sequences |
| LinearAttention | O(n·d) | Streaming |
Graph, hyperbolic, sparse variants included.
npm install @ruvector/attention
CLI: npx ruvector attention benchmark
Free and open-source.
探索更多相关项目