Skip to content

Fix get_dtype and convert_into_dtypes (#769)#144

Merged
IT-Forrest merged 1 commit into
habana-mainfrom
jwang/fix_convert_into_dtypes
Apr 5, 2024
Merged

Fix get_dtype and convert_into_dtypes (#769)#144
IT-Forrest merged 1 commit into
habana-mainfrom
jwang/fix_convert_into_dtypes

Conversation

@IT-Forrest
Copy link
Copy Markdown

What does this PR do?

This is the cherry-pick of the Optimum-habana commit huggingface#769. The fix consists in extracting the dtype of the first logit tensor and set it as the target dtype. We used to extract the dtypes of all logit tensors, leading to nested tuples that led to this issue. There is no reason for logits to have different dtypes, so we can simplify the dtype extraction logic.

Fixes # (huggingface#754)

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?

@IT-Forrest IT-Forrest merged commit 387e675 into habana-main Apr 5, 2024
@astachowiczhabana
Copy link
Copy Markdown

huggingface#769

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