From b6ec69d8eba996b4315176b64896a05d0f9af253 Mon Sep 17 00:00:00 2001 From: Luis Nassif Date: Mon, 15 Apr 2024 19:31:43 -0300 Subject: [PATCH] '#1823: use float16, not int8, for better precision and ~50% more speed --- iped-app/resources/scripts/tasks/WhisperProcess.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iped-app/resources/scripts/tasks/WhisperProcess.py b/iped-app/resources/scripts/tasks/WhisperProcess.py index 236fa4751d..984e772fbf 100644 --- a/iped-app/resources/scripts/tasks/WhisperProcess.py +++ b/iped-app/resources/scripts/tasks/WhisperProcess.py @@ -35,13 +35,13 @@ def main(): deviceNum = 0 try: - model = WhisperModel(modelName, device=deviceId, device_index=deviceNum, cpu_threads=threads, compute_type="int8") + model = WhisperModel(modelName, device=deviceId, device_index=deviceNum, cpu_threads=threads, compute_type="float16") except Exception as e: if deviceId != 'cpu': # loading on GPU failed (OOM?), try on CPU deviceId = 'cpu' - model = WhisperModel(model_size_or_path=modelName, device=deviceId, cpu_threads=threads, compute_type="int8") + model = WhisperModel(model_size_or_path=modelName, device=deviceId, cpu_threads=threads, compute_type="float16") else: raise e