model: TP-wide single-owner image encoding for DeepSeek V4.1

ViT and Aligner are replicated per TP rank, encoding each image eight
times with TP8 on both CP1 and CP8. Elect one owner per image and use
ordered full-span broadcasts with a six-phase agreement protocol.
Both CP1 and CP8 benefit while local cache hits preserve collective order.
This commit is contained in:
Xinyuan Tong
2026-09-23 14:36:01 +08:00
committed by minke.yu
parent bfeb7cd9b2
commit b48e2cb1eb
6 changed files with 1663 additions and 54 deletions
File diff suppressed because it is too large Load Diff
@@ -77,6 +77,7 @@ class _VisionStub(DeepseekV4ForCausalLM):
self.config = SimpleNamespace(image_token_id=IMAGE_TOKEN_ID)
self.vision = object()
self.tp_size = 1
self.mm_owner_group = None
self.model = _RecordingBody(embed)
self.pp_group = SimpleNamespace(is_last_rank=True)
self.lm_head = object()