Commit afbb4f4
vllm fix check on max vocab size (#22471)
Summary:
the tokenizer.vocab_size and model.vocab_size can be different. For QWen model, the tokenizer max token id is 151643 and the model config is `"vocab_size": 151936`. If we send an id between 151643 and 151936, it'll fail. Though in reality the tokenizer will just put ''.
It's probably still valid to send the ids in between, because the model can legitimately produce such token id.
Test Plan:
Send 151860 and it's passing. Send 152860 and it complained about invalid token.
Rollback Plan:
Reviewed By: tensormeta, houseroad
Differential Revision: D798401141 parent c55bc1d commit afbb4f4
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
382 | 382 | | |
383 | 383 | | |
384 | 384 | | |
385 | | - | |
| 385 | + | |
386 | 386 | | |
387 | 387 | | |
388 | 388 | | |
| |||
0 commit comments