-
Notifications
You must be signed in to change notification settings - Fork 875
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support flash attention flash-attn --no-build-isolation
with uv sync
#6437
Comments
You'll need to use |
Wow amazing that this feature already exists! |
I think to make this work with |
I'm curious about what the recommended best practice is for including torch extensions in the project. Here's my current approach: uv sync # torch is installed here
uv sync --extra build # to keep things tidy: setuptools, wheel, and other stuff missing because of --no-build-isolation
uv sync --extra torchextensions --no-build-isolation # torch extensions installed here Previously, I did this, which is also not ideal: uv sync # torch is installed here
uv pip install setuptools wheel ... # missing because of --no-build-isolation
uv pip install --no-build-isolation some_torch_extension Your recommendation here is also not ideal, because you would need to manually make sure to uv pip install torch==2.3.1 --index-url https://download.pytorch.org/whl/cu121
uv pip install setuptools wheel ... # missing because of --no-build-isolation
uv sync --no-build-isolation # torch extensions installed here |
You can include wheel and setup tools in uv add I think |
I added some docs for this here: #6607 |
Hi, I was following the suggested solution that was also introduced in the docs of specifying flash-attn as an extra dependency and use the following two commands uv sync --extra build
uv sync --extra build --extra compile My main challenge with that solution is from now on this required me to always remember to specify these flags when using uv for that project with the flash-attn dependencies, otherwise if I accidentally use a Instead, I managed to build the environment by specifying flash-attn alongside the other dependencies (while still defining it as a uv sync --no-install-package flash-attn
uv sync If I understand correctly this allows me to use the regular |
I get the following error despite installation flash attention was successful via
uv add flash-attn --no-build-isolation
. See #6402. Is there anyway to honor theno-build-isolation
when doinguv sync
? I imagine the idea is to mark theflash-attn
dependencies somehow and run it withno-build-isolation
after all the other dependencies have been installed.pyproject.toml and uv.lock are here: https://gist.github.com/vwxyzjn/fba2c7ffac8e6c923ffe912a872ec9a8
The text was updated successfully, but these errors were encountered: