remove patch fix for phi (#664)
Browse files- src/axolotl/utils/models.py +0 -15
src/axolotl/utils/models.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
| 1 |
"""Module for models and model loading"""
|
| 2 |
-
import importlib
|
| 3 |
import logging
|
| 4 |
import math
|
| 5 |
import os
|
|
@@ -176,20 +175,6 @@ def load_model(
|
|
| 176 |
LOG.info("patching _expand_mask")
|
| 177 |
hijack_expand_mask()
|
| 178 |
|
| 179 |
-
# special handling b/c remote MixFormers code doesn't have _no_split_modules set
|
| 180 |
-
if (
|
| 181 |
-
"MixFormerSequentialConfig" in model_config.__class__.__name__
|
| 182 |
-
and cfg.model_type == "AutoModelForCausalLM"
|
| 183 |
-
):
|
| 184 |
-
module_name = model_config.__class__.__module__.replace(
|
| 185 |
-
".configuration_mixformer_sequential", ".modeling_mixformer_sequential"
|
| 186 |
-
)
|
| 187 |
-
modeling_phi = importlib.import_module(module_name)
|
| 188 |
-
# pylint:disable=protected-access
|
| 189 |
-
modeling_phi.MixFormerSequentialForCausalLM._no_split_modules = [
|
| 190 |
-
"ParallelBlock"
|
| 191 |
-
]
|
| 192 |
-
|
| 193 |
model_kwargs = {}
|
| 194 |
if cfg.model_revision:
|
| 195 |
model_kwargs["revision"] = cfg.model_revision
|
|
|
|
| 1 |
"""Module for models and model loading"""
|
|
|
|
| 2 |
import logging
|
| 3 |
import math
|
| 4 |
import os
|
|
|
|
| 175 |
LOG.info("patching _expand_mask")
|
| 176 |
hijack_expand_mask()
|
| 177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
model_kwargs = {}
|
| 179 |
if cfg.model_revision:
|
| 180 |
model_kwargs["revision"] = cfg.model_revision
|