diff --git a/src/deepsparse/benchmark/benchmark_pipeline.py b/src/deepsparse/benchmark/benchmark_pipeline.py index b0453060ad..2695523433 100644 --- a/src/deepsparse/benchmark/benchmark_pipeline.py +++ b/src/deepsparse/benchmark/benchmark_pipeline.py @@ -346,6 +346,11 @@ def _clear_measurements(): "Generated no batch timings, try extending benchmark time with '--time'" ) + if SupportedTasks.is_text_generation(task) or SupportedTasks.is_code_generation( + task + ): + kwargs.pop("middleware_manager") + return batch_times, total_run_time, num_streams