From d9559b78f3bea1a95b927eca685641c4c0082fc5 Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Tue, 5 Sep 2023 08:54:08 +0300 Subject: [PATCH] speculative : be more rewarding upon guessing max drafted tokens --- examples/speculative/speculative.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/speculative/speculative.cpp b/examples/speculative/speculative.cpp index a081da936..a0b836a13 100644 --- a/examples/speculative/speculative.cpp +++ b/examples/speculative/speculative.cpp @@ -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 {