



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.
Wird geladen......
Auf dieser Seite
@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.
Entdecke weitere Einträge, die hierzu passen