-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Add heap-based BPE merge path for large inputs (>128 bytes) #7580
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
Merged
+246
−1
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
35fd6b9
Initial plan
Copilot d2d5f40
Implement heap-based byte pair encoding for large inputs
Copilot d47b417
Add tests for large input BPE optimization
Copilot dbd8ad2
Address code review feedback - improve test coverage and optimize hea…
Copilot 604bc90
Remove timing-based performance test to prevent CI flakiness
Copilot 8c0543d
Add explanatory comments for threshold and heap capacity choices
Copilot 058c10b
Apply suggestion from @stephentoub
stephentoub 93697d0
Use default capacity for PriorityQueue instead of pre-allocating to max
Copilot 507035a
Apply suggestion from @stephentoub
stephentoub 394658e
Update src/Microsoft.ML.Tokenizers/Utils/BytePairEncoder.cs
stephentoub f339af1
Update src/Microsoft.ML.Tokenizers/Utils/BytePairEncoder.cs
stephentoub a43a57e
Fix CompareTo ordering, revert BOM changes, and update test comments
Copilot bd86b94
Add parameterless PriorityQueue constructor and use it in BytePairEnc…
Copilot 8984a3d
Add comment noting that CurRank assumes rank == token Id (Tiktoken-sp…
Copilot f43f8ee
Remove stackalloc for State array; always use ArrayPool since method …
Copilot 99c5107
Replace List+ToArray with ArrayPool for result buffer in BytePairEnco…
Copilot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.