2023-06-12 10:30:29 -06:00
|
|
|
flash_att_commit := 06ece1a1525ebcf4e183ac76b1e5108d2872f57f
|
2023-04-09 11:59:16 -06:00
|
|
|
|
2023-04-14 02:12:21 -06:00
|
|
|
flash-attention:
|
|
|
|
# Clone flash attention
|
2023-04-09 11:59:16 -06:00
|
|
|
pip install packaging
|
2023-06-12 10:30:29 -06:00
|
|
|
git clone https://github.com/OlivierDehaene/flash-attention.git
|
2023-04-14 02:12:21 -06:00
|
|
|
|
|
|
|
build-flash-attention: flash-attention
|
|
|
|
cd flash-attention && git fetch && git checkout $(flash_att_commit)
|
|
|
|
cd flash-attention && python setup.py build
|
|
|
|
cd flash-attention/csrc/rotary && python setup.py build
|
|
|
|
cd flash-attention/csrc/layer_norm && python setup.py build
|
|
|
|
|
|
|
|
install-flash-attention: build-flash-attention
|
|
|
|
pip uninstall flash_attn rotary_emb dropout_layer_norm -y || true
|
2023-04-09 11:59:16 -06:00
|
|
|
cd flash-attention && python setup.py install && cd csrc/layer_norm && python setup.py install && cd ../rotary && python setup.py install
|