mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-09 11:24:53 +00:00
better makefiles
This commit is contained in:
parent
4d8972fc9a
commit
b5fec41033
@ -1,25 +1,16 @@
|
||||
flash_att_commit := d478eeec8f16c7939c54e4617dbd36f59b8eeed7
|
||||
|
||||
flash-attention:
|
||||
# Install specific version of flash attention
|
||||
# Clone flash attention
|
||||
pip install packaging
|
||||
git clone https://github.com/HazyResearch/flash-attention.git
|
||||
cd flash-attention && git checkout $(flash_att_commit)
|
||||
|
||||
flash-attention/build: flash-attention
|
||||
cd flash-attention && git checkout $(flash_att_commit)
|
||||
build-flash-attention:
|
||||
cd flash-attention && git fetch && git checkout $(flash_att_commit)
|
||||
cd flash-attention && python setup.py build
|
||||
|
||||
flash-attention/csrc/layer_norm/build: flash-attention
|
||||
cd flash-attention && git checkout $(flash_att_commit)
|
||||
cd flash-attention/csrc/rotary && python setup.py build
|
||||
cd flash-attention/csrc/layer_norm && python setup.py build
|
||||
|
||||
flash-attention/csrc/rotary/build: flash-attention
|
||||
cd flash-attention && git checkout $(flash_att_commit)
|
||||
cd flash-attention/csrc/rotary && python setup.py build
|
||||
|
||||
build-flash-attention: flash-attention/build flash-attention/csrc/layer_norm/build flash-attention/csrc/rotary/build
|
||||
|
||||
install-flash-attention: build-flash-attention
|
||||
install-flash-attention: flash-attention build-flash-attention
|
||||
pip uninstall flash_attn rotary_emb dropout_layer_norm -y || true
|
||||
cd flash-attention && python setup.py install && cd csrc/layer_norm && python setup.py install && cd ../rotary && python setup.py install
|
@ -1,17 +1,13 @@
|
||||
transformers_commit := b8d969ff47c6a9d40538a6ea33df021953363afc
|
||||
|
||||
transformers:
|
||||
# Install specific version of transformers with custom cuda kernels
|
||||
# Clone fork of transformers with custom CUDA kernels and sharding logic
|
||||
pip install --upgrade setuptools
|
||||
git clone https://github.com/OlivierDehaene/transformers.git
|
||||
cd transformers && git checkout $(transformers_commit)
|
||||
|
||||
transformers/build: transformers
|
||||
cd transformers && git checkout $(transformers_commit)
|
||||
cd transformers && python setup.py build
|
||||
build-transformers:
|
||||
cd transformers && git fetch && git checkout $(transformers_commit) && python setup.py build
|
||||
|
||||
build-transformers: transformers/build
|
||||
|
||||
install-transformers: build-transformers
|
||||
install-transformers: transformers build-transformers
|
||||
pip uninstall transformers -y || true
|
||||
cd transformers && python setup.py install
|
Loading…
Reference in New Issue
Block a user