2025-02-14 10:31:59 +00:00
|
|
|
flash_att_commit := ceee0de88c037ee6eda5e75c813a8648e4bcb1c9
|
2023-04-09 17:59:16 +00:00
|
|
|
|
2024-06-04 17:38:46 +00:00
|
|
|
build-flash-attention:
|
|
|
|
if [ ! -d 'flash-attention' ]; then \
|
|
|
|
pip install -U packaging ninja --no-cache-dir && \
|
2025-02-14 10:31:59 +00:00
|
|
|
git clone https://github.com/Narsil/flash-attention.git; \
|
2024-06-04 17:38:46 +00:00
|
|
|
fi
|
2024-06-04 21:34:03 +00:00
|
|
|
cd flash-attention && git fetch && git checkout $(flash_att_commit) && \
|
|
|
|
MAX_JOBS=8 python setup.py build && cd csrc/layer_norm && python setup.py build && cd ../rotary && python setup.py build
|
2023-04-14 08:12:21 +00:00
|
|
|
|
|
|
|
install-flash-attention: build-flash-attention
|
2024-06-04 21:34:03 +00:00
|
|
|
cd flash-attention && git checkout $(flash_att_commit) && MAX_JOBS=8 python setup.py install && cd csrc/layer_norm && python setup.py install && cd ../rotary && python setup.py install
|