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

interpolation added for TVP. #30863

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

bhuvanmdev
Copy link
Contributor

What does this PR do?

Adds interpolation to the tvp model for the position and pad embeddings.

Addresses #30579

Who can review?

@amyeroberts

Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for working on adding this!

src/transformers/models/tvp/modeling_tvp.py Outdated Show resolved Hide resolved
src/transformers/models/tvp/modeling_tvp.py Outdated Show resolved Hide resolved
src/transformers/models/tvp/modeling_tvp.py Outdated Show resolved Hide resolved
tests/models/tvp/test_modeling_tvp.py Outdated Show resolved Hide resolved
tests/models/tvp/test_modeling_tvp.py Outdated Show resolved Hide resolved
src/transformers/models/tvp/modeling_tvp.py Outdated Show resolved Hide resolved
src/transformers/models/tvp/modeling_tvp.py Outdated Show resolved Hide resolved
src/transformers/models/tvp/modeling_tvp.py Outdated Show resolved Hide resolved
src/transformers/models/tvp/modeling_tvp.py Outdated Show resolved Hide resolved
src/transformers/models/tvp/modeling_tvp.py Show resolved Hide resolved
Copy link
Collaborator

@amyeroberts amyeroberts left a comment

Choose a reason for hiding this comment

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

Thanks for the continued work on this!

Please make sure to either comment on suggestions why you're not implementing them or implement the suggestion before marking as resolved. Comments making suggestions to make e.g. docstrings in-line with the library standard will have to be implemented

Comment on lines 300 to 301
expected_shape = torch.Size((1, 2))
assert outputs.logits.shape == expected_shape
Copy link
Collaborator

Choose a reason for hiding this comment

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

Option 2 :)

src/transformers/models/tvp/modeling_tvp.py Outdated Show resolved Hide resolved
src/transformers/models/tvp/modeling_tvp.py Outdated Show resolved Hide resolved
src/transformers/models/tvp/modeling_tvp.py Outdated Show resolved Hide resolved
src/transformers/models/tvp/modeling_tvp.py Outdated Show resolved Hide resolved
src/transformers/models/tvp/modeling_tvp.py Outdated Show resolved Hide resolved
src/transformers/models/tvp/modeling_tvp.py Show resolved Hide resolved
src/transformers/models/tvp/modeling_tvp.py Outdated Show resolved Hide resolved
@amyeroberts
Copy link
Collaborator

@bhuvanmdev For the quality checks could you:

  • Rebase on main
  • Make sure the most recent formatting libraries are installed: pip install -e '.[quality]'
  • Format with make fixup

@bhuvanmdev
Copy link
Contributor Author

@amyeroberts Done.

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.

None yet

2 participants