Revert "Remove native Hunyuan V1 and VL implementations" - #53296
Conversation
|
/ci run |
|
Documentation preview: https://vllm--53296.org.readthedocs.build/en/53296/ |
5b4d4aa to
6a5bbcb
Compare
|
/ci run |
|
✅ Triggered Buildkite CI #85060 for commit |
|
✅ CI is already running for this commit: https://buildkite.com/vllm/ci/builds/85060 |
|
Signed-head exact run is Buildkite #85060. CPU Multimodal Processor shards 1 and 4 are selected and currently waiting behind image prerequisites; awaiting terminal results. |
|
Shouldn't we just remove the tests that depend on the removed model? |
|
Strict signed-head validation is complete: Buildkite #85060 ran at exact commit |
|
/ci run |
|
✅ Triggered Buildkite CI #85108 for commit |
|
@DarkLight1337 agree usually but so many things were breaking we just need to stabilize CI urgently. |
|
cc @xianbaoqian |
Redoes vllm-project#53272, which was reverted in vllm-project#53296, with the defect that caused the revert fixed. Route all three architectures explicitly through _TRANSFORMERS_SUPPORTED_MODELS and delete the native implementations and the vendored HunYuanVLConfig: - HunYuanDenseV1ForCausalLM -> TransformersForCausalLM - HunYuanMoEV1ForCausalLM -> TransformersMoEForCausalLM - HunYuanVLForConditionalGeneration -> TransformersMultiModalForCausalLM The fix: dummy text for wrapped image placeholders. HunYuanVLProcessor rejects a bare image token, requiring each to appear as image_start_token + image_token + image_end_token. The Transformers modeling backend built dummy text from image_token alone, so vllm-project#53272 failed test_processing_correctness for tencent/HunyuanOCR with "HunYuanVL image placeholders must be formatted as ...". MultiModalDummyInputsBuilder now wraps the image token whenever the processor exposes those markers, generalising the existing gemma3 boi_token special case. Verified load-bearing: reverting just this hunk reproduces the original three failures, and restoring it turns them green. Migrating the V1 text models required migrating VL in the same commit: hunyuan_vision.py builds its language model with init_vllm_registered_model(architectures=["HunYuanDenseV1ForCausalLM", "HunYuanMoEV1ForCausalLM"]), so migrating V1 alone would have left a native multimodal model nesting a Transformers backend wrapper as its inner language model, which nothing else in the tree does. Deleting the vendored HunYuanVLConfig also drops a vestigial num_experts=1 that the public HunyuanOCR checkpoints carry on disk from Tencent's MoE codebase. Transformers' HunYuanVLTextConfig strips those legacy MoE and MLA keys because the variant is dense-only, so after this change ModelConfig.is_moe is False for HunyuanOCR and the pinned TransformersMultiModalForCausalLM matches what _get_transformers_backend_cls() computes. The hf_overrides={"num_experts": 0} on the test registry entry existed to paper over that key and is removed with it. Known limitation, not introduced here: no config in the hunyuan_v1_dense, hunyuan_v1_moe or hunyuan_vl Transformers packages defines base_model_tp_plan or base_model_pp_plan, so TP>1 and PP>1 warn and fall back to inferred sharding rather than an explicit plan. Co-authored-by: Xianbao QIAN <xianbao.qian@gmail.com> Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com> Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
…t#53296) Signed-off-by: Kevin Luu <51931015+khluu@users.noreply.github.com> Co-authored-by: Andreas Karatzas <akaratza@amd.com>
…t#53296) Signed-off-by: Kevin Luu <51931015+khluu@users.noreply.github.com> Co-authored-by: Andreas Karatzas <akaratza@amd.com> Signed-off-by: mikeshawcode <michaelwshaw2@gmail.com>
Why
This reverts #53272 because it deterministically breaks the CPU Multimodal Processor test matrix after switching HunyuanOCR to the Transformers
HunYuanVLProcessor:The merged commit
d53b1c2eis the first affected main commit. Main Buildkite #85049 fails CPU Multimodal Processor shards 1 and 4 in three HunyuanOCRtest_processing_correctnesscases.The exact PR-head Buildkite #85016 selected all four CPU Multimodal Processor shards and failed the identical HunyuanOCR cases in shards 1 and 4 while shards 2 and 3 passed. This is deterministic code evidence rather than runner noise.
Duplicate-work check
Searched open PRs for
53272,HunyuanOCR placeholder processor, andrevert Hunyuan native removal; no existing revert or equivalent fix was found.Validation
git diff HEAD^ --checkd53b1c2ewithgit apply --check --reverse6a5bbcbad020a062572c06344c523dae107ac3f6: CPU Multimodal Processor shard 1 passed onip-10-0-34-197at 17:43:16 UTC and shard 4 passed onip-10-0-4-137at 17:39:47 UTCNo model evaluation is applicable because this is an emergency rollback restoring the implementation and test behavior present immediately before the breaking merge.
Merge gate
Keep this draft until human line-by-line review. The incident remains open after pre-merge validation and closes only after merge plus exact post-merge main CPU Multimodal shards 1 and 4 pass.
AI assistance
AI assistance was used to investigate the CI failure, prepare the revert, and draft this PR. The human submitter must review every changed line and can explain and defend the change end-to-end.