This is the repository card of kernels-community/sage-attention that has been pushed on the Hub. It was built to be used with the kernels library. This card was automatically generated.

How to use

# make sure `kernels` is installed: `pip install -U kernels`
from kernels import get_kernel

kernel_module = get_kernel("kernels-community/sage-attention", version=3)
per_block_int8 = kernel_module.per_block_int8

per_block_int8(...)

Available functions

  • per_block_int8
  • per_channel_fp8
  • per_warp_int8
  • sageattn
  • sageattn_qk_int8_pv_fp16_cuda
  • sageattn_qk_int8_pv_fp16_triton
  • sageattn_qk_int8_pv_fp8_cuda
  • sageattn_qk_int8_pv_fp8_cuda_sm90
  • sageattn_varlen
  • sub_mean

Benchmarks

Benchmarking script is available for this kernel. Run kernels benchmark kernels-community/sage-attention --version 3.

Source code

Source code of this kernel originally comes from https://github.com/thu-ml/SageAttention.git and it was repurposed for compatibility with kernels.

Downloads last month
-
apache-2.0