From 3d6ed185420204d2c41bce1a34a134545ef75bfb Mon Sep 17 00:00:00 2001 From: Jan Ploski Date: Fri, 16 Jun 2023 19:53:38 +0200 Subject: [PATCH] Correction to 4a37251a - since we did not insert the bos token, do not need attempt to rescue it during context swap --- examples/falcon/falcon_main.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/examples/falcon/falcon_main.cpp b/examples/falcon/falcon_main.cpp index a20bb655a..f0415a65b 100644 --- a/examples/falcon/falcon_main.cpp +++ b/examples/falcon/falcon_main.cpp @@ -359,9 +359,6 @@ int main(int argc, char ** argv) { if (n_past + (int) embd.size() > n_ctx) { const int n_left = n_past - params.n_keep; - // always keep the first token - BOS - n_past = std::max(1, params.n_keep); - // insert n_left/2 tokens at the start of embd from last_n_tokens embd.insert(embd.begin(), last_n_tokens.begin() + n_ctx - n_left/2 - embd.size(), last_n_tokens.end() - embd.size());