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

Update C# tokenizer libraries #1535

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

luisquintanilla
Copy link

@luisquintanilla luisquintanilla commented Oct 30, 2024

Summary

This PR:

  • Adds Microsoft.ML.Tokenizer library to C# libraries
  • Removes deprecated SharpToken library.
  • Removes unmaintained GPTTokenizer library.

Motivation

Microsoft.ML.Tokenizers supplants deprecated / unmaintained libraries. It's also the recommended library for .NET and maintained by Microsoft.

Source: https://github.com/dotnet/machinelearning/tree/main/src/Microsoft.ML.Tokenizers
Package: https://www.nuget.org/packages/Microsoft.ML.Tokenizers

@luisquintanilla
Copy link
Author

cc: @tarekgh

@@ -38,15 +38,15 @@
"\n",
"For `o200k_base`, `cl100k_base` and `p50k_base` encodings:\n",
"- Python: [tiktoken](https://github.com/openai/tiktoken/blob/main/README.md)\n",
"- .NET / C#: [SharpToken](https://github.com/dmitry-brazhenko/SharpToken), [TiktokenSharp](https://github.com/aiqinxuancai/TiktokenSharp)\n",
"- .NET / C#: [Microsoft.ML.Tokenizers](https://www.nuget.org/packages/Microsoft.ML.Tokenizers/), [TiktokenSharp](https://github.com/aiqinxuancai/TiktokenSharp)\n",
Copy link

Choose a reason for hiding this comment

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

Copy link

Choose a reason for hiding this comment

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

To tell, when referencing the data packages, no need to explicitly referencing Microsoft.ML.Tokenizers .

Copy link
Author

Choose a reason for hiding this comment

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

Good point. I'll make that change.

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