Add missing log that point to a failed Generation

This commit is contained in:
Charles Chan 2024-03-14 10:03:25 +08:00 committed by GitHub
parent 0221956b2e
commit 46c1aca304
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 0 deletions

View File

@ -584,6 +584,9 @@ void GenerateImpl(GemmaImpl<TConfig>& gemma, size_t max_tokens,
} else if ((prompt.size() + max_generated_tokens) > max_tokens) {
std::cout << "Warning: Prompt size + max_new_tokens exceeds max_tokens."
<< std::endl;
} else if (pos >= max_tokens) {
std::cout << "Warning: pos exceeds max_tokens."
<< std::endl;
}
}