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

Use text config's vocab size in testing models #30568

Merged
merged 1 commit into from May 1, 2024

Conversation

zucchini-nlp
Copy link
Member

What does this PR do?

The PR replaces all the model.config.vocab_size with text_config.vocab_size if available. This way VLMs do not need to copy vocab size related tests in every modeling file + I see that "vocab_size" is deprecated in Llava and will be removed in "v4.42"

Related to adding new model VideoLlava, shoudl be merged before that

@HuggingFaceDocBuilderDev

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.

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 tidying all of this up! Lovely to see so much code deleted

The repeated logic in the tests makes me this we might want e.g. a property of the model in the future, but I can imagine it being a bit fiddly with lots of edge cases

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.

Sorry - I meant to approve

@zucchini-nlp zucchini-nlp merged commit 9d31b32 into huggingface:main May 1, 2024
18 checks passed
zucchini-nlp added a commit that referenced this pull request May 2, 2024
* failiing CI

* no let's keep it intil full deprecation in  v4.42
itazap pushed a commit that referenced this pull request May 14, 2024
itazap pushed a commit that referenced this pull request May 14, 2024
* failiing CI

* no let's keep it intil full deprecation in  v4.42
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

3 participants