Makefile-flash-att 679 Bytes
Newer Older
1
flash_att_commit := 3a9bfd076f98746c73362328958dbc68d145fbec
2

3
4
5
build-flash-attention:
	if [ ! -d 'flash-attention' ]; then \
		pip install -U packaging ninja  --no-cache-dir && \
6
		git clone https://github.com/HazyResearch/flash-attention.git; \
7
	fi
8
9
	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
10
11

install-flash-attention: build-flash-attention
12
	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