openai / openai/tiktoken

FAQ (please read before opening a new issue)

Open
#98 0 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
19.3k
Forks
1.6k
PR merge metrics
No merged PRs in 30d

Description

Usage help

Check out this awesome tokeniser app https://tiktokenizer.vercel.app/ built by Diagram!

Check out the OpenAI cookbook!

In particular, the following are great examples of using tiktoken:

Other useful resources:

Support for other languages

Publishing an official NPM package

I have no current plans to do this, but it is likely that in the future OpenAI will provide an official package. Discuss at #22

Publishing an official Rust crate

In the future when I have time, I will publish the core BPE logic as its own crate. Discuss at #24

I'm short on time currently, but in the longer term I want to explore ways to make maintaining downstream bindings easier. Apologies to the people who've reached out about this — y'all are great, sorry for being a bottleneck.

Packaging

Issues with pyinstaller

I've never used pyinstaller, but people report --hidden-import=tiktoken_ext.openai_public --hidden-import=tiktoken_ext helps make things work. See #43 for more details.

Wheels for other platforms

I'm reluctant to publish wheels for additional platforms, particularly if I can't easily build or test code for them. I'm unlikely to do this unless there's significant interest. Please add reactions to the following issues if you'd like to see those wheels. No promises, but I'll reopen any issue that gets >10 reactions.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

This issue names no repository file, test, or specific documentation change. Review the FAQ text and its linked issues and resources first; completion cannot be determined from the issue because no requested update or acceptance condition is given.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.