Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/axolotl/cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
ProcessorMixin,
)

from axolotl.loaders import load_processor, load_tokenizer
from axolotl.loaders.model import ModelLoader
from axolotl.utils.dict import DictDefault
from axolotl.utils.models import load_model, load_processor, load_tokenizer

LOG = logging.getLogger(__name__)

Expand Down Expand Up @@ -318,7 +319,8 @@ def load_model_and_tokenizer(
tokenizer = load_tokenizer(cfg)

LOG.info("loading model...")
model, _ = load_model(cfg, tokenizer, inference=inference)
model_loader = ModelLoader(cfg, tokenizer, inference=inference)
Comment thread
djsaunde marked this conversation as resolved.
model, _ = model_loader.load()

processor = None
if cfg.is_multimodal:
Expand Down
2 changes: 1 addition & 1 deletion src/axolotl/common/datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

import axolotl.monkeypatch.data.batch_dataset_fetcher # pylint: disable=unused-import # noqa: F401
from axolotl.cli.args import PreprocessCliArgs, TrainerCliArgs
from axolotl.loaders import load_processor, load_tokenizer
from axolotl.utils.data import prepare_dataset
from axolotl.utils.data.rl import load_prepare_preference_datasets
from axolotl.utils.dict import DictDefault
from axolotl.utils.models import load_processor, load_tokenizer
from axolotl.utils.schemas.enums import RLType
from axolotl.utils.tokenization import check_dataset_labels

Expand Down
2 changes: 1 addition & 1 deletion src/axolotl/core/trainer_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
AxolotlTrainingArguments,
)
from axolotl.integrations.base import PluginManager
from axolotl.loaders.utils import ensure_dtype
from axolotl.monkeypatch.multipack import SUPPORTED_MULTIPACK_MODEL_TYPES
from axolotl.monkeypatch.relora import ReLoRACallback
from axolotl.monkeypatch.trainer.lr import patch_trainer_get_lr
Expand Down Expand Up @@ -86,7 +87,6 @@
V2BatchSamplerDataCollatorForSeq2Seq,
)
from axolotl.utils.collators.mm_chat import MultiModalChatDataCollator
from axolotl.utils.models import ensure_dtype
from axolotl.utils.schemas.enums import CustomSupportedOptimizers, RLType

try:
Expand Down
2 changes: 1 addition & 1 deletion src/axolotl/core/trainers/grpo/trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

from axolotl.core.trainers.grpo.sampler import SequenceParallelRepeatRandomSampler
from axolotl.core.trainers.mixins import RngLoaderMixin, SchedulerMixin
from axolotl.monkeypatch.ring_attn.patch import get_ring_attn_group
from axolotl.monkeypatch.ring_attn import get_ring_attn_group

if is_peft_available():
# pylint: disable=unused-import
Expand Down
Loading