[Misc] Make PlaceholderRange.get_num_embeds a method (#34035)

Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
Cyrus Leung
2026-02-07 13:30:17 +08:00
committed by GitHub
parent bc32444b23
commit 48312e579a
9 changed files with 11 additions and 12 deletions

View File

@@ -48,7 +48,7 @@ def test_profiling(model_id: str, max_model_len: int):
) # image start, image, image end
assert total_num_patches == sum(
item.get_num_embeds for item in mm_inputs["mm_placeholders"]["image"]
item.get_num_embeds() for item in mm_inputs["mm_placeholders"]["image"]
)
assert total_tokens == sum(
placeholder.length for placeholder in mm_inputs["mm_placeholders"]["image"]