forked from dottxt-ai/outlines
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the Transformers and TransformersVision model (dottxt-ai#1430)
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
- Loading branch information
1 parent
d72b649
commit b0937e2
Showing
6 changed files
with
32 additions
and
18 deletions.
There are no files selected for viewing
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
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
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
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
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
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