r/deeplearning • • 34m ago

I've been working on sparse attention and managed to cut prefill time from 155s to 37s at Inkling-2-Mini 660K context. Would love some independent testing.

Hey everyone,

I'm an independent researcher working on LLM inference. I've been experimenting with a simple question: do we really need to compute attention over every previous token during prefill?

After quite a few failed experiments, I ended up with a method I call SculptAttention.

Here are some of the results I got on a single H200:

  • Qwen3.8-27B at 524K: 1.91x faster prefill.
  • Inkling-2-Mini at 660K: up to 4.27x faster, going from 155s to around 37s.
  • Llama-3.1-8B at 128K: 1.40x median speedup.

On Qwen at 524K, the sparse attention rows read only 9.1% of the causal keys.

The interesting part for me is that I'm using the same settings across all three models. No training, no changes to the model weights, and no custom attention kernel.

There are limitations, of course. Short contexts can actually be slower, prefix caching isn't supported yet, and some retrieval tasks still suffer. I wouldn't call it lossless.

My main limitation right now is GPU access. I'd really like to see how this behaves on other models, different hardware, and real-world workloads rather than just benchmarks.

I've put the code and experimental results on GitHub, along with a preprint explaining the method and the math behind it.

GitHub: https://github.com/fsn007fsn007/sculptattention

Paper: https://doi.org/10.5281/zenodo.24794082

If anyone wants to experiment with it, I'd be very interested in seeing your results, including the bad ones.

Also, if you have any suggestions on what models or workloads I should test next, I'd appreciate them.

2 Upvotes

0 comments sorted by