File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
tensorrt_llm/_torch/models Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 22import dataclasses
33from typing import Any , Dict , List , Tuple
44
5- import math
65import torch
76import torchvision
87from mistral_common .tokens .tokenizers .multimodal import ImageEncoder
@@ -371,7 +370,7 @@ def __init__(
371370 use_fast = self .use_fast ,
372371 trust_remote_code = trust_remote_code )
373372 self ._model_path = model_path
374- if model_type in ( "mistral_large_3" , "mistral3" ) :
373+ if model_type == "mistral_large_3" :
375374 # For mistral large 3, we add chat template in the model forward, and the
376375 # MistralCommonImageProcessor is used to process the input when both text and images are provided.
377376 # When the input only contains text, we use the text processor to process the input.
@@ -507,7 +506,7 @@ def __init__(
507506 def load_tokenizer (model_path : str ,
508507 config : PretrainedConfig ,
509508 tokenizer : AutoTokenizer | None = None ):
510- if getattr (config , "input_processor_type" , None ) == "mistral_large_3" :
509+ if getattr (config , "input_processor_type" , None ) in ( "mistral_large_3" ) :
511510 try :
512511 return MistralTokenizer .from_pretrained (model_path )
513512
You can’t perform that action at this time.
0 commit comments