We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1d51ce4 commit 619c1a2Copy full SHA for 619c1a2
examples/main/main.cpp
@@ -544,7 +544,7 @@ int main(int argc, char ** argv) {
544
// if we run out of context:
545
// - take the n_keep first tokens from the original prompt (via n_past)
546
// - take half of the last (n_ctx - n_keep) tokens and recompute the logits in batches
547
- if (n_past + (int) embd.size() + std::max<int>(0, guidance_offset) > n_ctx) {
+ if (n_past + (int) embd.size() + std::max<int>(0, guidance_offset) >= n_ctx) {
548
if (params.n_predict == -2) {
549
LOG_TEE("\n\n%s: context full and n_predict == -%d => stopping\n", __func__, params.n_predict);
550
break;
0 commit comments