-
Notifications
You must be signed in to change notification settings - Fork 6k
Add Microsoft.ML.Tokenizers documentation to .NET AI docs #49536
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive documentation for the Microsoft.ML.Tokenizers library, introducing a new how-to guide that covers tokenization concepts and provides practical examples for working with different tokenizer models in .NET applications.
Key changes:
- New how-to article explaining Microsoft.ML.Tokenizers usage with examples for Tiktoken, Llama, and BPE tokenizers.
- Code examples demonstrating common tokenization operations including encoding, decoding, token counting, and text trimming.
- Integration with existing documentation through TOC updates and cross-references.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/ai/toc.yml | Adds new "Tokenization" section with link to the tokenizers guide |
| docs/ai/how-to/use-tokenizers.md | New how-to article covering Microsoft.ML.Tokenizers library usage |
| docs/ai/how-to/snippets/use-tokenizers/csharp/TokenizersExamples/TokenizersExamples.csproj | Project file for tokenizer code examples |
| docs/ai/how-to/snippets/use-tokenizers/csharp/TokenizersExamples/TiktokenExample.cs | Example code demonstrating Tiktoken tokenizer usage |
| docs/ai/how-to/snippets/use-tokenizers/csharp/TokenizersExamples/Program.cs | Entry point for running all tokenizer examples |
| docs/ai/how-to/snippets/use-tokenizers/csharp/TokenizersExamples/LlamaExample.cs | Example code for Llama tokenizer usage |
| docs/ai/how-to/snippets/use-tokenizers/csharp/TokenizersExamples/BpeExample.cs | Example code for BPE tokenizer usage |
| docs/ai/how-to/snippets/use-tokenizers/csharp/TokenizersExamples/.gitignore | Ignores build artifacts for example project |
| docs/ai/conceptual/understanding-tokens.md | Adds cross-reference to new tokenizers guide |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Adds comprehensive how-to guide for the Microsoft.ML.Tokenizers library, addressing the gap in documentation for this ML.NET tokenization package that's increasingly used in AI scenarios.
Changes
New how-to article at
docs/ai/how-to/use-tokenizers.mdWorking code examples in
docs/ai/how-to/snippets/use-tokenizers/csharp/TokenizersExamples/TOC and cross-references
Example usage
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
huggingface.co/home/REDACTED/work/docs/docs/docs/ai/how-to/snippets/use-tokenizers/csharp/TokenizersExamples/bin/Debug/net9.0/TokenizersExamples(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.
Internal previews