-
Notifications
You must be signed in to change notification settings - Fork 569
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
Refactor the Transformers and TransformersVision model #1430
Merged
RobinPicard
merged 2 commits into
dottxt-ai:v1.0
from
RobinPicard:refactor-transformers
Feb 21, 2025
Merged
Refactor the Transformers and TransformersVision model #1430
RobinPicard
merged 2 commits into
dottxt-ai:v1.0
from
RobinPicard:refactor-transformers
Feb 21, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
231dd51
to
f764a66
Compare
f764a66
to
ff6366c
Compare
rlouf
reviewed
Feb 21, 2025
rlouf
reviewed
Feb 21, 2025
You can merge after addressing my comment and once that test is fixed. |
rlouf
approved these changes
Feb 21, 2025
ff6366c
to
f6e1882
Compare
rlouf
pushed a commit
to RobinPicard/outlines
that referenced
this pull request
Feb 24, 2025
The objective of this commit is to adapt `Transfomers` and `TransformersVision` to the model interface used in v1.0. The main changes are: - make the models inherit from the base class `Model` and create a `ModelTypeAdapter` for them - modify the signature of the `generate` method and make it the only way of generating text with the model. - modify the handling of model/tokenizer optional arguments to avoid manipulating them ourselves (giving to the user the responsibility of choosing those they need). - delete the tests for those models in the `generate` directory and test them instead in the `models` directory
rlouf
pushed a commit
to RobinPicard/outlines
that referenced
this pull request
Feb 24, 2025
The objective of this commit is to adapt `Transfomers` and `TransformersVision` to the model interface used in v1.0. The main changes are: - make the models inherit from the base class `Model` and create a `ModelTypeAdapter` for them - modify the signature of the `generate` method and make it the only way of generating text with the model. - modify the handling of model/tokenizer optional arguments to avoid manipulating them ourselves (giving to the user the responsibility of choosing those they need). - delete the tests for those models in the `generate` directory and test them instead in the `models` directory
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR takes over what was started by @rlouf in #1344
The objective is to adapt
Transfomers
andTransformersVision
to the model interface used in v1.0. To do so, we modify the signature of thegenerate
method and make it the only way of generating text with the model. We also modify the handling of model/tokenizer optional arguments to avoid manipulating them ourselves (giving to the user the responsibility of choosing those they need).I deleted the tests for those models from
tests/generate
and instead put the tests in thetests/models
.I also included a commit that fixes some issues on the current version of branch v1.0 that are unrelated to this PR but were preventing me from running the tests.