Skip to content

Commit 46c1aca

Browse files
authored
Add missing log that point to a failed Generation
1 parent 0221956 commit 46c1aca

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

gemma.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,9 @@ void GenerateImpl(GemmaImpl<TConfig>& gemma, size_t max_tokens,
584584
} else if ((prompt.size() + max_generated_tokens) > max_tokens) {
585585
std::cout << "Warning: Prompt size + max_new_tokens exceeds max_tokens."
586586
<< std::endl;
587+
} else if (pos >= max_tokens) {
588+
std::cout << "Warning: pos exceeds max_tokens."
589+
<< std::endl;
587590
}
588591
}
589592

0 commit comments

Comments
 (0)