[model-gateway] Add model scope support and LRU eviction for GPU-constrained environments (#16525)

This commit is contained in:
Simo Lin
2026-01-05 18:28:07 -08:00
committed by GitHub
parent 76c71d1d34
commit 402a0bd6dc
10 changed files with 1122 additions and 245 deletions
@@ -10,7 +10,8 @@ Requirements:
Configuration via markers:
@pytest.mark.model("model-id") # Override default model
@pytest.mark.pd(num_prefill=2, num_decode=2) # Custom worker counts
@pytest.mark.workers(prefill=2, decode=2) # Custom worker counts
@pytest.mark.gateway(policy="round_robin") # Gateway configuration
Usage:
# Basic (1 prefill + 1 decode)
@@ -42,7 +43,7 @@ class TestPDMMLU:
Runs MMLU with 1 prefill + 1 decode worker and validates
accuracy meets threshold (>= 0.65).
"""
backend, model, client = setup_backend
backend, model, client, *_ = setup_backend
base_url = str(client.base_url).rstrip("/v1")
args = SimpleNamespace(