A high-throughput and memory-efficient inference and serving engine for LLMs
[KV Offloading] Remove dummy worker-side stats from OffloadingConnector (#45905)
Signed-off-by: Alex <alex.tech.lab@outlook.com> Signed-off-by: AlexHuang <jihuihuang@alexai.com> Co-authored-by: Or Ozeri <oro@il.ibm.com>
AlexHuang committed
Jun 18, 2026 at 13:13 UTC
421c1ec4483b1db2cc6723a568518dc719ffe837
2 files changed
-21
tests/v1/kv_connector/unit/test_offloading_connector.py
-16
@@ -383,22 +383,6 @@ def test_cpu_offloading_metrics() -> None:
383
total += sample.value
384
return total
385
386
- # Stats are drained asynchronously — if the transfer finishes
387
- # after the last engine step for that generate() call, the metrics
388
- # won't appear until a subsequent step. Retry with dummy generates
389
- # to force additional stats drains.
390
- deadline = time.monotonic() + _RESET_CACHE_TIMEOUT
391
- while time.monotonic() < deadline:
392
- store_bytes = _get_counter_value("vllm:kv_offload_store_bytes")
393
- load_bytes = _get_counter_value("vllm:kv_offload_load_bytes")
394
- if store_bytes > 0 and load_bytes > 0:
395
- break
396
- llm.generate(
397
- [TokensPrompt(prompt_token_ids=[0])],
398
- SamplingParams(max_tokens=1),
399
- use_tqdm=False,
400
- )
401
-
386
# New flat counter metrics
387
store_bytes = _get_counter_value("vllm:kv_offload_store_bytes")
388
assert store_bytes > 0, f"Expected store_bytes > 0, got {store_bytes}"
vllm/distributed/kv_transfer/kv_connector/v1/offloading_connector.py
-5
@@ -190,11 +190,6 @@ class OffloadingConnector(KVConnectorBase_V1, SupportsHMA):
190
def get_kv_connector_stats(self) -> KVConnectorStats | None:
191
if self.connector_scheduler is not None:
192
return self.connector_scheduler.get_stats()
193
-
194
- # TODO(orozery): Remove once PR #43877 lands
195
- if self.connector_worker is not None:
196
- return OffloadingConnectorStats()
197
-
193
return None
194
195
@classmethod