From 0c80be3968ec130c34d5755e7baf27e48b5ef1ea Mon Sep 17 00:00:00 2001 From: jiqing-feng Date: Wed, 18 Dec 2024 13:23:23 +0000 Subject: [PATCH] pass config when convert class Signed-off-by: jiqing-feng --- optimum/exporters/ipex/model_patcher.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/optimum/exporters/ipex/model_patcher.py b/optimum/exporters/ipex/model_patcher.py index 5b3dbe42f..d186a50cf 100644 --- a/optimum/exporters/ipex/model_patcher.py +++ b/optimum/exporters/ipex/model_patcher.py @@ -119,7 +119,7 @@ def _patch_bert_model(model): Patch bert model: 1. Linear fusion with Linear + Gelu """ - convert_class(model, BertIntermediate, _IPEXIntermediate) + convert_class(model, BertIntermediate, _IPEXIntermediate, model.config) return model @@ -128,7 +128,7 @@ def _patch_vit_model(model): Patch vit model: 1. Linear fusion with Linear + Gelu """ - convert_class(model, ViTIntermediate, _IPEXIntermediate) + convert_class(model, ViTIntermediate, _IPEXIntermediate, model.config) return model