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

tiktoken usage #341

Open
zhaochenyang20 opened this issue Sep 8, 2023 · 2 comments
Open

tiktoken usage #341

zhaochenyang20 opened this issue Sep 8, 2023 · 2 comments
Labels
good first issue Good for newcomers

Comments

@zhaochenyang20
Copy link
Collaborator

#335 (comment)

Another thing is that I am not sure that all the API-based models use tiktoken to compute input tokens. Thus, the num of input tokens may slightly differ between these models. But that's minimal.

@zhaochenyang20 zhaochenyang20 added the good first issue Good for newcomers label Sep 8, 2023
@neubig
Copy link
Collaborator

neubig commented Sep 8, 2023

I'm not 100% sure whether we actually need to fix this. We could possibly just use tiktoken unless we run into problems.

@neubig
Copy link
Collaborator

neubig commented Sep 8, 2023

Oh, actually litellm supports cross-provider token counting, so resolving this may be easier than I anticipated: https://docs.litellm.ai/docs/token_usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants