diff --git a/server/Makefile-flash-att b/server/Makefile-flash-att index 24b694ff..918543ab 100644 --- a/server/Makefile-flash-att +++ b/server/Makefile-flash-att @@ -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 \ No newline at end of file diff --git a/server/Makefile-transformers b/server/Makefile-transformers index cb5a6313..0c54a28f 100644 --- a/server/Makefile-transformers +++ b/server/Makefile-transformers @@ -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 \ No newline at end of file