flashinfer-ai / flashinfer

FlashInfer: Kernel Library for LLM Serving
https://flashinfer.ai
Apache License 2.0
1.1k stars 98 forks source link

feat:support any num_heads for get_alibi_slope #200

Closed yz-tang closed 4 months ago

yz-tang commented 4 months ago

When I was using flashinfer, I encountered that the heads of some models were not powers of 2. I refer to flashinfer/python/tests/alibi_reference.py, modifies this part of the C++ code.