Skip to content

Fix UME embedding dtype mismatch#151

Merged
rcalef merged 3 commits intomainfrom
calefr/ume_dtype_fix
Jul 21, 2025
Merged

Fix UME embedding dtype mismatch#151
rcalef merged 3 commits intomainfrom
calefr/ume_dtype_fix

Conversation

@rcalef
Copy link
Collaborator

@rcalef rcalef commented Jul 18, 2025

Description

Make UME embeddings coming out of UME.embed match the current dtype of the model. Currently, embeddings are being returned as torch.float32 even when the model has been cast to bfloat16.

Also includes a test for embedding output matching the expected dtype. Test fails without the change, test passes with the change.

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Code refactoring

Testing

  • Tests pass locally
  • Added new tests for new functionality
  • Updated existing tests if needed

Checklist

  • Code follows style guidelines
  • Self-review completed
  • Documentation updated if needed
  • No breaking changes (or clearly documented)

@rcalef rcalef requested a review from ncfrey July 18, 2025 21:12
@rcalef rcalef temporarily deployed to test.pypi.org July 18, 2025 21:14 — with GitHub Actions Inactive
Copy link
Contributor

@ncfrey ncfrey left a comment

Choose a reason for hiding this comment

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

do you need to be on GPU to run the test?

@rcalef rcalef temporarily deployed to test.pypi.org July 21, 2025 15:07 — with GitHub Actions Inactive
@rcalef
Copy link
Collaborator Author

rcalef commented Jul 21, 2025

do you need to be on GPU to run the test?

Good point! Changed to CPU test without flash attention

@rcalef rcalef merged commit 645b78d into main Jul 21, 2025
5 checks passed
@rcalef rcalef deleted the calefr/ume_dtype_fix branch July 21, 2025 15:12
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.

2 participants