From 43fc2e9a914623fd6eec954a94aeca2d3966e3db Mon Sep 17 00:00:00 2001 From: Hao Shao Date: Sun, 7 Jul 2024 14:10:13 +0800 Subject: [PATCH] Update modeling_llama.py --- LAVIS/lavis/models/blip2_models/modeling_llama.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/LAVIS/lavis/models/blip2_models/modeling_llama.py b/LAVIS/lavis/models/blip2_models/modeling_llama.py index 1b714b9..19306ba 100644 --- a/LAVIS/lavis/models/blip2_models/modeling_llama.py +++ b/LAVIS/lavis/models/blip2_models/modeling_llama.py @@ -418,6 +418,8 @@ class LlamaFlashAttention2(LlamaAttention): untouched. The only required change would be on the forward pass where it needs to correctly call the public API of flash attention and deal with padding tokens in case the input contains any of them. """ + def __init__(self, config: LlamaConfig): + super().__init__(config) def forward( self,