File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed
Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 2323
2424import torch
2525from torch .nn .attention import SDPBackend , sdpa_kernel
26-
27- import nemo_automodel .components .distributed .utils as dist_utils
28- from nemo_automodel import __version__
29- from nemo_automodel ._transformers .registry import ModelRegistry
30- from nemo_automodel .components .distributed .init_utils import get_local_world_size_preinit , get_world_size_safe
31- from nemo_automodel .components .utils .model_utils import resolve_trust_remote_code
32- from nemo_automodel .shared .import_utils import safe_import
33- from nemo_automodel .shared .utils import dtype_from_str
3426from transformers import (
3527 AutoConfig ,
3628 AutoModelForCausalLM ,
4234from transformers .modeling_utils import _get_resolved_checkpoint_files
4335from transformers .models .auto .auto_factory import _BaseAutoModelClass
4436
37+ import nemo_automodel .components .distributed .utils as dist_utils
38+ from nemo_automodel import __version__
39+ from nemo_automodel ._transformers .registry import ModelRegistry
40+ from nemo_automodel .components .distributed .init_utils import get_local_world_size_preinit , get_world_size_safe
41+ from nemo_automodel .components .utils .model_utils import resolve_trust_remote_code
42+ from nemo_automodel .shared .import_utils import safe_import
43+ from nemo_automodel .shared .utils import dtype_from_str
44+
4545HAS_LIGER_KERNEL , liger_kernel_trf = safe_import ("liger_kernel.transformers" )
4646
4747logger = logging .getLogger (__name__ )
Original file line number Diff line number Diff line change 3333
3434import torch
3535import torch .nn as nn
36-
37- from nemo_automodel .components .models .common .combined_projection import CombinedGateUpMLP , CombinedQKVAttentionMixin
38- from nemo_automodel .components .models .llama .state_dict_adapter import LlamaStateDictAdapter
39- from nemo_automodel .shared .import_utils import get_check_model_inputs_decorator
4036from transformers import LlamaConfig
4137from transformers .cache_utils import Cache , DynamicCache
4238from transformers .masking_utils import create_causal_mask
5450from transformers .processing_utils import Unpack
5551from transformers .utils import TransformersKwargs , can_return_tuple
5652
53+ from nemo_automodel .components .models .common .combined_projection import CombinedGateUpMLP , CombinedQKVAttentionMixin
54+ from nemo_automodel .components .models .llama .state_dict_adapter import LlamaStateDictAdapter
55+ from nemo_automodel .shared .import_utils import get_check_model_inputs_decorator
56+
5757check_model_inputs = get_check_model_inputs_decorator ()
5858
5959
You can’t perform that action at this time.
0 commit comments