Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable roberta embedding #786

Open
wants to merge 3 commits into
base: habana_main
Choose a base branch
from

Conversation

yeonsily
Copy link

@yeonsily yeonsily commented Feb 5, 2025

We set position_ids and input_ids as [batch_size, bucket_size] on hpu so need to modify the current roberta embedding forward function.

e.g. position_id on gpu
[0,1,2,3,4,5,6,7]
but position_id on hpu
[0,1,2,3,4,5,6,7,0,0,0,.....0,0] which size is 128 with padding in this case.

One thing I noticed is torch.equal() on hpu is not working properly and I have to run it on cpu.
That code is nothing but checking pre-condition but we will need to investigate it.

This PR has a dependency on #758

@yeonsily yeonsily force-pushed the dev/enable_roberta_embedding branch from 594a1d3 to c660333 Compare February 13, 2025 17:26
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.

1 participant