From edf5c977f402650a048078758bfeacf85e191ed7 Mon Sep 17 00:00:00 2001 From: "Cheng, Penghui" Date: Thu, 30 Nov 2023 13:14:48 +0800 Subject: [PATCH 1/6] Fixed install error for transformers Signed-off-by: Cheng, Penghui --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7949f6d11d..7946a0c8c5 100644 --- a/setup.py +++ b/setup.py @@ -45,7 +45,7 @@ ], "openvino": ["openvino>=2023.1.0", "onnx", "onnxruntime", "transformers>=4.33.0"], "nncf": ["nncf>=2.6.0"], - "ipex": ["transformers<4.32.0", "intel-extension-for-pytorch", "onnx"], + "ipex": ["transformers", "intel-extension-for-pytorch", "onnx"], "diffusers": ["diffusers"], "quality": QUALITY_REQUIRE, "tests": TESTS_REQUIRE, From 087b880d85e0438462ad54fe0e7256c5831aafb9 Mon Sep 17 00:00:00 2001 From: "Cheng, Penghui" Date: Fri, 1 Dec 2023 16:28:22 +0800 Subject: [PATCH 2/6] Fixed UT error Signed-off-by: Cheng, Penghui --- tests/neural_compressor/test_modeling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/neural_compressor/test_modeling.py b/tests/neural_compressor/test_modeling.py index 8098f011c5..566b4d6f6f 100644 --- a/tests/neural_compressor/test_modeling.py +++ b/tests/neural_compressor/test_modeling.py @@ -161,7 +161,7 @@ def test_compare_with_and_without_past_key_values(self): self.assertEqual(outputs_model_with_pkv.shape[1], self.GENERATION_LENGTH) self.assertEqual(outputs_model_without_pkv.shape[1], self.GENERATION_LENGTH) self.assertTrue( - without_pkv_timer.elapsed / with_pkv_timer.elapsed > self.SPEEDUP_CACHE, + with_pkv_timer.elapsed / without_pkv_timer.elapsed > self.SPEEDUP_CACHE, f"With pkv latency: {with_pkv_timer.elapsed:.3f} ms, without pkv latency: {without_pkv_timer.elapsed:.3f} ms," f" speedup: {without_pkv_timer.elapsed / with_pkv_timer.elapsed:.3f}", ) From 0d51d645355f5eb419bcd7fa5ba1eb7dfccaf991 Mon Sep 17 00:00:00 2001 From: "Cheng, Penghui" Date: Tue, 5 Dec 2023 15:24:43 +0800 Subject: [PATCH 3/6] Fixed UT error Signed-off-by: Cheng, Penghui --- tests/neural_compressor/test_optimization.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/neural_compressor/test_optimization.py b/tests/neural_compressor/test_optimization.py index f28c720138..9a1dc14f80 100644 --- a/tests/neural_compressor/test_optimization.py +++ b/tests/neural_compressor/test_optimization.py @@ -77,7 +77,7 @@ class OptimizationTest(INCTestMixin): ) TEXT_GENERATION_SUPPORTED_ARCHITECTURES = ( - "hf-internal-testing/tiny-random-BloomForCausalLM", + "hf-tiny-model-private/tiny-random-BloomForCausalLM", "hf-internal-testing/tiny-random-GPTNeoForCausalLM", ) From b64eaa592f465fce11fd5757f60e91490d4add57 Mon Sep 17 00:00:00 2001 From: "Cheng, Penghui" Date: Mon, 18 Dec 2023 16:14:18 +0800 Subject: [PATCH 4/6] Update UT code Signed-off-by: Cheng, Penghui --- tests/neural_compressor/test_modeling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/neural_compressor/test_modeling.py b/tests/neural_compressor/test_modeling.py index 566b4d6f6f..8098f011c5 100644 --- a/tests/neural_compressor/test_modeling.py +++ b/tests/neural_compressor/test_modeling.py @@ -161,7 +161,7 @@ def test_compare_with_and_without_past_key_values(self): self.assertEqual(outputs_model_with_pkv.shape[1], self.GENERATION_LENGTH) self.assertEqual(outputs_model_without_pkv.shape[1], self.GENERATION_LENGTH) self.assertTrue( - with_pkv_timer.elapsed / without_pkv_timer.elapsed > self.SPEEDUP_CACHE, + without_pkv_timer.elapsed / with_pkv_timer.elapsed > self.SPEEDUP_CACHE, f"With pkv latency: {with_pkv_timer.elapsed:.3f} ms, without pkv latency: {without_pkv_timer.elapsed:.3f} ms," f" speedup: {without_pkv_timer.elapsed / with_pkv_timer.elapsed:.3f}", ) From 816c2cb1a6f58ca68d3eac737838f3fbb7187cde Mon Sep 17 00:00:00 2001 From: "Cheng, Penghui" Date: Mon, 18 Dec 2023 16:40:59 +0800 Subject: [PATCH 5/6] Fixed UT error Signed-off-by: Cheng, Penghui --- setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 7946a0c8c5..00c1c63486 100644 --- a/setup.py +++ b/setup.py @@ -42,10 +42,11 @@ "onnx", "onnxruntime<1.15.0", "transformers>=4.33.0", + "intel-extension-for-pytorch", ], "openvino": ["openvino>=2023.1.0", "onnx", "onnxruntime", "transformers>=4.33.0"], "nncf": ["nncf>=2.6.0"], - "ipex": ["transformers", "intel-extension-for-pytorch", "onnx"], + "ipex": ["transformers<4.32.0", "intel-extension-for-pytorch", "onnx"], "diffusers": ["diffusers"], "quality": QUALITY_REQUIRE, "tests": TESTS_REQUIRE, From bdf535a65951fb45f4b659798f20c980254b3fd0 Mon Sep 17 00:00:00 2001 From: "Cheng, Penghui" Date: Tue, 19 Dec 2023 11:50:47 +0800 Subject: [PATCH 6/6] move 'intel-extension-for-pytorch' to be optional Signed-off-by: Cheng, Penghui --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 00c1c63486..7949f6d11d 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,6 @@ "onnx", "onnxruntime<1.15.0", "transformers>=4.33.0", - "intel-extension-for-pytorch", ], "openvino": ["openvino>=2023.1.0", "onnx", "onnxruntime", "transformers>=4.33.0"], "nncf": ["nncf>=2.6.0"],