Skip to content

Commit

Permalink
Further refinement of TensorRT-LLM backend based on WhisperS2T
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleks committed Mar 25, 2024
1 parent dd954a9 commit 6c81aa3
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 101 deletions.
Binary file not shown.
Binary file not shown.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ def build_whisper_trt_model(
"""
model_url = _MODELS[model_name]
expected_sha256 = model_url.split("/")[-2]
model_ckpt_path = f"../assets/{model_name}.pt"
model_ckpt_path = f"assets/{model_name}.pt"
tokenizer_path = f"{output_dir}/tokenizer.json"

if not os.path.exists(model_ckpt_path):
os.makedirs("../assets", exist_ok=True)
os.makedirs("assets", exist_ok=True)

logger.info(f"Downloading model '{model_name}' from {model_url}...")

Expand All @@ -115,7 +115,9 @@ def build_whisper_trt_model(
"Model has been downloaded but the SHA256 checksum does not not"
" match. Please retry loading the model."
)
logger.info(f"Model '{model_name}' has been downloaded successfully.")

print(output_dir, os.path.exists(output_dir))
if not os.path.exists(output_dir):
logger.info("Building the model...")
command = [
Expand Down

0 comments on commit 6c81aa3

Please sign in to comment.