HazyResearch / hyena-dna

Official implementation for HyenaDNA, a long-range genomic foundation model built with Hyena
https://arxiv.org/abs/2306.15794
Apache License 2.0
574 stars 82 forks source link

flash-attention installment #7

Closed rohandavidg closed 1 year ago

rohandavidg commented 1 year ago

Hi All,

Thank you for building this tool, we are excited to try. I'm having an issue with flash-attention installment

i have torch installed, although with the pip install -e ., i'm getting a module error.

cd flash-attention/ git submodule update --init pip install -e .

Looking in indexes: https://pypi.org/simple, https://pypi.ngc.nvidia.com Obtaining file:///home/rohan/rohan/hyena-dna/flash-attention Installing build dependencies ... done Checking if build backend supports build_editable ... done Getting requirements to build editable ... error ERROR: Command errored out with exit status 1: command: /home/rohan/anaconda3/bin/python /home/rohan/anaconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_editable /tmp/tmpdk8hywoz cwd: /home/rohan/rohan/hyena-dna/flash-attention Complete output (17 lines): Traceback (most recent call last): File "/home/rohan/anaconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in main() File "/home/rohan/anaconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/home/rohan/anaconda3/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 144, in get_requires_for_build_editable return hook(config_settings) File "/tmp/pip-build-env-n_q31tvm/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 450, in get_requires_for_build_editable return self.get_requires_for_build_wheel(config_settings) File "/tmp/pip-build-env-n_q31tvm/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) File "/tmp/pip-build-env-n_q31tvm/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-n_q31tvm/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 338, in run_setup exec(code, locals()) File "", line 13, in ModuleNotFoundError: No module named 'torch'

exnx commented 1 year ago

Some folks had better luck with this flag, let me know if that works.

cd hyena-dna/flash-attention
pip install . --no-build-isolation

# optional fused layer_norm
cd csrc/layer_norm && pip install . --no-build-isolation  
rohandavidg commented 1 year ago

sweet, thank you! that worked.

exnx commented 1 year ago

amazing!