Skip to content

Fix get_dtype and convert_into_dtypes#769

Merged
regisss merged 1 commit into
mainfrom
fix_logits_dtype
Mar 7, 2024
Merged

Fix get_dtype and convert_into_dtypes#769
regisss merged 1 commit into
mainfrom
fix_logits_dtype

Conversation

@regisss
Copy link
Copy Markdown
Collaborator

@regisss regisss commented Mar 6, 2024

What does this PR do?

Fixes #754.

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.

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?

@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@regisss regisss merged commit 90c9d5f into main Mar 7, 2024
@regisss regisss deleted the fix_logits_dtype branch March 7, 2024 00:58
puneeshkhanna pushed a commit to puneeshkhanna/optimum-habana-fork that referenced this pull request Mar 11, 2024
HolyFalafel pushed a commit to HabanaAI/optimum-habana-fork that referenced this pull request Mar 11, 2024
IT-Forrest added a commit to HabanaAI/optimum-habana-fork that referenced this pull request Apr 4, 2024
IT-Forrest added a commit to HabanaAI/optimum-habana-fork that referenced this pull request Apr 5, 2024
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.

make sure a match between logits and logits_dtype in evaluation_loop

2 participants