Skip to content
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

Request to update flash_attention in deepspeed inference #3491

Closed
bmedishe opened this issue May 8, 2023 · 5 comments
Closed

Request to update flash_attention in deepspeed inference #3491

bmedishe opened this issue May 8, 2023 · 5 comments
Assignees

Comments

@bmedishe
Copy link
Contributor

bmedishe commented May 8, 2023

triton flash_attention used by deepspeed inference is compatible with 6 month old pre release version of triton( 2.0.0.dev20221202 ) .

triton dot , trans operators are rewritten in Complete rewrite of the backend from scratch
flash_attention is optimized in the Improved flash attention forward pass performance

Could you kindly update flash_attention with the current triton release.

  1. I get this error when running deepspeed inference , with triton release version (2.0.0)
    TypeError: dot() got an unexpected keyword argument 'trans_b'
  2. With qk += tl.dot(q, k, trans_b=True) to tl.dot(q,tl.trans(k)) , deepspeed inference hangs
@loadams
Copy link
Collaborator

loadams commented May 12, 2023

Hi @bmedishe - there are two different triton versions in the requirements, one for sd that is the one you note, and the one for sparse_attn that is 1.0.0. Could you mention what you're trying to run? We are working on updating both, but would be good to know what tests or things you're running.

@bmedishe
Copy link
Contributor Author

@loadams I am running stable diffusion with deepspeed inference.

@loadams
Copy link
Collaborator

loadams commented Jun 6, 2023

@bmedishe - thanks, still working on getting these updated, will update this thread when it is complete.

@loadams
Copy link
Collaborator

loadams commented Jul 24, 2023

@bmedishe - we need this specific version for now for stable diffusion for now unfortunately.

@loadams loadams closed this as completed Jul 24, 2023
@felker
Copy link

felker commented Sep 28, 2023

Related #4008.

Am I correct in assuming that the sparse attention and stable diffusion are mutually exclusive when building DS right now? Is there somewhere in the documentation I can add an explicit mention of this?

Any plans on bumping triton dependency of sparse attention to 2.x ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants