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

[tokenizer] add optional tokenizerPath Prior to modelPath #3120

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

ewan0x79
Copy link
Contributor

Description

In our actual usage, there are scenarios where tokenizerPath and modelPath differ. In the TranslatorFactory, we check if the tokenizerPath field is set, which has a higher priority than modelPath. If tokenizerPath is not configured, modelPath will be used by default, ensuring no impact on existing code.

@ewan0x79 ewan0x79 requested review from zachgk, frankfliu and a team as code owners April 24, 2024 07:00
@frankfliu
Copy link
Contributor

@ewan0x79

We actually only need make changes to HuggingfaceTokenizer.builder(), the arguments in criteria will override .optTokenizerPath().

@frankfliu frankfliu merged commit 6efe660 into deepjavalibrary:master Apr 25, 2024
5 checks passed
frankfliu added a commit that referenced this pull request Apr 26, 2024
* [tokenizer] add optional tokenizerPath Prior to modelPath

---------

Co-authored-by: Frank Liu <frankfliu2000@gmail.com>
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.

2 participants