-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Avoid using tf.tile in embeddings for TF models #14735
Avoid using tf.tile in embeddings for TF models #14735
Conversation
I love it, thank you for doing this! I wonder if there's a reason for using the |
Either way, it's a straightforward change and I'm happy to merge as-is, so let me know once you're ready. |
I also feel the same, and don't know why The PR is ready. I can rebase on master to see if I can make the tests green. |
3a94ea5
to
e6bc7b4
Compare
Failed tests are irrelevant to this PR. Let me know if you prefer to wait and rebase later. |
No, we're seeing those tests on every PR. I'm happy to merge now - let me know whenever the PR is done! |
It's is done. You can merge. Thanks! |
Done! |
What does this PR do?
Some TF models use
which assume that
position_ids
has size 1 along batch dimension. If users don't specifyposition_ids
, we create it(before using it)
which will have batch size 1. However, in
INPUTS_DOCSTRING
, it specifies the shape to be(batch_size, seq_len)
.If a user provides a full batch for
position_ids
(although this is very unlikely),tf.tile
shouldn't be used here.This PR fixes this issue.
Who can review?
@Rocketknight1