[RFC] [Mistral] FP8 format (#10130)
Signed-off-by: mgoin <mgoin64@gmail.com> Co-authored-by: mgoin <mgoin64@gmail.com>
This commit is contained in:
committed by
GitHub
parent
870c37481e
commit
d366ccc4e3
@@ -54,8 +54,11 @@ def get_max_pixtral_image_tokens(ctx: InputContext):
|
||||
tokenizer_mode=ctx.model_config.tokenizer_mode)
|
||||
mm_encoder = tokenizer.instruct.mm_encoder
|
||||
|
||||
max_image_size = mm_encoder.mm_config.max_image_size
|
||||
image_patch_size = mm_encoder.mm_config.image_patch_size
|
||||
image_config = mm_encoder.mm_config if hasattr(
|
||||
mm_encoder, "mm_config") else mm_encoder.image_config
|
||||
|
||||
max_image_size = image_config.max_image_size
|
||||
image_patch_size = image_config.image_patch_size
|
||||
|
||||
return ((max_image_size // image_patch_size)**2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user