monkey-patch transformers to simplify monkey-patching modeling code (#1877)
* monkey-patch transformers so that monkey-patched modeling code doesnt get overwritten * unnecessary now * add comment
This commit is contained in:
committed by
GitHub
parent
1e43660701
commit
159b8b9a74
@@ -43,6 +43,9 @@ from axolotl.monkeypatch.multipack import (
|
||||
SUPPORTED_MULTIPACK_MODEL_TYPES,
|
||||
patch_for_multipack,
|
||||
)
|
||||
from axolotl.monkeypatch.transformers_dynamic_module_utils import (
|
||||
patch_transformers_dynamic_module_utils,
|
||||
)
|
||||
from axolotl.prompt_tokenizers import LLAMA_DEFAULT_EOS_TOKEN
|
||||
from axolotl.utils.bench import log_gpu_memory_usage
|
||||
from axolotl.utils.chat_templates import chat_templates
|
||||
@@ -54,6 +57,8 @@ from axolotl.utils.model_shard_quant import load_sharded_model, load_sharded_mod
|
||||
|
||||
LOG = logging.getLogger("axolotl")
|
||||
|
||||
patch_transformers_dynamic_module_utils()
|
||||
|
||||
|
||||
# copied from accelerator.FullyShardedDataParallelPlugin
|
||||
def get_module_class_from_name(module, name):
|
||||
|
||||
Reference in New Issue
Block a user