8000 Flash Attention Disable Toggle (Take 2) by Maxusmusti · Pull Request #118 · instructlab/training · GitHub
[go: up one dir, main page]

Skip to content

Flash Attention Disable Toggle (Take 2) - #118

Merged
Maxusmusti merged 2 commits into
mainfrom
flash-toggle
Jul 2, 2024
Merged

Maxusmusti merged 2 commits into
mainfrom
flash-toggle

Conversation

@Maxusmusti
@Maxusmusti Maxusmusti commented Jul 1, 2024 •
Copy link
Copy Markdown
Collaborator

For hardware scenarios where flash attention is potentially not supported.

(Re-implementation of now out-of-date #15)

For issue #92

Signed-off-by: Mustafa Eyceoz <meyceoz@redhat.com>
@Maxusmusti
Maxusmusti marked this pull request as ready for review July 1, 2024 20:43
@Maxusmusti
Copy link
Copy Markdown
Collaborator Author

Tested all four options:

  • disable_flash_attn=False, is_padding_free=False
  • disable_flash_attn=True, is_padding_free=False
  • disable_flash_attn=False, is_padding_free=True
  • disable_flash_attn=True, is_padding_free=True

Comment thread src/instructlab/training/config.py Resolved
Signed-off-by: Mustafa Eyceoz <meyceoz@redhat.com>
@Maxusmusti
Maxusmusti requested a review from cdoern July 1, 2024 21:05
@Maxusmusti
Copy link
Copy Markdown
Collaborator Author

Tested and validated on V100s

@Maxusmusti
Maxusmusti merged commit 0ff1ba4 into main Jul 2, 2024
@ktam3 ktam3 linked an issue Jul 2, 2024 that may be closed by this pull request
@Maxusmusti
Maxusmusti deleted the flash-toggle branch July 9, 2024 17:53
Atharva1763 pushed a commit to Atharva1763/training that referenced this pull request Jul 11, 2024
The `main_ds` module imports DeepSpeed and PyTorch. These imports take a
very long time and slow down startup of the Instruct CLI `ilab` tool by
over a second.

Use PEP 562 hooks to implement lazy import and loading for
`run_training` function. The function is imported when the attribute is
accessed.

See: instructlab/instructlab#1467

Signed-off-by: Christian Heimes <cheimes@redhat.com>

Catch Error if Packing Max Batch Len Cannot be Found (instructlab#114)

this will remove the control for sampler

instead sampler will be decided if the max batch len cannot be found.

---------

Signed-off-by: Yu Chin Fabian Lim <flim@sg.ibm.com>
Signed-off-by: Mustafa Eyceoz <maxusmusti@gmail.com>
Co-authored-by: Mustafa Eyceoz <maxusmusti@gmail.com>

Use deferred imports instead of lazy loading (instructlab#121)

PR instructlab#116 added lazy loading of `run_training` function with a PEP 562
`__getattr__` module hook. Pylint does not understand the trick, which
caused some problems. Replace the lazy hook with a wrapper function and
deferred imports.

Also mark all public APIs with a comment, so developers are aware which
classes are used by other packages.

Signed-off-by: Christian Heimes <cheimes@redhat.com>

Reduce unecessary multiprocessing (instructlab#79)

Signed-off-by: Mustafa Eyceoz <meyceoz@redhat.com>

Flash Attention Disable Toggle (Take 2) (instructlab#118)

For hardware scenarios where flash attention is potentially not supported.

For issue instructlab#92

---------

Signed-off-by: Mustafa Eyceoz <meyceoz@redhat.com>

🐛: fix optimizer selection logic so that FusedAdam is never loaded when CPU offloading is enabled (instructlab#122)

Signed-off-by: Oleg S <97077423+RobotSail@users.noreply.github.com>

Add wheel to requirements (instructlab#123)

Signed-off-by: Mustafa Eyceoz <meyceoz@redhat.com>

Revert "Add wheel to requirements (instructlab#123)"

This reverts commit b91273e.

Changing the script for validation
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.

FlashAttention disable support

3 participants

0