mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-11-18 23:15:59 +00:00
* feat: support max_image_fetch_size to limit * fix: update model path for test * fix: adjust model repo id for test again * fix: apply clippy lints * fix: clippy fix * fix: avoid torch build isolation in docker * fix: bump repo id in flash llama tests * fix: temporarily avoid problematic repos in tests
22 lines
945 B
Plaintext
22 lines
945 B
Plaintext
flash_att_v2_commit_cuda := v2.6.1
|
|
flash_att_v2_commit_rocm := 47bd46e0204a95762ae48712fd1a3978827c77fd
|
|
|
|
build-flash-attention-v2-cuda:
|
|
pip install -U packaging wheel
|
|
pip install --no-build-isolation flash-attn==$(flash_att_v2_commit_cuda)
|
|
|
|
install-flash-attention-v2-cuda: build-flash-attention-v2-cuda
|
|
echo "Flash v2 installed"
|
|
|
|
build-flash-attention-v2-rocm:
|
|
if [ ! -d 'flash-attention-v2' ]; then \
|
|
pip install -U packaging ninja --no-cache-dir && \
|
|
git clone https://github.com/mht-sharma/flash-attention.git flash-attention-v2 && \
|
|
cd flash-attention-v2 && git fetch && git checkout $(flash_att_v2_commit_rocm) && \
|
|
git submodule update --init --recursive && GPU_ARCHS="gfx90a;gfx942" PYTORCH_ROCM_ARCH="gfx90a;gfx942" python setup.py build; \
|
|
fi
|
|
|
|
install-flash-attention-v2-rocm: build-flash-attention-v2-rocm
|
|
cd flash-attention-v2 && \
|
|
GPU_ARCHS="gfx90a;gfx942" PYTORCH_ROCM_ARCH="gfx90a;gfx942" python setup.py install
|