Use gpt-4o's tokenizer#258
Merged
filipchristiansen merged 3 commits intocoderamp-labs:mainfrom Jun 18, 2025
Merged
Conversation
Contributor
Author
|
cc @cyclotruc |
5512a04 to
0a1e6e9
Compare
Context ------- The previous commit switched token counting from **cl100k_base** to **o200k_base**. That encoding is available only in **tiktoken ≥ 0.7.0**, whose wheels require Python 3.8+. We already exclude 3.7 from the CI matrix, so this raises the documented minimum Python version without affecting tested platforms. Changes ------- * **README.md** – “Python 3.7+” → **“Python 3.8+”** * **pyproject.toml** * `tiktoken` → `tiktoken>=0.7.0` # o200k_base support * Remove classifier *Programming Language :: Python :: 3.7* * **requirements.txt** – `tiktoken` → `tiktoken>=0.7.0` * No code changes beyond the earlier one-liner already in this PR. Impact ------ * **Breaking** for users pinned to Python 3.7; they must upgrade to ≥ 3.8. * No new runtime dependencies—just a higher floor for *tiktoken* and Python.
Contributor
PR overviewThis PR does three tightly-related things:
Files touched
Breaking changes & actions
No new runtime libraries are introduced—just the higher version floor. |
filipchristiansen
approved these changes
Jun 18, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use
gpt-4otokenizer (o200k_base) instead of the oldgpt-4tokenizer (o100k_base).