Skip to content

Make Microsoft.ML.OnnxRuntimeGenAI.Tokenizer a Microsoft.ML.Tokenizers.Tokenizer #970

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

stephentoub
Copy link
Member

This enables an ONNX Runtime GenAI tokenizer instance to be used anywhere a Microsoft.ML.Tokenizers tokenizer is accepted. If we'd prefer, rather than having Tokenizer be a base class for the ONNX Runtime one, we could instead expose some sort of public Microsoft.ML.Tokenizer.Tokenizer AsTokenizer() conversion method that returns a wrapper object (though that's a bit confusing given the names of the type are the same, just different namespaces).

cc: @luisquintanilla, @tarekgh

Copy link
Member

@tarekgh tarekgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@azchohfi
Copy link
Contributor

@stephentoub is this unblocked now that #987 merged?

@baijumeswani
Copy link
Collaborator

Closing and reopening the PR to trigger all the pipelines

@baijumeswani baijumeswani reopened this Mar 5, 2025
@luisquintanilla
Copy link
Member

luisquintanilla commented Mar 13, 2025

@baijumeswani looks like the builds are failing because of issues with the feed. Can you please help unblock.

@tarekgh
Copy link
Member

tarekgh commented Mar 21, 2025

@stephentoub looks like you need to resolve the conflicts.

@stephentoub
Copy link
Member Author

@stephentoub looks like you need to resolve the conflicts.

Done

@luisquintanilla
Copy link
Member

@baijumeswani looks like this is ready to merge.

baijumeswani
baijumeswani previously approved these changes Apr 28, 2025
@baijumeswani
Copy link
Collaborator

closing/re-opening to trigger lint-cpp

@baijumeswani baijumeswani reopened this Apr 28, 2025
@baijumeswani baijumeswani enabled auto-merge (squash) April 28, 2025 21:03
@baijumeswani
Copy link
Collaborator

@stephentoub not sure what happened. But it seems like the build started failing. Could you please take a look?

@tarekgh
Copy link
Member

tarekgh commented Apr 28, 2025

@baijumeswani Looks the StringUtils.To/FromUtf8 renamed to To/FromNullTerminatedUtf8.

@baijumeswani
Copy link
Collaborator

trying again.

auto-merge was automatically disabled May 1, 2025 20:45

Pull request was closed

@baijumeswani baijumeswani reopened this May 1, 2025
…s.Tokenizer

This enables an ONNX Runtime GenAI tokenizer instance to be used anywhere a Microsoft.ML.Tokenizers tokenizer is accepted. If we'd prefer, rather than having Tokenizer be a base class for the ONNX Runtime one, we could instead expose some sort of `public Microsoft.ML.Tokenizer.Tokenizer AsTokenizer()` conversion method that returns a wrapper object (though that's a bit confusing given the names of the type are the same, just different namespaces).
@luisquintanilla
Copy link
Member

@baijumeswani looks like this one's ready to merge.

@luisquintanilla
Copy link
Member

@baijumeswani looks like tests are failing on the UTF8 issue again

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.

5 participants