import torch; assert torch.cuda.get_device_capability()[0] >= 8, 'Hardware not supported for Flash Attention' # install flash-attn !pip install ninja packaging !MAX_JOBS=4 pip install flash-attn --no-build-isolation