Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy/deepseek_v4/tp4_profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"cache_model_profile": "deepseek-v4-fp8-hma",
"published_runtime_base": "ghcr.io/fujitsupolycom/gb10-vllm-serving@sha256:6fc26fdad81a18f0fff67ce0a05f6d90165625ea2e1cac8a6f39bfb462017028",
"sparkcache": {
"source_sha256": "bc7cae86732c869ee8b2205d48ac5be6f580ee8b77a3e4ffd4c69dcd4f1bfae5"
"source_sha256": "01cc59bf2c45af60f02813b771a484e65829e4f464eb27aa1756ca7067c82c9f"
},
"model": {
"repository": "deepseek-ai/DeepSeek-V4-Flash-0731",
Expand Down
2 changes: 1 addition & 1 deletion deploy/glm52_35bpw/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"published_runtime_base": "ghcr.io/fujitsupolycom/gb10-vllm-serving@sha256:6fc26fdad81a18f0fff67ce0a05f6d90165625ea2e1cac8a6f39bfb462017028",
"base_image_requirement": "exact GLM-5.2 3.5-bpw R7 image recorded by the source container inspection",
"sparkcache": {
"source_sha256": "bc7cae86732c869ee8b2205d48ac5be6f580ee8b77a3e4ffd4c69dcd4f1bfae5"
"source_sha256": "01cc59bf2c45af60f02813b771a484e65829e4f464eb27aa1756ca7067c82c9f"
},
"model": {
"repository": "brandonmusic/GLM-5.2-EXL3-TR3v4-3.5bpw-MTP78",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
],
"contract": {
"path": "sparkcache/runtime_patches/vllm-kv-block-lease-contract-glm53-b12x-kda-adaptive-mtp.json",
"sha256": "6defde9551cbb586fd09bb2d3020495531b6573397875a767eaae1dbad126024"
"sha256": "45d7a92b38b836a4f829f02df85e339cfeea860e1080e4663a8340af6c125125"
},
"result": "All four patches apply in order to the LF source tree, and the eleven-file SparkCache contract verifies the resulting source bytes, including the live-tensor B12X KDA implementation."
}
8 changes: 7 additions & 1 deletion sparkcache/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,13 @@ when placement completes and intentionally excludes that bookkeeping.
`sparkcache-hybrid-page-delta/v1` codec reuses only byte-identical page
prefixes and binds the base snapshot, layout, block counts, and semantic
token boundaries. A boundary inside an HMA page replaces that complete page
while retaining earlier byte-identical pages. The
while retaining earlier byte-identical pages. For an aligned recurrent group,
vLLM may retain the replay-boundary page outside the advancing request block
table. Its `SchedulerOutput.recurrent_boundary_blocks` hand-off names the
pinned physical block by request, group, and token boundary. SparkCache uses
that block only after all three identities and the recurrent topology match;
missing or contradictory metadata skips publication rather than scanning
later running or speculative state. The
`sparkcache-page-delta-manifest/v1` schema embeds its authenticated base
graph, allowing capacity maintenance to retain shared objects after
predecessor roots are removed. Restore reconstructs the verified full
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,13 @@
CONTAINERFILE = ROOT / "deploy/glm53_flash/Containerfile.b12x-kda-adaptive-mtp"
VLLM_COMMIT = "0b67266a0f37d6146a8403fb8482403c62f412d5"
SOURCE_ROLE = "source_built_glm53_b12x_kda_adaptive_mtp"
RECURRENT_BOUNDARY_ROLE = "recurrent_boundary_contract"
RECURRENT_BOUNDARY_FILES = {
"vllm/v1/core/kv_cache_manager.py",
"vllm/v1/core/sched/output.py",
"vllm/v1/core/sched/scheduler.py",
"vllm/v1/core/single_type_kv_cache_manager.py",
}
KDA_PATH = "vllm/model_executor/layers/mamba/gdn/kimi_gdn_linear_attn.py"
E105_KDA_SHA256 = (
"a879af0081f69ba8288ef909e1d69b5bbb85bdff7e5aa0d3c11ad892bfea8410"
Expand Down Expand Up @@ -71,12 +78,24 @@ def test_glm53_b12x_kda_adaptive_mtp_contract_attests_the_complete_sparkcache_vl
"vllm/v1/kv_cache_interface.py",
KDA_PATH,
}
assert all(
set(record["accepted_sha256"]) == {SOURCE_ROLE}
for record in contract["files"]
)
for record in contract["files"]:
expected_roles = {SOURCE_ROLE}
if record["path"] in RECURRENT_BOUNDARY_FILES:
expected_roles.add(RECURRENT_BOUNDARY_ROLE)
assert set(record["accepted_sha256"]) == expected_roles
assert all(record["required_symbols"] for record in contract["files"])

by_path = {record["path"]: record for record in contract["files"]}
assert by_path["vllm/v1/core/sched/output.py"]["accepted_sha256"][
RECURRENT_BOUNDARY_ROLE
] == "9911b3f9d21815a185285852b5a6176e5484e1ab0ff5c30f7caaa68ea0fab543"
assert "SchedulerOutput.recurrent_boundary_blocks" in by_path[
"vllm/v1/core/sched/output.py"
]["required_symbols"]
assert "KVCacheManager.take_recurrent_boundary_blocks" in by_path[
"vllm/v1/core/kv_cache_manager.py"
]["required_symbols"]


def test_glm53_b12x_kda_contract_rejects_the_e105_kda_source(
monkeypatch: pytest.MonkeyPatch,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@
]
},
{
"path": "vllm/v1/core/sched/scheduler.py",
"accepted_sha256": {
"source_built_glm53_b12x_kda_adaptive_mtp": "6d397c97f31e67a75efc01b5ddd89fa58db425de14fa43965ef2d6146b6b9bdb"
"path": "vllm/v1/core/sched/scheduler.py",
"accepted_sha256": {
"source_built_glm53_b12x_kda_adaptive_mtp": "6d397c97f31e67a75efc01b5ddd89fa58db425de14fa43965ef2d6146b6b9bdb",
"recurrent_boundary_contract": "260f36ce8fabf70c193b20009ea465eea7b1b6c8e9fb72f2307a01ba8fcf7b2a"
},
"required_symbols": [
"Scheduler.schedule",
Expand All @@ -39,9 +40,10 @@
]
},
{
"path": "vllm/v1/core/kv_cache_manager.py",
"accepted_sha256": {
"source_built_glm53_b12x_kda_adaptive_mtp": "ee03dc9ce2b720c0be6e9f572d23580ba96eff68fe3406250557e83071654af0"
"path": "vllm/v1/core/kv_cache_manager.py",
"accepted_sha256": {
"source_built_glm53_b12x_kda_adaptive_mtp": "ee03dc9ce2b720c0be6e9f572d23580ba96eff68fe3406250557e83071654af0",
"recurrent_boundary_contract": "c5b83d382c96b2bf8c466a993ed77123a14a971e2661797128533319388d0b5f"
},
"required_symbols": [
"KVCacheManager.get_block_ids",
Expand All @@ -51,17 +53,20 @@
"KVCacheManager.expire_shared_prefix_leases",
"KVCacheManager.discard_shared_prefix_lease",
"KVCacheManager.evict_shared_prefix_leases_until_free",
"KVCacheManager.take_kv_cache_block_copies"
"KVCacheManager.take_kv_cache_block_copies",
"KVCacheManager.take_recurrent_boundary_blocks"
]
},
{
"path": "vllm/v1/core/sched/output.py",
"accepted_sha256": {
"source_built_glm53_b12x_kda_adaptive_mtp": "65235eba652e5a3ccee18bf3cbfeac9bf4da8fb9c61e961580f612cfb7e593bc"
"path": "vllm/v1/core/sched/output.py",
"accepted_sha256": {
"source_built_glm53_b12x_kda_adaptive_mtp": "65235eba652e5a3ccee18bf3cbfeac9bf4da8fb9c61e961580f612cfb7e593bc",
"recurrent_boundary_contract": "9911b3f9d21815a185285852b5a6176e5484e1ab0ff5c30f7caaa68ea0fab543"
},
"required_symbols": [
"SchedulerOutput.preempted_req_ids",
"SchedulerOutput.kv_cache_block_copies"
"SchedulerOutput.kv_cache_block_copies",
"SchedulerOutput.recurrent_boundary_blocks"
]
},
{
Expand Down Expand Up @@ -96,9 +101,10 @@
]
},
{
"path": "vllm/v1/core/single_type_kv_cache_manager.py",
"accepted_sha256": {
"source_built_glm53_b12x_kda_adaptive_mtp": "e4b1c5c38b63b708fd55aa40a9ab0d008b266d006a63dcfcef55890ac1371cb8"
"path": "vllm/v1/core/single_type_kv_cache_manager.py",
"accepted_sha256": {
"source_built_glm53_b12x_kda_adaptive_mtp": "e4b1c5c38b63b708fd55aa40a9ab0d008b266d006a63dcfcef55890ac1371cb8",
"recurrent_boundary_contract": "f67a1850a7e0288baaa6d42e7ec55b22b09c156720767e23acaabedcae333c8a"
},
"required_symbols": [
"SingleTypeKVCacheManager.add_local_computed_blocks",
Expand All @@ -107,7 +113,8 @@
"SingleTypeKVCacheManager.take_pending_cow_copies",
"SingleTypeKVCacheManager.pop_blocks_for_free",
"MambaManager.remove_skipped_blocks",
"MambaManager.allocate_new_blocks"
"MambaManager.allocate_new_blocks",
"SingleTypeKVCacheManager.take_pending_aligned_recurrent_boundaries"
]
},
{
Expand Down
Loading