Skip to content

Commit

Permalink
remove patch fix for phi (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
winglian committed Oct 3, 2023
1 parent e50a64e commit f34648c
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/axolotl/utils/models.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
"""Module for models and model loading"""
import importlib
import logging
import math
import os
Expand Down Expand Up @@ -176,20 +175,6 @@ def load_model(
LOG.info("patching _expand_mask")
hijack_expand_mask()

# special handling b/c remote MixFormers code doesn't have _no_split_modules set
if (
"MixFormerSequentialConfig" in model_config.__class__.__name__
and cfg.model_type == "AutoModelForCausalLM"
):
module_name = model_config.__class__.__module__.replace(
".configuration_mixformer_sequential", ".modeling_mixformer_sequential"
)
modeling_phi = importlib.import_module(module_name)
# pylint:disable=protected-access
modeling_phi.MixFormerSequentialForCausalLM._no_split_modules = [
"ParallelBlock"
]

model_kwargs = {}
if cfg.model_revision:
model_kwargs["revision"] = cfg.model_revision
Expand Down

0 comments on commit f34648c

Please sign in to comment.