From eca8bfd53adcb5bcd3ed33d4db8c2926ac78c2f1 Mon Sep 17 00:00:00 2001 From: Pablo Monteagudo Lago Date: Fri, 17 Jan 2025 16:18:48 +0000 Subject: [PATCH] Fix LLM tests --- tests/brevitas_examples/test_llm.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/brevitas_examples/test_llm.py b/tests/brevitas_examples/test_llm.py index a3aab2b24..02fbfc349 100644 --- a/tests/brevitas_examples/test_llm.py +++ b/tests/brevitas_examples/test_llm.py @@ -2,6 +2,7 @@ # SPDX-License-Identifier: BSD-3-Clause from argparse import Namespace +import copy from dataclasses import dataclass import logging import os @@ -851,7 +852,7 @@ def test_small_models_rotation_ppl(caplog, rotation_ppl_args_and_ppl): "--gradient_accumulation_steps", "1"], "float_ppl": 33238.8984375, - "quant_ppl": 33278.98828125, + "quant_ppl": 33239.33984375, "exp_layer_types_count": { "": 4, "": 1, @@ -878,7 +879,7 @@ def test_small_models_rotation_ppl(caplog, rotation_ppl_args_and_ppl): "--gradient_accumulation_steps", "1"], "float_ppl": 33238.8984375, - "quant_ppl": 33424.73046875, + "quant_ppl": 33423.0390625, "exp_layer_types_count": { "": 0, "": 1, @@ -905,7 +906,7 @@ def test_small_models_rotation_ppl(caplog, rotation_ppl_args_and_ppl): "--gradient_accumulation_steps", "1"], "float_ppl": 33238.8984375, - "quant_ppl": 33339.21875, + "quant_ppl": 33286.98828125, "exp_layer_types_count": { "": 4, "": 1, @@ -932,7 +933,7 @@ def test_small_models_rotation_ppl(caplog, rotation_ppl_args_and_ppl): "--gradient_accumulation_steps", "1"], "float_ppl": 33238.8984375, - "quant_ppl": 33219.08984375, + "quant_ppl": 33175.3046875, "exp_layer_types_count": { "": 0, "": 1, @@ -940,7 +941,7 @@ def test_small_models_rotation_ppl(caplog, rotation_ppl_args_and_ppl): "": 14,}},]) def rotation_optimization_args_layer_count_and_ppl(default_run_args, request): args = default_run_args - run_dict = request.param + run_dict = copy.deepcopy(request.param) extra_args = run_dict["extra_args"] float_ppl = run_dict["float_ppl"] quant_ppl = run_dict["quant_ppl"]