Skip to content

Commit

Permalink
add use_cache param when init generation config
Browse files Browse the repository at this point in the history
Signed-off-by: jiqing-feng <[email protected]>
  • Loading branch information
jiqing-feng committed Jan 21, 2025
1 parent f094cad commit dab4a78
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions optimum/intel/ipex/modeling_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ def forward(
def _prepare_generation_config(
self, generation_config: Optional[GenerationConfig], **kwargs: Dict
) -> Tuple[GenerationConfig, Dict]:
kwargs["use_cache"] = self.use_cache
generation_config, model_kwargs = super()._prepare_generation_config(generation_config, **kwargs)
generation_method = generation_config.get_generation_mode().value
if self.compiled and generation_config.cache_implementation != "ipex_paged" and self._supports_static_cache:
Expand Down

0 comments on commit dab4a78

Please sign in to comment.