[Qwen4Exp] Host-resident token embedding tables (VLLM_HOST_EMBED_TABLE)
Keeps the token embedding table in pinned host memory behind a UVA view for the stage-0 target and the last-stage MTP drafter, freeing GPU memory for KV. TP sharding, masking and the all-reduce are retained. The knob is registered as a compile-cache factor. Co-Authored-By: Hinata <hinata@idihore.id> Signed-off-by: MOVZX <movzx@yahoo.com>
This commit is contained in:
@@ -304,6 +304,12 @@ if TYPE_CHECKING:
|
||||
VLLM_MULTI_STREAM_GEMM_TOKEN_THRESHOLD: int = 1024
|
||||
VLLM_COMPILE_CACHE_SAVE_FORMAT: Literal["binary", "unpacked"] = "binary"
|
||||
VLLM_USE_V2_MODEL_RUNNER: bool | None = None
|
||||
# Compile-cache factor (v2 host-embedding work): the pinned-host UVA embedding
|
||||
# table changes the traced MTP-drafter graph (reads _uva_weight instead of
|
||||
# embed_tokens.weight). Registered here so envs.compile_factors() keys the
|
||||
# AOT cache on it; the layer itself still reads os.environ directly.
|
||||
VLLM_HOST_EMBED_TABLE: bool = False
|
||||
VLLM_PLE_OFFLOAD_READY_TIMEOUT: float = 600.0
|
||||
VLLM_LOG_MODEL_INSPECTION: bool = False
|
||||
VLLM_DEBUG_MFU_METRICS: bool = False
|
||||
VLLM_WEIGHT_OFFLOADING_DISABLE_PIN_MEMORY: bool = False
|
||||
@@ -2118,6 +2124,11 @@ environment_variables: dict[str, Callable[[], Any]] = {
|
||||
"VLLM_USE_V2_MODEL_RUNNER": lambda: maybe_convert_bool(
|
||||
os.getenv("VLLM_USE_V2_MODEL_RUNNER", None)
|
||||
),
|
||||
"VLLM_HOST_EMBED_TABLE": lambda: os.getenv("VLLM_HOST_EMBED_TABLE", "") == "1",
|
||||
# Timeout for PLE weight loading and TP worker registration.
|
||||
"VLLM_PLE_OFFLOAD_READY_TIMEOUT": lambda: float(
|
||||
os.getenv("VLLM_PLE_OFFLOAD_READY_TIMEOUT", "600")
|
||||
),
|
||||
# Log model inspection after loading.
|
||||
# If enabled, logs a transformers-style hierarchical view of the model
|
||||
# with quantization methods and attention backends.
|
||||
|
||||
Reference in New Issue
Block a user