From 2f4d24f401553a24d2d4a89e42aca93627bde775 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 11 May 2024 03:37:09 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .../lm_evaluation_harness/lm_eval/models/huggingface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/models/huggingface.py b/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/models/huggingface.py index 76c39031..38f5d095 100644 --- a/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/models/huggingface.py +++ b/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/models/huggingface.py @@ -1159,10 +1159,11 @@ class GaudiHFModelAdapter(HFLM): def __init__(self, *args, **kwargs): if kwargs["device"] == "hpu": import habana_frameworks.torch.core as htcore + # Tweak generation so that it runs faster on Gaudi from optimum.habana.transformers.modeling_utils import adapt_transformers_to_gaudi - adapt_transformers_to_gaudi() + adapt_transformers_to_gaudi() super().__init__(*args, **kwargs)