From a284a0a53fb0cea2dd499dfe125782c8d2181531 Mon Sep 17 00:00:00 2001 From: dbogunowicz <97082108+dbogunowicz@users.noreply.github.com> Date: Tue, 20 Feb 2024 22:44:02 +0100 Subject: [PATCH] [DeepSparse Evaluation API] Add `model` property to `DeepSparseLM` (#1606) * Update lm_evaluation_harness.py * 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 845fe062ac..6e0711cb3c 100644 --- a/src/deepsparse/evaluation/integrations/lm_evaluation_harness.py +++ b/src/deepsparse/evaluation/integrations/lm_evaluation_harness.py @@ -155,6 +155,10 @@ def max_length(self) -> int: def max_gen_toks(self) -> int: return self._max_gen_toks + @property + def model(self) -> Pipeline: + return self.pipeline + def loglikelihood(self, requests) -> List[Tuple[float, bool]]: """ Copied directly from