From 1f62b736776e2abab6416b4659fd367d459f48b3 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Tue, 19 Nov 2024 03:53:17 -0800 Subject: [PATCH] Update _utils.py --- unsloth/models/_utils.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index af1d12c293..b73b2a9bbf 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -1080,13 +1080,12 @@ def unsloth_compile_transformers( token = None, revision = None, trust_remote_code = False, - sdpa_causal_only = False, + sdpa_dynamic_mask = True, sdpa_bool_masks = True, sdpa_gqa_replace = True, sdpa_disable_compile = True, compile_attention = True, disable_causal_masks = True, - import_from_cache = False, compile_torch_modules = True, compile_custom_modules = True, compile_function_calls = True, @@ -1096,6 +1095,7 @@ def unsloth_compile_transformers( shape_padding = True, cudagraphs = True, debug = False, + import_from_cache = False, ): model_types = get_transformers_model_type( model_name = model_name, @@ -1107,13 +1107,12 @@ def unsloth_compile_transformers( for model_type in model_types: _unsloth_compile_transformers( model_type, - sdpa_causal_only = sdpa_causal_only, + sdpa_dynamic_mask = sdpa_dynamic_mask, sdpa_bool_masks = sdpa_bool_masks, sdpa_gqa_replace = sdpa_gqa_replace, sdpa_disable_compile = sdpa_disable_compile, compile_attention = compile_attention, disable_causal_masks = disable_causal_masks, - import_from_cache = import_from_cache, compile_torch_modules = compile_torch_modules, compile_custom_modules = compile_custom_modules, compile_function_calls = compile_function_calls, @@ -1123,6 +1122,7 @@ def unsloth_compile_transformers( shape_padding = shape_padding, cudagraphs = cudagraphs, debug = debug, + import_from_cache = import_from_cache, ) pass return