dsalt (Dynamic Sparse Attention with Landmark Tokens) is a high-performance Triton-based implementation of sparse attention for transformers. Version 0.4.34 supports PyTorch and provides fused kernels for landmark token selection and sparse attention computation, targeting long-context LLM inference and training. Released monthly.
pip install dsaltNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initialize the sparse attention module with model dimensions and run a forward pass.
Update import to `from dsalt import DynamicSparseAttention`.
Ensure a compatible NVIDIA GPU and install Triton via `pip install triton`.
Ensure `landmark_ratio` < 1.0, e.g., 0.1.
Replace `num_landmarks=64` with `landmark_ratio=64/seq_len`.