Skip to content

Commit 2e47843

Browse files
committed
move permute from callbacks to weight loading
Signed-off-by: Olya Kozlova <okozlova@nvidia.com>
1 parent 9d08467 commit 2e47843

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tensorrt_llm/_torch/models/modeling_mistral.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import dataclasses
33
from typing import Any, Dict, List, Tuple
44

5-
import math
65
import torch
76
import torchvision
87
from 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

0 commit comments

Comments
 (0)