Repository navigation
[Metrics] Expose cached prompt tokens by cache tier - #56318
Conversation
|
This pull request has merge conflicts that must be resolved before it can be |
798e721 to
2f4cd9d
Compare
|
This pull request has merge conflicts that must be resolved before it can be |
|
FYI we already have: These are per tier type labeled. |
2f4cd9d to
4072c5a
Compare
@orozery Yes, I saw this. Afaik this is only for tiered and doesn't exactly answer the question of "how many cached prompt tokens came from each tier" rather how many qere queried in each tier. I am trying to add a simple way to declare which abstract source a cached token came from across all connectors. |
|
This pull request has merge conflicts that must be resolved before it can be |
|
/ci run |
|
❌ @cquil11, A reviewer with write access must run |
|
✅ @cquil11, CI is now available for this PR.
|
|
/ci run |
|
✅ Triggered Buildkite CI #92966 for commit |
|
/ci retry |
|
✅ Queued 1 failed job(s) for retry in Buildkite CI #92966. |
|
/ci retry |
|
✅ Queued 1 failed job(s) for retry in Buildkite CI #92966. |
|
/ci retry |
|
✅ Queued 1 failed job(s) for retry in Buildkite CI #92966. |
|
/ci retry |
|
✅ Queued 1 failed job(s) for retry in Buildkite CI #92966. |
robertgshaw2-redhat
left a comment
There was a problem hiding this comment.
metrics side and scheduler side lgtm. I dont know enough about offloadingconnector to really review it in detail
|
thanks for simplifying this PR, it looks really good now |
…et_load_source in offloading connector test mock Root cause: vllm#56318 wraps manager.get_load_source() in CacheHitSource(); our MagicMock manager returns a Mock, so ValueError Upstream: vllm-project/vllm#56318 Fix: MockOffloadingSpec manager returns CacheHitSource.EXTERNAL_UNSPECIFIED from get_load_source, mirroring upstream utils.py Signed-off-by: Paweł Olejniczak <pawelx.olejniczak@intel.com>
…et_load_source in offloading connector test mock Root cause: vllm#56318 wraps manager.get_load_source() in CacheHitSource(); our MagicMock manager returns a Mock, so ValueError Upstream: vllm-project/vllm#56318 Fix: MockOffloadingSpec manager returns CacheHitSource.EXTERNAL_UNSPECIFIED from get_load_source, mirroring upstream utils.py Signed-off-by: Paweł Olejniczak <pawelx.olejniczak@intel.com>
…et_load_source in offloading connector test mock Root cause: vllm#56318 wraps manager.get_load_source() in CacheHitSource(); our MagicMock manager returns a Mock, so ValueError Upstream: vllm-project/vllm#56318 Fix: MockOffloadingSpec manager returns CacheHitSource.EXTERNAL_UNSPECIFIED from get_load_source, mirroring upstream utils.py Signed-off-by: Paweł Olejniczak <pawelx.olejniczak@intel.com>
…et_load_source in offloading connector test mock Root cause: vllm#56318 wraps manager.get_load_source() in CacheHitSource(); our MagicMock manager returns a Mock, so ValueError Upstream: vllm-project/vllm#56318 Fix: MockOffloadingSpec manager returns CacheHitSource.EXTERNAL_UNSPECIFIED from get_load_source, mirroring upstream utils.py Signed-off-by: Paweł Olejniczak <pawelx.olejniczak@intel.com>
…et_load_source in offloading connector test mock Root cause: vllm#56318 wraps manager.get_load_source() in CacheHitSource(); our MagicMock manager returns a Mock, so ValueError Upstream: vllm-project/vllm#56318 Fix: MockOffloadingSpec manager returns CacheHitSource.EXTERNAL_UNSPECIFIED from get_load_source, mirroring upstream utils.py Signed-off-by: Paweł Olejniczak <pawelx.olejniczak@intel.com>
… chat_utils helpers, Drop HPU SeedOss (+5 more) (#1880) This PR consolidates 7 hourly-CI fixes against vllm@`8d7b93fec2eb72ce01f2217472ac1f51b9bce600`. ## Bug 1: Import chat_utils helpers from vllm.renderers.chat_utils - **State machine id**: missing_module_vllm_entrypoints_chat_utils - **Commit**: 6607e1b ### Root cause vllm#60522 (c1692c85f1) moved vllm/entrypoints/chat_utils.py to vllm/renderers/chat_utils.py; two vllm-gaudi imports still use the old path ### Culprit Probable culprit: [PR #60522](vllm-project/vllm#60522) - pinned by symbol archaeology, bisect not run. Candidate range: [compare](vllm-project/vllm@ac7f3e1...8d7b93f). ### Fix switch load_chat_template and make_tool_call_id imports to vllm.renderers.chat_utils (both defined at pinned sha) ## Bug 2: Drop HPU SeedOss override and kernel_block_sizes removed upstream - **State machine id**: missing_module_vllm_model_executor_models_seed_oss - **Commit**: d4aece7 ### Root cause vllm#59701 (6e4efafc6e) deleted vllm.model_executor.models.seed_oss, which vllm_gaudi.models.seed_oss subclassed, so register_model() fails; with that fixed, engine init fails because vllm#57169 (02e55d2af3) removed kernel_block_sizes and the KV-to-kernel block split from MultiGroupBlockTable ### Culprit Probable culprit: [PR #59701](vllm-project/vllm#59701) - pinned by symbol archaeology, bisect not run. Candidate range: [compare](vllm-project/vllm@ac7f3e1...8d7b93f). ### Fix delete pass-through HpuSeedOssForCausalLM and its registration (upstream serves SeedOss via the Transformers backend); stop passing kernel_block_sizes, and raise NotImplementedError when a group's kernel block size differs from its KV block size, the split upstream no longer performs ## Bug 3: Stub get_load_source in offloading connector test mock - **State machine id**: hpu_unit_tests - **Commit**: 56ef9c0 ### Root cause vllm#56318 wraps manager.get_load_source() in CacheHitSource(); our MagicMock manager returns a Mock, so ValueError ### Culprit Probable culprit: [PR #56318](vllm-project/vllm#56318) - pinned by symbol archaeology, bisect not run. ### Fix MockOffloadingSpec manager returns CacheHitSource.EXTERNAL_UNSPECIFIED from get_load_source, mirroring upstream utils.py ## Bug 4: Use vLLM LayerNorm in the regional compilation unit test - **State machine id**: hpu_unit_tests_2 - **Commit**: aa162a6 ### Root cause vllm#57172 replaced torch nn.LayerNorm in OPT with vllm's CustomOp LayerNorm, so the test's torch LayerNorm filter matches nothing ### Culprit Regression introduced by [PR #57172](vllm-project/vllm#57172). ### Fix import LayerNorm from vllm.model_executor.layers.layernorm, which OPT now builds its norms from ## Bug 5: Split KV blocks into kernel blocks in an HPU block table - **State machine id**: multigroup_block_table_kernel_block_sizes_removed - **Commit**: 31c5fa1 ### Root cause vllm#57169 dropped kernel_block_sizes and virtual block splitting from MultiGroupBlockTable/BlockTable; HPU InputBatch still passes it ### Culprit Probable culprit: [PR #57169](vllm-project/vllm#57169) - pinned by symbol archaeology, bisect not run. ### Fix add HPUMultiGroupBlockTable: tables built at kernel block size, manager block ids expanded to kernel ids on append/add_row, replacing the NotImplementedError split guard ## Bug 6: Accept list block ids in the HPU block table - **State machine id**: pre_commit - **Commit**: 8abe42f ### Root cause HPUMultiGroupBlockTable typed add_row/append_row block_ids as tuple[list[int], ...] like upstream, but HPU InputBatch passes the request's list[list[int]], which mypy rejects now that the subclass is local ### Culprit Upstream culprit: not identified - no candidate range recovered (see investigation notes). ### Fix type block_ids as Sequence[list[int]] in add_row, append_row and _to_kernel_blocks; runtime is unchanged ## Bug 7: Accept kv_cache_spec in HPU get_supported_kernel_block_sizes - **State machine id**: hpu_pd_tests - **Commit**: c78bc81 ### Root cause vllm#53175 added kv_cache_spec to get_supported_kernel_block_sizes; attention.py passes it positionally, HPU overrides take none ### Culprit Probable culprit: [PR #53175](vllm-project/vllm#53175) - pinned by symbol archaeology, bisect not run. ### Fix add optional kv_cache_spec=None parameter to both HPU backend overrides, matching the upstream base signature --------- Signed-off-by: Paweł Olejniczak <pawelx.olejniczak@intel.com>
Signed-off-by: Cam Quilici <cjquilici@gmail.com> Signed-off-by: Cam Quilici <cameron@semianalysis.com> Co-authored-by: Cam Quilici <cameron@semianalysis.com> Co-authored-by: Nick Hill <nickhill123@gmail.com> Co-authored-by: Yifan Qiao <yifanqiao@inferact.ai>
Changes
vllm:prompt_tokens_cached_by_source_total{source}with five values:device,host,p2p,disk,external_unspecified.PrefixCacheStatspath. Connectors return typed counts throughget_external_cache_hit_sources. Incorrect totals fall back toexternal_unspecifiedwith a one-time warning.hostordisk. NIXL, Mooncake transfer and MoRIIO reportp2p. Mooncake Store and uninstrumented connectors reportexternal_unspecified. MultiConnector delegates to the selected connector.disk. Missing attribution reportsexternal_unspecified. Promotion preserves the initiating request's original tier.Closes #53368.
Validation
Passed Run Sweep: DeepSeek-V4-Pro, one-hour AIPerf AgentX profiles, evaluations disabled. AIPerf scraped Prometheus. JSON/CSV source counts and accounting checks passed.
GPU tests used
bd57138fwith the separate promotion-policy backport. The subsequent rebase changed no attribution logic.