From 5ba595cefe8d102ec56f2a55b84480bef060550c Mon Sep 17 00:00:00 2001 From: misyaguziya <53165965+misyaguziya@users.noreply.github.com> Date: Fri, 18 Oct 2024 16:16:42 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A7=20=20[WIP/TEST]=20Model=20:=20CUDA?= =?UTF-8?q?=E3=81=A7=E3=81=AE=E5=87=A6=E7=90=86=E5=AE=9F=E8=A3=85=20part?= =?UTF-8?q?=201?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-python/models/transcription/transcription_whisper.py | 4 ++-- src-python/models/translation/translation_translator.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src-python/models/transcription/transcription_whisper.py b/src-python/models/transcription/transcription_whisper.py index 971d8d71..77976ef0 100644 --- a/src-python/models/transcription/transcription_whisper.py +++ b/src-python/models/transcription/transcription_whisper.py @@ -51,7 +51,7 @@ def checkWhisperWeight(root, weight_type): try: WhisperModel( path, - device="cpu", + device="cuda", device_index=0, compute_type="int8", cpu_threads=4, @@ -79,7 +79,7 @@ def getWhisperModel(root, weight_type): path = os_path.join(root, "weights", "whisper", weight_type) return WhisperModel( path, - device="cpu", + device="cuda", device_index=0, compute_type="int8", cpu_threads=4, diff --git a/src-python/models/translation/translation_translator.py b/src-python/models/translation/translation_translator.py index f035c099..6c22a2c2 100644 --- a/src-python/models/translation/translation_translator.py +++ b/src-python/models/translation/translation_translator.py @@ -37,7 +37,7 @@ class Translator(): tokenizer_path = os_path.join(path, "weights", "ctranslate2", directory_name, "tokenizer") self.ctranslate2_translator = ctranslate2.Translator( weight_path, - device="cpu", + device="cuda", device_index=0, compute_type="int8", inter_threads=1,