From 5b75e21a4b8bcda18e4b4d2d99beef041bf7dd3d Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 30 Oct 2024 13:54:11 -0700 Subject: [PATCH] Update _utils.py --- unsloth/models/_utils.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index 0539e255ea..a3cb3cda8d 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -366,21 +366,21 @@ torch_compile_arguments = [ # Torch dynamo arguments torch_dynamo_arguments = [ "config.accumulated_cache_size_limit = 1024", # Bump up a bit from 256 - "config.suppress_errors = True", # Supress errors for now + # "config.suppress_errors = True", # Supress errors for now "config.do_not_emit_runtime_asserts = True", "config.cache_size_limit = 1024", # Flex Attention "config.inline_inbuilt_nn_modules = True", # Torch 2.5 Regional recompilation ] -# import torch._inductor.config as config -# for _try_compile_argument in torch_compile_arguments: -# try: exec(_try_compile_argument) -# except: pass -# pass -# import torch._dynamo.config as config -# for _try_dynamo_argument in torch_dynamo_arguments: -# try: exec(_try_dynamo_argument) -# except: pass -# pass +import torch._inductor.config as config +for _try_compile_argument in torch_compile_arguments: + try: exec(_try_compile_argument) + except: pass +pass +import torch._dynamo.config as config +for _try_dynamo_argument in torch_dynamo_arguments: + try: exec(_try_dynamo_argument) + except: pass +pass torch_compile_options = { "epilogue_fusion" : True, "max_autotune" : True,