Skip to content

Commit 5dfc3a6

Browse files
HuiyingLiakoumpa
andauthored
feat: port ministral3 to transformers v4 (#934)
Signed-off-by: HuiyingLi <[email protected]> Signed-off-by: Alexandros Koumparoulis <[email protected]> Co-authored-by: Alexandros Koumparoulis <[email protected]>
1 parent b2db55e commit 5dfc3a6

File tree

4 files changed

+761
-0
lines changed

4 files changed

+761
-0
lines changed

nemo_automodel/_transformers/auto_model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,7 @@ def _retry(**override):
334334
try:
335335
# if we have a custom model implementation available, we prioritize that over HF
336336
if hf_config.architectures[0] in ModelRegistry.model_arch_name_to_cls:
337+
kwargs.pop("trust_remote_code", None)
337338
model = ModelRegistry.model_arch_name_to_cls[hf_config.architectures[0]](
338339
hf_config, *model_args, **kwargs
339340
)
@@ -508,6 +509,7 @@ def _retry(**override):
508509
try:
509510
# if we have a custom model implementation available, we prioritize that over HF
510511
if config.architectures[0] in ModelRegistry.model_arch_name_to_cls:
512+
kwargs.pop("trust_remote_code", None)
511513
model = ModelRegistry.model_arch_name_to_cls[config.architectures[0]](
512514
config, *model_args, **kwargs
513515
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.

0 commit comments

Comments
 (0)