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

Instead of finding the one pair with the highest frequency and merging it at each step, do the highest N pairs #69

Open
hippietrail opened this issue Apr 23, 2024 · 2 comments

Comments

@hippietrail
Copy link

I've been experimenting with my own little BPE implementations in other programming languages.

It seems that major bottlenecks are counting the frequencies of the pairs each iteration and merging the most frequent one.

I've noticed that instead getting the top two most frequent pairs and merging them each iteration is already a noticeable speedup for me with no noticeable loss of quality.

It should be possible to scale this up quite a bit before hitting diminishing returns or a drop in quality.

@JohannesVod
Copy link

There is no point really in doing this. The algorithm used in this repo is really slow and can be improved to linear time without changing the functionality

@Majdoddin
Copy link

@hippietrail See #78

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

3 participants