vllm-sr 0.1.0b2.dev20260204070724__py3-none-any.whl → 0.1.0b2.dev20260204090051__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cli/merger.py +13 -1
- cli/models.py +2 -1
- cli/templates/config.template.yaml +74 -7
- {vllm_sr-0.1.0b2.dev20260204070724.dist-info → vllm_sr-0.1.0b2.dev20260204090051.dist-info}/METADATA +1 -1
- {vllm_sr-0.1.0b2.dev20260204070724.dist-info → vllm_sr-0.1.0b2.dev20260204090051.dist-info}/RECORD +8 -8
- {vllm_sr-0.1.0b2.dev20260204070724.dist-info → vllm_sr-0.1.0b2.dev20260204090051.dist-info}/WHEEL +0 -0
- {vllm_sr-0.1.0b2.dev20260204070724.dist-info → vllm_sr-0.1.0b2.dev20260204090051.dist-info}/entry_points.txt +0 -0
- {vllm_sr-0.1.0b2.dev20260204070724.dist-info → vllm_sr-0.1.0b2.dev20260204090051.dist-info}/top_level.txt +0 -0
cli/merger.py
CHANGED
|
@@ -154,8 +154,20 @@ def translate_latency_signals(latencies: list) -> list:
|
|
|
154
154
|
for signal in latencies:
|
|
155
155
|
rule = {
|
|
156
156
|
"name": signal.name,
|
|
157
|
-
"max_tpot": signal.max_tpot,
|
|
158
157
|
}
|
|
158
|
+
# At least one of tpot_percentile or ttft_percentile should be set
|
|
159
|
+
if signal.tpot_percentile is not None and signal.tpot_percentile > 0:
|
|
160
|
+
rule["tpot_percentile"] = signal.tpot_percentile
|
|
161
|
+
if signal.ttft_percentile is not None and signal.ttft_percentile > 0:
|
|
162
|
+
rule["ttft_percentile"] = signal.ttft_percentile
|
|
163
|
+
|
|
164
|
+
# Validate that at least one is set
|
|
165
|
+
if "tpot_percentile" not in rule and "ttft_percentile" not in rule:
|
|
166
|
+
log.warn(
|
|
167
|
+
f"Latency signal '{signal.name}' has neither tpot_percentile nor ttft_percentile set, skipping"
|
|
168
|
+
)
|
|
169
|
+
continue
|
|
170
|
+
|
|
159
171
|
if signal.description:
|
|
160
172
|
rule["description"] = signal.description
|
|
161
173
|
rules.append(rule)
|
cli/models.py
CHANGED
|
@@ -177,14 +177,48 @@ signals:
|
|
|
177
177
|
- name: "ja"
|
|
178
178
|
description: "Japanese language queries"
|
|
179
179
|
|
|
180
|
-
# latency - Latency-based routing signals (TPOT-based)
|
|
180
|
+
# latency - Latency-based routing signals (TPOT and TTFT percentile-based)
|
|
181
|
+
# Percentile-based rules adapt to each model's actual performance distribution
|
|
182
|
+
# Works with any number of observations (1+): uses average for 1-2, percentile for 3+
|
|
183
|
+
#
|
|
184
|
+
# ⚠️ RECOMMENDATION: Use BOTH tpot_percentile AND ttft_percentile for comprehensive latency evaluation
|
|
185
|
+
# - TPOT: Measures token generation speed (throughput)
|
|
186
|
+
# - TTFT: Measures first token latency (user-perceived latency)
|
|
187
|
+
# - Together: Complete latency picture for optimal routing decisions
|
|
188
|
+
#
|
|
189
|
+
# You CAN use only one if needed for specific use cases:
|
|
190
|
+
# - TPOT only: Batch processing, cost optimization (throughput matters)
|
|
191
|
+
# - TTFT only: Real-time chat (user perception matters)
|
|
192
|
+
# - Both: RECOMMENDED for most applications (comprehensive evaluation)
|
|
193
|
+
#
|
|
194
|
+
# At least one of tpot_percentile or ttft_percentile must be set (validation requirement)
|
|
195
|
+
# When both are set, model must meet BOTH thresholds (AND logic)
|
|
181
196
|
latency:
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
197
|
+
# Example 1: RECOMMENDED - Both TPOT and TTFT percentiles (comprehensive latency evaluation)
|
|
198
|
+
- name: "low_latency_comprehensive"
|
|
199
|
+
tpot_percentile: 10 # 10th percentile for TPOT (top 10% fastest token generation)
|
|
200
|
+
ttft_percentile: 10 # 10th percentile for TTFT (top 10% fastest first token)
|
|
201
|
+
description: "RECOMMENDED: For real-time applications - fast start and fast generation"
|
|
202
|
+
|
|
203
|
+
# Example 2: Different percentiles for different priorities
|
|
204
|
+
- name: "balanced_latency"
|
|
205
|
+
tpot_percentile: 50 # Median TPOT (top 50%)
|
|
206
|
+
ttft_percentile: 10 # Top 10% TTFT (prioritize fast start)
|
|
207
|
+
description: "Prioritize fast start, accept moderate generation speed"
|
|
208
|
+
|
|
209
|
+
# Example 3: TPOT percentile only (use case: batch processing, cost optimization)
|
|
210
|
+
# ⚠️ Note: Only using one metric is allowed but not recommended for most use cases
|
|
211
|
+
- name: "batch_processing_optimized"
|
|
212
|
+
tpot_percentile: 10 # 10th percentile for TPOT (top 10% fastest token generation)
|
|
213
|
+
# ttft_percentile: not set - acceptable for batch processing where throughput matters
|
|
214
|
+
description: "For batch processing where throughput (TPOT) is critical, TTFT less important"
|
|
215
|
+
|
|
216
|
+
# Example 4: TTFT percentile only (use case: real-time chat where first token matters)
|
|
217
|
+
# ⚠️ Note: Only using one metric is allowed but not recommended for most use cases
|
|
218
|
+
- name: "chat_fast_start"
|
|
219
|
+
ttft_percentile: 10 # 10th percentile for TTFT (top 10% fastest first token)
|
|
220
|
+
# tpot_percentile: not set - acceptable for chat apps where user perception matters
|
|
221
|
+
description: "For chat applications where fast first token (TTFT) is critical for UX"
|
|
188
222
|
|
|
189
223
|
# context - Context length signals (Token Count)
|
|
190
224
|
context:
|
|
@@ -431,6 +465,39 @@ decisions:
|
|
|
431
465
|
enabled: true
|
|
432
466
|
similarity_threshold: 0.85
|
|
433
467
|
|
|
468
|
+
# Latency-based routing example: Route to models that meet latency requirements
|
|
469
|
+
- name: "low_latency_route"
|
|
470
|
+
description: "Route to models with low latency (fast TPOT and TTFT)"
|
|
471
|
+
priority: 90
|
|
472
|
+
rules:
|
|
473
|
+
operator: "AND"
|
|
474
|
+
conditions:
|
|
475
|
+
- type: "latency"
|
|
476
|
+
name: "low_latency_comprehensive" # Requires both TPOT and TTFT percentiles
|
|
477
|
+
modelRefs:
|
|
478
|
+
- model: "openai/gpt-oss-120b"
|
|
479
|
+
use_reasoning: false
|
|
480
|
+
plugins:
|
|
481
|
+
- type: "system_prompt"
|
|
482
|
+
configuration:
|
|
483
|
+
system_prompt: "Provide fast, concise responses suitable for real-time applications."
|
|
484
|
+
|
|
485
|
+
- name: "fast_start_route"
|
|
486
|
+
description: "Route to models with fast first token (prioritize TTFT for chat apps)"
|
|
487
|
+
priority: 85
|
|
488
|
+
rules:
|
|
489
|
+
operator: "AND"
|
|
490
|
+
conditions:
|
|
491
|
+
- type: "latency"
|
|
492
|
+
name: "chat_fast_start" # Only requires TTFT percentile
|
|
493
|
+
modelRefs:
|
|
494
|
+
- model: "openai/gpt-oss-120b"
|
|
495
|
+
use_reasoning: false
|
|
496
|
+
plugins:
|
|
497
|
+
- type: "system_prompt"
|
|
498
|
+
configuration:
|
|
499
|
+
system_prompt: "Start responding quickly. User is waiting for immediate feedback."
|
|
500
|
+
|
|
434
501
|
# Size-aware routing example: Try smaller models first, escalate if confidence is low
|
|
435
502
|
- name: "confidence_route"
|
|
436
503
|
description: "Cost-efficient routing: try small model first, escalate if needed"
|
{vllm_sr-0.1.0b2.dev20260204070724.dist-info → vllm_sr-0.1.0b2.dev20260204090051.dist-info}/RECORD
RENAMED
|
@@ -6,8 +6,8 @@ cli/defaults.py,sha256=x3mdZPBtI74bzgO5UDL-xoNV5jh9uPeSDcfgnkWHVyA,1969
|
|
|
6
6
|
cli/docker_cli.py,sha256=kj3VvNfUJwcizZQj63mB2yLBBUbvZ9P3MtleIXhTp0M,25230
|
|
7
7
|
cli/logo.py,sha256=I0qnCCGyOsHmN6MRgqa_c07MZSArv_6eHcHAL36V0Eg,1512
|
|
8
8
|
cli/main.py,sha256=-PkXZw_z0VtzLbA5BCQlvLTYRuNbAT0CcBSFvjrsmBo,9137
|
|
9
|
-
cli/merger.py,sha256=
|
|
10
|
-
cli/models.py,sha256=
|
|
9
|
+
cli/merger.py,sha256=Cd3DHt5_bMAw6oxSMtu5Debd6gCCRb0wjj-RTZSrZw4,17172
|
|
10
|
+
cli/models.py,sha256=IOpG-XtLZtVDzQVIVd_PyLvMj_5BJDAt4R7kYBqr7Wo,13532
|
|
11
11
|
cli/parser.py,sha256=lFPrROAYyc2cPoMMULV2sPid5IklIvc8zpDekj5Pocw,5653
|
|
12
12
|
cli/utils.py,sha256=CHMwSZC-zxrxCnlZqiyzF2CToCVB5tHku2zyYig8fo0,3787
|
|
13
13
|
cli/validator.py,sha256=G49I8_vyg0HvfI2LHwFlOagTwWAEsIkIDzX5riYoZhA,10651
|
|
@@ -19,7 +19,7 @@ cli/commands/serve.py,sha256=vsK3T4uWx49CPTgy4sc6oM7F5riq0sNbyiT7KbS37Wc,6104
|
|
|
19
19
|
cli/commands/show_config.py,sha256=emkIdH9LKbzMzxna3Lxl-hEG85isfAXY5BlZjP_vaIM,4689
|
|
20
20
|
cli/commands/show_defaults.py,sha256=r95KOHKQWeeNnoFO5EmCUZSPeOKb-5NzCoaZ6CaBcIw,701
|
|
21
21
|
cli/commands/validate.py,sha256=Chm_MfyJMESiOo6IXiroYwMUkm8HCI26OHYYUBkGXGk,2773
|
|
22
|
-
cli/templates/config.template.yaml,sha256=
|
|
22
|
+
cli/templates/config.template.yaml,sha256=8qnnyWiSLT7EkCFWK_O3qyHqvzfY_Q8GjmcbF13-e3k,22012
|
|
23
23
|
cli/templates/envoy.template.yaml,sha256=j43mxQ3NcFMlmbGyrDM0-1rvQkC1N4MpXUC2o7SLT9g,8293
|
|
24
24
|
cli/templates/generate_dashboard.py,sha256=gCui1rPrxUFIeioebyQ_JhL7zbjoEAg8GjUJcWXHcys,24233
|
|
25
25
|
cli/templates/grafana-dashboard.serve.yaml,sha256=o1H5xx60esBzk19qnMQtX4LmL5DswpMvOO7cO09Q3kI,350
|
|
@@ -30,8 +30,8 @@ cli/templates/llm-router-dashboard.serve.json,sha256=pwnTjUh7z3_3LnIwtaLXjDWH4aH
|
|
|
30
30
|
cli/templates/prometheus.serve.yaml,sha256=MGYq8dlRq_i2m5sogQ--kwTvJpkf44QQoCNoI7oyVT8,270
|
|
31
31
|
cli/templates/router-defaults.yaml,sha256=a0riw9juttoBr4G7rtUEJA2FY9TgAvK-8mngWGCCIoc,9373
|
|
32
32
|
cli/templates/tools_db.json,sha256=CPqPBkd5nc966m1YEozz06frrmv3Pd5rrkxKkO3rTiA,4537
|
|
33
|
-
vllm_sr-0.1.0b2.
|
|
34
|
-
vllm_sr-0.1.0b2.
|
|
35
|
-
vllm_sr-0.1.0b2.
|
|
36
|
-
vllm_sr-0.1.0b2.
|
|
37
|
-
vllm_sr-0.1.0b2.
|
|
33
|
+
vllm_sr-0.1.0b2.dev20260204090051.dist-info/METADATA,sha256=DoGzgyB-bYglhYLedrBqXLTlhB2RqF8rN1qosDC8SGQ,7298
|
|
34
|
+
vllm_sr-0.1.0b2.dev20260204090051.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
35
|
+
vllm_sr-0.1.0b2.dev20260204090051.dist-info/entry_points.txt,sha256=WhlBPbLHUpWUsMuUQX9cnvsYMf0ih5i57vvJ1jJNi0k,42
|
|
36
|
+
vllm_sr-0.1.0b2.dev20260204090051.dist-info/top_level.txt,sha256=2ImG917oaVHlm0nP9oJE-Qrgs-fq_fGWgba2H1f8fpE,4
|
|
37
|
+
vllm_sr-0.1.0b2.dev20260204090051.dist-info/RECORD,,
|
{vllm_sr-0.1.0b2.dev20260204070724.dist-info → vllm_sr-0.1.0b2.dev20260204090051.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|