Skip to content

Add new HPU torch compile backend#32

Merged
vivekgoe merged 1 commit into
habana-mainfrom
dev/backendname_change
Feb 9, 2024
Merged

Add new HPU torch compile backend#32
vivekgoe merged 1 commit into
habana-mainfrom
dev/backendname_change

Conversation

@bhargaveede
Copy link
Copy Markdown

@bhargaveede bhargaveede commented Feb 9, 2024

What does this PR do?

AOT_HPU_TRAINING_BACKEND for torch compile shall be deprecated soon, will be replaced by HPU_BACKEND. Therefore add support for new HPU backend.

Fixes # (issue)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

@bhargaveede bhargaveede requested a review from vivekgoe February 9, 2024 11:25
@vivekgoe vivekgoe changed the title Changing backend name Add new HPU torch compile backend Feb 9, 2024
@vivekgoe vivekgoe requested review from a user and piotrbocian February 9, 2024 16:29
@vivekgoe vivekgoe merged commit 64fd45a into habana-main Feb 9, 2024
bhargaveede pushed a commit that referenced this pull request Feb 19, 2024
bhargaveede pushed a commit that referenced this pull request Feb 19, 2024
@vivekgoe vivekgoe added the ported_to_hf_oh PR has been ported to huggingface/optimum-habana label Feb 27, 2024
@bhargaveede bhargaveede deleted the dev/backendname_change branch May 16, 2024 06:27
@astachowiczhabana
Copy link
Copy Markdown

huggingface#708

@bhargaveede
Copy link
Copy Markdown
Author

#32

@bhargaveede
Copy link
Copy Markdown
Author

huggingface#708

astachowiczhabana added a commit that referenced this pull request Nov 22, 2024
* Fix clip test

* Skip falcon tests

* Fix clip test

* [SW-209062] Disable default sdpa in Albert (#23)

Transformers' default sdpa implementation caused performance
drop in Albert. Adding Albert to the list of models which don't
yet have sdpa implementation in Gaudi and use eager attention.

* [SW-209210] skip first token in EOS check. (#25) (#27)

* Problem: output of _sample function was filled with padding tokens
   for for bart model.

 * Cause: Bart model uses the same token as decoder_start_token_id and
   end of string.
   See: https://huggingface.co/facebook/bart-large-cnn/blob/main/config.json
   Because of that mechanism filling model output with padding
   tokens after EOS (end of string) toke was replacing whole response
   with padding.

 * Solution: Skip check for EOS for first token in padding filling loop.

* Update CODEOWNERS

* Adding labels clone as workaround to avoid crash (#28)

* [SW-0] Fix style

---------

Co-authored-by: Urszula Golowicz <urszula.golowicz@intel.com>
Co-authored-by: Marcin Łapiński <mlapinskix@habana.ai>
Co-authored-by: Bhargav <beede@habana.ai>
xinyu-intel pushed a commit that referenced this pull request Mar 4, 2025
* Fix clip test

* Skip falcon tests

* Fix clip test

* [SW-209062] Disable default sdpa in Albert (#23)

Transformers' default sdpa implementation caused performance
drop in Albert. Adding Albert to the list of models which don't
yet have sdpa implementation in Gaudi and use eager attention.

* [SW-209210] skip first token in EOS check. (#25) (#27)

* Problem: output of _sample function was filled with padding tokens
   for for bart model.

 * Cause: Bart model uses the same token as decoder_start_token_id and
   end of string.
   See: https://huggingface.co/facebook/bart-large-cnn/blob/main/config.json
   Because of that mechanism filling model output with padding
   tokens after EOS (end of string) toke was replacing whole response
   with padding.

 * Solution: Skip check for EOS for first token in padding filling loop.

* Update CODEOWNERS

* Adding labels clone as workaround to avoid crash (#28)

* [SW-0] Fix style

---------

Co-authored-by: Urszula Golowicz <urszula.golowicz@intel.com>
Co-authored-by: Marcin Łapiński <mlapinskix@habana.ai>
Co-authored-by: Bhargav <beede@habana.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ported_to_hf_oh PR has been ported to huggingface/optimum-habana

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants