From c8880e786cfa44c6879b0cdc398feeaffebbfafb Mon Sep 17 00:00:00 2001 From: Georgi Gerganov Date: Sun, 24 Nov 2024 12:53:48 +0200 Subject: [PATCH] speculative : fix compile warning --- common/speculative.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/speculative.cpp b/common/speculative.cpp index 4222234de..9d2c8504b 100644 --- a/common/speculative.cpp +++ b/common/speculative.cpp @@ -170,7 +170,7 @@ llama_tokens common_speculative_gen_draft( for (int i = reuse_i + reuse_n + 1; i < (int) prompt.size(); ++i) { result.push_back(prompt[i]); - if (result.size() >= params.n_draft) { + if (params.n_draft <= (int) result.size()) { break; } }