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

chore: setup o200k_base tokenizer #43

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

Conversation

mbukeRepo
Copy link

@mbukeRepo mbukeRepo commented May 15, 2024

This PR integrates the new tokenizer for gpt-4o o200k_base.

Encoding file:
https://openaipublic.blob.core.windows.net/encodings/o200k_base.tiktoken 214

Closes #42

@mbukeRepo mbukeRepo marked this pull request as ready for review May 16, 2024 21:28
Copy link

@caugner caugner May 27, 2024

Choose a reason for hiding this comment

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

You might also want to update lines 5, 14, and 48-51:

`gpt-tokenizer` is a highly optimized Token Byte Pair Encoder/Decoder for all OpenAI's models (including those used by GPT-2, GPT-3, GPT-3.5 and GPT-4). It's written in TypeScript, and is fully compatible with all modern JavaScript environments.

- Support for all current OpenAI models (available encodings: `r50k_base`, `p50k_base`, `p50k_edit` and `cl100k_base`)

gpt-tokenizer/README.md

Lines 48 to 51 in 44ce38e

- https://unpkg.com/gpt-tokenizer/dist/cl100k_base.js
- https://unpkg.com/gpt-tokenizer/dist/p50k_base.js
- https://unpkg.com/gpt-tokenizer/dist/p50k_edit.js
- https://unpkg.com/gpt-tokenizer/dist/r50k_base.js

Copy link
Author

Choose a reason for hiding this comment

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

Thanks Claas, I applied the requested changes.

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.

Support New o200k_base
2 participants