2023-07-04 12:23:55 -06:00
|
|
|
flash_att_commit := 3a9bfd076f98746c73362328958dbc68d145fbec
|
2023-04-09 11:59:16 -06:00
|
|
|
|
2024-06-04 11:38:46 -06:00
|
|
|
build-flash-attention:
|
|
|
|
if [ ! -d 'flash-attention' ]; then \
|
|
|
|
pip install -U packaging ninja --no-cache-dir && \
|
|
|
|
git clone https://github.com/HazyResearch/flash-attention.git && \
|
|
|
|
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; \
|
|
|
|
fi
|
2023-04-14 02:12:21 -06:00
|
|
|
|
|
|
|
install-flash-attention: build-flash-attention
|
2024-06-04 11:38:46 -06:00
|
|
|
if [ ! -d 'flash-attention' ]; then \
|
|
|
|
cd flash-attntion && python setup.py install && cd csrc/layer_norm && python setup.py install && cd ../rotary && python setup.py install; \
|
|
|
|
fi
|