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

Fix #5 Encoding text that contains certain some emojis. #6

Merged
merged 2 commits into from
Jan 28, 2023

Conversation

Gioni06
Copy link
Owner

@Gioni06 Gioni06 commented Jan 28, 2023

The root cause is the generation of the bytes_to_unicode map.

Replacing the original implementation with a static map solved the issue and should even improve the performance. The output was checked against the implementation that OpenAI uses.

https://beta.openai.com/tokenizer

closes #5

The root cause is a generation of the bytes_to_unicode map. Replacing the original implementation
with a static map solved the issue and should even improve the performance. The output was checked against
the implementation that OpenAI uses.
@Gioni06 Gioni06 merged commit 2c48282 into main Jan 28, 2023
@Gioni06 Gioni06 deleted the 5-attempting-to-encode-results-in-an-error branch January 28, 2023 11:50
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.

Attempting to encode "🔭" results in an error
1 participant