tiny unify environ usage (#15335)

This commit is contained in:
Liangsheng Yin
2025-12-17 23:31:43 +08:00
committed by GitHub
parent eeb2b9b259
commit 0c00220795
11 changed files with 35 additions and 41 deletions

View File

@@ -3718,9 +3718,9 @@ def reserve_rope_cache_for_long_sequences(
"""Pre-expand RoPE cache for long sequences and speculative decoding."""
from sglang.srt.environ import envs
SAFETY_FACTOR = envs.SGLANG_SPEC_EXPANSION_SAFETY_FACTOR.value
MARGIN = envs.SGLANG_ROPE_CACHE_SAFETY_MARGIN.value
ALIGN = envs.SGLANG_ROPE_CACHE_ALIGN.value
SAFETY_FACTOR = envs.SGLANG_SPEC_EXPANSION_SAFETY_FACTOR.get()
MARGIN = envs.SGLANG_ROPE_CACHE_SAFETY_MARGIN.get()
ALIGN = envs.SGLANG_ROPE_CACHE_ALIGN.get()
# 1) Estimate base context upper bound
base_ctx = (