Skip to content

Add heuristic algorithm for speculative #3006

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
merged 6 commits into from
Sep 14, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
speculative : be more rewarding upon guessing max drafted tokens
  • Loading branch information
ggerganov committed Sep 5, 2023
commit d9559b78f3bea1a95b927eca685641c4c0082fc5
4 changes: 2 additions & 2 deletions examples/speculative/speculative.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,8 @@ int main(int argc, char ** argv) {
LOG("all_accepted = %d\n", all_accepted);

if (all_accepted && n_draft == n_dradt_cur) {
LOG(" - max drafted tokens accepted - n_draft += 2\n");
n_draft += 2;
LOG(" - max drafted tokens accepted - n_draft += 8\n");
n_draft = std::min(30, n_draft + 8);
} else if (all_accepted) {
LOG(" - partially drafted tokens accepted - no change\n");
} else {
Expand Down