-
Notifications
You must be signed in to change notification settings - Fork 795
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for nougat models (
image-to-text
) (#391)
* Add `NougatTokenizer` * Add nougat unit tests * Add support for `NougatImageProcessor` * Add `crop` function to `RawImage` * Fix `RawImage` save function OffscreenCanvas does not have `toDataURL` function * Add listed support for nougat models * Fix `min`/`max` function typing * Add unknown token to tokenizer class * Implement `NoBadWordsLogitsProcessor` * Use `NoBadWordsLogitsProcessor` in `generate` * Fix regex group substitutions Python uses \1, \2, etc. for group substitutions, but JavaScript uses $1, $2, etc. * Create `regexSplit` helper function to split but keep delimiter * Fix splitting for String pattern types * Fix docstring
- Loading branch information
Showing
10 changed files
with
285 additions
and
24 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
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
Oops, something went wrong.