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
I discovered that in sglang.srt.model_config.ModelConfig, the default value of maximum context length is borrowed from the HuggingFace configurations.
The function sglang.srt.hf_transformers_utils.get_context_length checks for the existence of candidates in the following order: max_sequence_length > seq_length > max_position_embeddings > max_seq_len > model_max_length. Since Cohere Command-R v01 has a 128k context length but also an 8k positional embedding, sglang assumes the model has an 8k context length.
Consequently, mis-indexing of Batch.req_to_token_pool.req_to_token occurred when it tried to generate more than 8k tokens.
To fix this issue, the order of candidates should be reconsidered.
On
sglang.srt.managers.router.infer_batch.Batch
,Batch.prepare_for_decode
triggers a device-side assertion.Issue point was at
sglang/python/sglang/srt/managers/router/infer_batch.py
Line 421 in 39191c8
Below is the crash log; however, apologize that reproduction is not provided.
The text was updated successfully, but these errors were encountered: