From cbbff0697337d1dd8b5f03d8d69aa181d8b0d370 Mon Sep 17 00:00:00 2001 From: Daniel Han Date: Wed, 25 Sep 2024 18:24:30 -0700 Subject: [PATCH] Update llama.py --- unsloth/models/llama.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/unsloth/models/llama.py b/unsloth/models/llama.py index a31a485676..dd6d805ec4 100644 --- a/unsloth/models/llama.py +++ b/unsloth/models/llama.py @@ -1384,10 +1384,10 @@ def _wrap_fast_inference(generate, device_type, dtype, model): internal_model._flag_for_generation = True # Must patch accelerate for Xformers - if accelerate_new_send_to_device is not None: - import accelerate.utils.operations - accelerate.utils.operations.send_to_device = accelerate_new_send_to_device - pass + # if accelerate_new_send_to_device is not None: + # import accelerate.utils.operations + # accelerate.utils.operations.send_to_device = accelerate_new_send_to_device + # pass # For newer HF # kwargs["cache_implementation"] = "dynamic" @@ -1411,8 +1411,6 @@ def _wrap_fast_inference(generate, device_type, dtype, model): # Autocasted with torch.autocast(device_type = device_type, dtype = dtype): - print(args) - print(kwargs) output = generate(*args, **kwargs) pass