Yuniko.Software.Qwen3Tokenizer
0.1.2-preview
See the version list below for details.
dotnet add package Yuniko.Software.Qwen3Tokenizer --version 0.1.2-preview
NuGet\Install-Package Yuniko.Software.Qwen3Tokenizer -Version 0.1.2-preview
<PackageReference Include="Yuniko.Software.Qwen3Tokenizer" Version="0.1.2-preview" />
<PackageVersion Include="Yuniko.Software.Qwen3Tokenizer" Version="0.1.2-preview" />
<PackageReference Include="Yuniko.Software.Qwen3Tokenizer" />
paket add Yuniko.Software.Qwen3Tokenizer --version 0.1.2-preview
#r "nuget: Yuniko.Software.Qwen3Tokenizer, 0.1.2-preview"
#:package Yuniko.Software.Qwen3Tokenizer@0.1.2-preview
#addin nuget:?package=Yuniko.Software.Qwen3Tokenizer&version=0.1.2-preview&prerelease
#tool nuget:?package=Yuniko.Software.Qwen3Tokenizer&version=0.1.2-preview&prerelease
Yuniko.Software.Qwen3Tokenizer
⚠️ Preview Release: This package is currently in preview as it depends on
Microsoft.ML.Tokenizers(preview). It's ready for production use, but the preview tag will remain until dependencies stabilize.
Native .NET tokenizer implementation for Qwen3 models. Lightweight byte-pair encoding with HuggingFace integration.
Features
- Byte-Pair Encoding (BPE): Compatible with Qwen3 model tokenization
- Special Token Support: Handles EOS, PAD, and custom added tokens
- NFC Normalization: Built-in Unicode normalization
- HuggingFace Integration: Load tokenizers directly from HuggingFace models
- Efficient: Optimized for performance with minimal dependencies
Installation
dotnet add package Yuniko.Software.Qwen3Tokenizer
Or via Package Manager:
Install-Package Yuniko.Software.Qwen3Tokenizer
Quick Start
using Yuniko.Software.Qwen3Tokenizer;
// Load from HuggingFace model
var tokenizer = await Qwen3Tokenizer.FromHuggingFaceAsync(
"Qwen/Qwen3-Embedding-8B");
// Encode text
var result = tokenizer.Encode("Hello, world!");
Console.WriteLine($"Token IDs: {string.Join(", ", result.Ids)}");
// Decode tokens
var text = tokenizer.Decode(result.Ids);
Console.WriteLine($"Decoded: {text}");
Supported Models
Works with all Qwen3 model variants:
- Qwen3-Embedding models
- Qwen3 General models
- Qwen3-Reranker models
- Qwen3-VL (Vision-Language) models
Requirements
- .NET 10.0 or later
License
This project is licensed under the Apache 2.0 License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please visit the GitHub repository for more information.
Support
For issues, questions, or suggestions, please open an issue on GitHub.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Microsoft.ML.Tokenizers (>= 2.0.0-preview.25527.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.2.0 | 2,528 | 11/17/2025 |
| 1.1.0 | 373 | 11/13/2025 |
| 1.0.0 | 376 | 11/11/2025 |
| 0.1.3-preview | 230 | 11/2/2025 |
| 0.1.2-preview | 175 | 11/1/2025 |
| 0.1.1-preview | 155 | 11/1/2025 |
## What's Changed
* Restructure repo to root-based .NET layout and add model name validation by @demid-ns in https://github.com/yuniko-software/qwen3-tokenizer-dotnet/pull/9
**Full Changelog**: https://github.com/yuniko-software/qwen3-tokenizer-dotnet/compare/dotnet-0.1.1-preview...0.1.2-preview