From 72247614bb2a3d9781c4326cd19029f3fe3e43f8 Mon Sep 17 00:00:00 2001 From: austinvhuang Date: Tue, 12 Mar 2024 15:10:44 -0400 Subject: [PATCH] fix prefill feedback off-by-1, update fetch commit hash --- examples/hello_world/CMakeLists.txt | 2 +- run.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/hello_world/CMakeLists.txt b/examples/hello_world/CMakeLists.txt index 9d44f04..292c80c 100644 --- a/examples/hello_world/CMakeLists.txt +++ b/examples/hello_world/CMakeLists.txt @@ -33,7 +33,7 @@ if (BUILD_MODE STREQUAL "local") # Relative path to gemma.cpp from examples/hello_world/build/ FetchContent_Declare(gemma SOURCE_DIR ../../..) else() - FetchContent_Declare(gemma GIT_REPOSITORY https://github.com/google/gemma.cpp.git GIT_TAG 8c7b2cf61b9794b806de091685dc6739dd3db837) + FetchContent_Declare(gemma GIT_REPOSITORY https://github.com/google/gemma.cpp.git GIT_TAG a9aa63fd2ea6b786ed0706d619588bfe2d43370e) endif() FetchContent_MakeAvailable(gemma) diff --git a/run.cc b/run.cc index 8bc0910..d6bf22d 100644 --- a/run.cc +++ b/run.cc @@ -119,7 +119,7 @@ void ReplGemma(gcpp::Gemma& model, gcpp::KVCache& kv_cache, verbosity](int token, float) { ++abs_pos; ++current_pos; - if (current_pos <= prompt_size) { + if (current_pos < prompt_size) { std::cerr << "." << std::flush; } else if (token == gcpp::EOS_ID) { if (!args.multiturn) {