--- baked-ours/v1/worker/gpu/attn_utils.py 2026-09-10 19:56:14.000000000 +0200 +++ baked/v1/worker/gpu/attn_utils.py 2026-09-11 10:13:47.000000000 +0200 @@ -20,6 +20,7 @@ KVCacheConfig, KVCacheSpec, UniformTypeKVCacheSpecs, + is_dcp_replicated_spec, ) from vllm.v1.worker.gpu.model_states.interface import ModelSpecificAttnMetadata from vllm.v1.worker.utils import ( @@ -283,6 +284,13 @@ for i in range(num_kv_cache_groups): block_table = block_tables[i] slot_mapping = slot_mappings[i] + # DCP-replicated groups hold every position on every rank: their + # builders must see the full seq_lens, not this rank's shard. + group_dcp_local_seq_lens = ( + None + if is_dcp_replicated_spec(kv_cache_config.kv_cache_groups[i].kv_cache_spec) + else dcp_local_seq_lens + ) # Per-group causal for hybrid drafters (mixed SWA/full attention). group_causal = ( causal if isinstance(causal, (bool, torch.Tensor)) else causal.get(i, True) @@ -310,7 +318,7 @@ block_table_tensor=block_table, slot_mapping=slot_mapping, causal=group_causal, - dcp_local_seq_lens=dcp_local_seq_lens, + dcp_local_seq_lens=group_dcp_local_seq_lens, positions=positions, is_prefilling=group_is_prefilling, mm_req_doc_ranges=mm_req_doc_ranges,