Work on lazyload

This commit is contained in:
somebody
2023-05-28 12:25:31 -05:00
parent 1546b9efaa
commit 6f93150e4d
4 changed files with 97 additions and 172 deletions

View File

@@ -855,7 +855,7 @@ class TrainerBase(abc.ABC):
lazy_load_callback.nested = False
# Since we're using lazy loader, we need to figure out what the model's hidden layers are called
with lazy_loader.use_lazy_load(dematerialized_modules=True, use_accelerate_init_empty_weights=True):
with lazy_loader.use_lazy_load(dematerialized_modules=True):
try:
metamodel = AutoModelForCausalLM.from_config(model_config)
except Exception as e: