[Spec][Ngram]: Add output-as-corpus and distractor corporas to benchmark dynamic spec tokens allocation#22569
Open
kpham-sgl wants to merge 11 commits intosgl-project:mainfrom
Open
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
5 tasks
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
19 tasks
7265a6f to
07a69a6
Compare
5 tasks
Collaborator
Author
|
/rerun-test test/registered/spec/test_ngram_speculative_decoding.py |
Contributor
|
✅ |
Collaborator
Author
|
/rerun-test test/registered/spec/test_ngram_speculative_decoding.py |
Contributor
|
✅ |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
Part of Ngram series #21052
Following #22538. Verify that allowing dynamic spec token allocation across Trie and SAMs bring benefit
Modifications
Add the benchmark
same prompt set:
trieOnly(no external corpus loaded, draft tokens come only from Trie),samOnly(load strong matching external suffix-automaton corpus and rerun the same prompts), andsamPlusDistractors(keep that matching SAM, then add extra irrelevant SAM corpora). The metric isavg_spec_accept_length, i.e. the average number of speculative tokensaccepted per verify step.
samOnlyimproves accept length from2.13to6.64(3.12xvs.trieOnly).5.90/5.92(~89%ofsamOnly), showing the new trie/SAM ranking preserves the strong matching corpus instead of collapsing back toward the trie-only baseline.Accuracy Tests
This is the accuracy test for #22538
Speed Tests and Profiling
This is the speed test for #22538
Checklist
Review and Merge Process
/tag-and-rerun-ci,/tag-run-ci-label,/rerun-failed-ci