Tiny fix.

This commit is contained in:
marko1616
2024-09-26 11:06:21 -04:00
committed by hiyouga
parent 3f2c056253
commit 8372c5e377
2 changed files with 4 additions and 9 deletions

View File

@@ -159,6 +159,8 @@ def get_image_seqlen(config: "PretrainedConfig") -> int:
image_seqlen = config.vision_config.num_image_tokens
else:
image_seqlen = -1
elif model_type == "mllama":
image_seqlen = ((config.vision_config.image_size // config.vision_config.patch_size) ** 2 + 1) * config.vision_config.max_num_tiles
return image_seqlen