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

Mistral token counting/batching #46

Open
pbeart opened this issue Jan 26, 2024 · 0 comments
Open

Mistral token counting/batching #46

pbeart opened this issue Jan 26, 2024 · 0 comments

Comments

@pbeart
Copy link

pbeart commented Jan 26, 2024

Hi, I'm interested in making a PR so that the embedding methods chunk data to ensure each request has less than the maximum (16384) required by Mistral. Unfortunately, there doesn't seem to be a lightweight way to count tokens for Mistral, such as tiktoken for OpenAI models - I guess most of the time it's going to be safe to use tiktoken with a safety margin, but is there a way to count tokens accurately without a heavy library?

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

No branches or pull requests

1 participant