From ee325e9cc928286beea934e391cfe17ccf0bb660 Mon Sep 17 00:00:00 2001 From: Yishuo Wang Date: Wed, 15 May 2024 09:32:12 +0800 Subject: [PATCH] fix phi3 (#11022) --- python/llm/src/ipex_llm/transformers/convert.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/python/llm/src/ipex_llm/transformers/convert.py b/python/llm/src/ipex_llm/transformers/convert.py index e60d5e1d..c1a3d5e0 100644 --- a/python/llm/src/ipex_llm/transformers/convert.py +++ b/python/llm/src/ipex_llm/transformers/convert.py @@ -1533,8 +1533,6 @@ def _optimize_post(model, lightweight_bmm=False): model, module.Phi3RMSNorm, phi3_rms_norm_forward) - # Empty cache after the first attention to run long context. - model.model.layers[0].self_attn.register_forward_hook(empty_cache_post) elif model.config.model_type == 'yuan': modeling_module_name = model.__class__.__module__ module = importlib.import_module(modeling_module_name)