Flash Attention in PyTorch
Mediumauto-graded
Solve it
Check your answer
The grader verifies properties of your implementation, so a correct solution written differently from ours still passes.
pip install torchleet
from torchleet import check
check("flash-attention", flash_attention_pytorch)