From d9ed4bef09852a4bde1466ff31a60885b9fb2546 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Thu, 12 Dec 2024 01:14:27 -0800 Subject: [PATCH] fullgraph --- unsloth/models/_utils.py | 2 ++ unsloth/models/loader.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/unsloth/models/_utils.py b/unsloth/models/_utils.py index f1dc15aca4..805e373447 100644 --- a/unsloth/models/_utils.py +++ b/unsloth/models/_utils.py @@ -1127,6 +1127,7 @@ def unsloth_compile_transformers( shape_padding = True, cudagraphs = False, debug = False, + fullgraph = True, import_from_cache = False, disable = False, return_logits = False, @@ -1170,6 +1171,7 @@ def unsloth_compile_transformers( shape_padding = shape_padding, cudagraphs = cudagraphs, debug = debug, + fullgraph = fullgraph, import_from_cache = import_from_cache, disable = disable, return_logits = return_logits, diff --git a/unsloth/models/loader.py b/unsloth/models/loader.py index 3b2c8ffefe..c2b68fdc4b 100644 --- a/unsloth/models/loader.py +++ b/unsloth/models/loader.py @@ -352,6 +352,7 @@ class FastVisionModel(FastBaseVisionModel): resize_model_vocab = None, # [TODO] No effect revision = None, return_logits = False, # Return logits + fullgraph = True, # No graph breaks *args, **kwargs, ): if token is None: token = get_token() @@ -473,6 +474,7 @@ class FastVisionModel(FastBaseVisionModel): shape_padding = True, cudagraphs = False, debug = False, + fullgraph = fullgraph, import_from_cache = False, disable = False, return_logits = return_logits,