[Model] Migrate FlexOlmo, Olmo3 and Hunyuan V1/VL to the Transformers modeling backend (#53615)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
Signed-off-by: Cyrus Leung <tlleungac@connect.ust.hk>
Co-authored-by: Xianbao QIAN <xianbao.qian@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
This commit is contained in:
Harry Mellor
2026-08-24 22:39:05 -07:00
committed by GitHub
co-authored by Xianbao QIAN Claude Opus 5 Cyrus Leung
parent 4f3e255dca
commit 48d7132962
14 changed files with 47 additions and 3028 deletions
@@ -173,6 +173,11 @@ class MultiModalDummyInputsBuilder(BaseDummyInputsBuilder[MultiModalProcessingIn
image_token = processor.boi_token
else:
image_token = getattr(processor, "image_token", "")
# Some processors (e.g. HunYuanVL) reject a bare image token and
# require each one to be wrapped in its start/end markers.
start_token = getattr(processor, "image_start_token", "")
end_token = getattr(processor, "image_end_token", "")
image_token = f"{start_token}{image_token}{end_token}"
text += image_token * num_images
return text