From b20d03029a718c93b5ef84602e0a1aac7feb06c6 Mon Sep 17 00:00:00 2001 From: dbogunowicz <97082108+dbogunowicz@users.noreply.github.com> Date: Fri, 16 Feb 2024 13:58:17 +0100 Subject: [PATCH 1/2] Update lm_evaluation_harness.py --- .../evaluation/integrations/lm_evaluation_harness.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/deepsparse/evaluation/integrations/lm_evaluation_harness.py b/src/deepsparse/evaluation/integrations/lm_evaluation_harness.py index 69934af37a..0c3b26460e 100644 --- a/src/deepsparse/evaluation/integrations/lm_evaluation_harness.py +++ b/src/deepsparse/evaluation/integrations/lm_evaluation_harness.py @@ -150,6 +150,10 @@ def max_length(self) -> int: def max_gen_toks(self) -> int: return self._max_gen_toks + @property + def model(self) -> Any: + return self.pipeline + def loglikelihood(self, requests) -> List[Tuple[float, bool]]: """ Copied directly from From b3f2da9b3259cee80c5c2ccdf573472b0d0b1c5a Mon Sep 17 00:00:00 2001 From: dbogunowicz <97082108+dbogunowicz@users.noreply.github.com> Date: Fri, 16 Feb 2024 13:59:09 +0100 Subject: [PATCH 2/2] Update lm_evaluation_harness.py --- src/deepsparse/evaluation/integrations/lm_evaluation_harness.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/deepsparse/evaluation/integrations/lm_evaluation_harness.py b/src/deepsparse/evaluation/integrations/lm_evaluation_harness.py index 0c3b26460e..38d9fdf4bd 100644 --- a/src/deepsparse/evaluation/integrations/lm_evaluation_harness.py +++ b/src/deepsparse/evaluation/integrations/lm_evaluation_harness.py @@ -151,7 +151,7 @@ def max_gen_toks(self) -> int: return self._max_gen_toks @property - def model(self) -> Any: + def model(self) -> Pipeline: return self.pipeline def loglikelihood(self, requests) -> List[Tuple[float, bool]]: