You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I hit a boundary-condition issue when hosting an SGLang server.
Error message:
Requested token count exceeds the model's maximum context length of 16384 tokens. You requested a total of 16384 tokens: 14860 tokens from the input messages and 1524 tokens for the completion.
In this case, input_token_num + max_new_tokens == 16384 (exactly equal to the max context length), but the request is still rejected.
Could you explain why the check is >= _max_req_len rather than > _max_req_len? Thank U.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I hit a boundary-condition issue when hosting an SGLang server.
Error message:
Requested token count exceeds the model's maximum context length of 16384 tokens. You requested a total of 16384 tokens: 14860 tokens from the input messages and 1524 tokens for the completion.In this case, input_token_num + max_new_tokens == 16384 (exactly equal to the max context length), but the request is still rejected.
Could you explain why the check is >= _max_req_len rather than > _max_req_len? Thank U.
sglang/python/sglang/srt/managers/tokenizer_manager.py
Lines 746 to 771 in e6d5a21
Beta Was this translation helpful? Give feedback.
All reactions