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

Optionally use flash-attn's CE loss for metrics #3507

Draft
wants to merge 23 commits into
base: main
Choose a base branch
from

Conversation

snarayan21
Copy link
Contributor

@snarayan21 snarayan21 commented Jul 31, 2024

What does this PR do?

Resubmission of #3394 -- using FA's CE Loss results in lower peak reserved memory usage and higher throughput. We are not adding flash attention as an optional dependency to composer since this makes installs and correct builds messy & take a lot longer.

Manual tests:

Run started on dev (13b-dense-fsdp-fullshard-hsdp-adam-shardedckpt-start-5PtEdK), resumed with this branch (13b-dense-fsdp-fullshard-hsdp-adam-shardedckpt-resume-E5SieL)
Run started on this branch (13b-dense-fsdp-fullshard-hsdp-adam-shardedckpt-start-0g8uD4), resumed with dev branch (13b-dense-fsdp-fullshard-hsdp-adam-shardedckpt-resume-TSGoUC)
4th time's the charm :0

Run with torch CE loss (green): tiny-sp-dtms1-32h-wCFWfa
Run with FA CE loss (tan): tiny-sp-dtms1-32h-jOfIPL

What issue(s) does this change relate to?

Before submitting

  • Have you read the contributor guidelines?
  • Is this change a documentation change or typo fix? If so, skip the rest of this checklist.
  • Was this change discussed/approved in a GitHub issue first? It is much more likely to be merged if so.
  • Did you update any related docs and document your change?
  • Did you update any related tests and add any new tests related to your change? (see testing)
  • Did you run the tests locally to make sure they pass?
  • Did you run pre-commit on your change? (see the pre-commit section of prerequisites)

@snarayan21 snarayan21 requested a review from a team as a code owner July 31, 2024 15:28
@snarayan21 snarayan21 marked this pull request as draft July 31, 2024 15:29
@snarayan21 snarayan21 marked this pull request as ready for review July 31, 2024 15:29
Copy link
Contributor

@dakinggg dakinggg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please separate out the GLOO change into its own PR since it has caused some test failures before.

@snarayan21 snarayan21 marked this pull request as draft July 31, 2024 17:46
Copy link
Contributor

@mvpatel2000 mvpatel2000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with Daniel

@snarayan21
Copy link
Contributor Author

gloo change is in #3509

@snarayan21 snarayan21 marked this pull request as ready for review August 6, 2024 00:48
@snarayan21 snarayan21 marked this pull request as draft August 6, 2024 01:52
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

Successfully merging this pull request may close these issues.

3 participants