Allow prefill only run by allowing max_prompt_size == seq_len

PiperOrigin-RevId: 827415258
This commit is contained in:
Charles Zhao 2025-11-03 03:17:22 -08:00 committed by Copybara-Service
parent ab87807a4c
commit 3a63a12624
1 changed files with 1 additions and 1 deletions

View File

@ -511,7 +511,7 @@ static void GenerateT(const ModelConfig& config,
// We use a single divisor, so all sequence lengths must be the same. // We use a single divisor, so all sequence lengths must be the same.
HWY_ASSERT(qbatch.KV(qi).SeqLen() == seq_len); HWY_ASSERT(qbatch.KV(qi).SeqLen() == seq_len);
} }
if (max_prompt_size >= seq_len) { if (max_prompt_size > seq_len) {
HWY_ABORT("max_prompt_size = %zu, increase --seq_len to at least that.", HWY_ABORT("max_prompt_size = %zu, increase --seq_len to at least that.",
max_prompt_size); max_prompt_size);
} }