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
# FIXME: ignore this env flag only when HiP + context extension activated
74
-
logger.warning(
75
-
f"Warning: User-specified context_length ({context_length}) is greater than the derived context_length ({derived_context_len}). "
76
-
f"This may lead to incorrect model outputs or CUDA errors."
77
-
)
78
-
self.context_len=context_length
79
-
# if get_bool_env_var("SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN"):
80
-
# else:
81
-
# raise ValueError(
82
-
# f"User-specified context_length ({context_length}) is greater than the derived context_length ({derived_context_len}). "
83
-
# f"This may lead to incorrect model outputs or CUDA errors. Note that the derived context_length may differ from max_position_embeddings in the model's config. "
84
-
# f"To allow overriding this maximum, set the env var SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1"
f"Warning: User-specified context_length ({context_length}) is greater than the derived context_length ({derived_context_len}). "
79
+
f"This may lead to incorrect model outputs or CUDA errors."
80
+
)
81
+
else:
82
+
raiseValueError(
83
+
f"User-specified context_length ({context_length}) is greater than the derived context_length ({derived_context_len}). "
84
+
f"This may lead to incorrect model outputs or CUDA errors. Note that the derived context_length may differ from max_position_embeddings in the model's config. "
85
+
f"To allow overriding this maximum, set the env var SGLANG_ALLOW_OVERWRITE_LONGER_CONTEXT_LEN=1"
0 commit comments