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

Expose hash factor in API #19

Merged
merged 4 commits into from
Sep 30, 2024
Merged

Expose hash factor in API #19

merged 4 commits into from
Sep 30, 2024

Conversation

hendrikvanantwerpen
Copy link
Contributor

@hendrikvanantwerpen hendrikvanantwerpen commented Sep 27, 2024

Having a hardcoded hash factor may prevent users from using this crate with other token sets.

This PR:

  • Adds an optional parameter to BPE construction methods that allows setting a custom hash factor.
  • Exposes the find_hash_factor function in the API so it's easier for users to reuse it when working with other token sets.

Tasks

  • Expose hash factor in API.
  • Make find_hash_factor easier to use if you don't have the crate source checked out.

@hendrikvanantwerpen hendrikvanantwerpen self-assigned this Sep 27, 2024
@hendrikvanantwerpen hendrikvanantwerpen merged commit a26c577 into main Sep 30, 2024
3 checks passed
@hendrikvanantwerpen hendrikvanantwerpen deleted the expose-hash-factor branch September 30, 2024 15:33
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.

2 participants