This commit is contained in:
Daniel Han 2024-11-26 00:47:27 -08:00
commit 587223b4bf
2 changed files with 4 additions and 0 deletions

View file

@ -1142,12 +1142,14 @@ def unsloth_compile_transformers(
pass
if disable: return
print(1)
model_types = get_transformers_model_type(
model_name = model_name,
token = token,
revision = revision,
trust_remote_code = trust_remote_code,
)
print(model_types)
for model_type in model_types:
_unsloth_compile_transformers(
model_type,

View file

@ -358,7 +358,9 @@ class FastVisionModel(FastBaseVisionModel):
patch_unsloth_smart_gradient_checkpointing()
old_model_name = model_name
print(model_name)
model_name = get_model_name(model_name, load_in_4bit)
print(model_name)
with contextlib.redirect_stdout(open(os.devnull, "w")):
patch_loss_functions(torch_compile = False)