Skip to content

Instantly share code, notes, and snippets.

View DJEddyking's full-sized avatar

murphys new law DJEddyking

  • UESTC
  • chengdu
  • 22:30 (UTC +08:00)
View GitHub Profile
@xiabingquan
xiabingquan / flash_attention_in_numpy.py
Last active November 11, 2025 08:57
An toy example of flash attention implemented in Numpy.
# A minimal exmaple of flash attention implemented in Numpy
# Contact: bingquanxia AT qq.com
import unittest
from typing import List
import numpy as np
import torch