From 95ddb81256eba9af0c23c48de27eede50abc0afc Mon Sep 17 00:00:00 2001 From: jiqing-feng Date: Thu, 5 Dec 2024 09:48:37 +0000 Subject: [PATCH] fix typo Signed-off-by: jiqing-feng --- optimum/exporters/ipex/modeling_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/optimum/exporters/ipex/modeling_utils.py b/optimum/exporters/ipex/modeling_utils.py index 35a242ac9..ccd98ce2e 100755 --- a/optimum/exporters/ipex/modeling_utils.py +++ b/optimum/exporters/ipex/modeling_utils.py @@ -501,8 +501,8 @@ def _gpt2_model_forward( ) -# To pass input_lens -def gpt2_block_forward( +# To pass input_lens, adapted from https://github.com/huggingface/transformers/blob/v4.46.3/src/transformers/models/gpt2/modeling_gpt2.py#L602 +def _gpt2_block_forward( self, hidden_states: Optional[Tuple[torch.FloatTensor]], layer_past: Optional[Tuple[torch.Tensor]] = None,