This commit is contained in:
Yishuo Wang 2024-05-15 09:32:12 +08:00 committed by GitHub
parent 7d3791c819
commit ee325e9cc9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)