Skip to content

abcbdf/basis-decomposition-official

Repository files navigation

Basis Decomposition

Official code for Accelerating Attention with Basis Decomposition (https://arxiv.org/abs/2510.01718).

Installation

Ensure you have the necessary dependencies installed:

pip install -r requirements.txt

Download DeepSeek-V2-Lite model (https://huggingface.co/deepseek-ai/DeepSeek-V2-Lite) .

Usage

Accuracy

Run BD Attention in deepseek

python bd_end_to_end_error_deepseek.py --model <path_to_model> --mode qkvo

Efficiency

Relative speedup for the $k_proj$ operator under FP16:

python bd_attention_linear_kernel.py

result_image/MHAvsBDA-fp16.png

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages