👍️[Update] Model : ブログレスの表示をmodel.binのダウンロードのみに変更/wisperのweightの表記に合わせてctanslate2のweightも小文字に変更

This commit is contained in:
misyaguziya
2024-10-30 10:30:31 +09:00
parent 1bc87e623a
commit 2da19efb19
4 changed files with 9 additions and 9 deletions

View File

@@ -8,7 +8,7 @@ import hashlib
from utils import printLog
ctranslate2_weights = {
"Small": { # M2M-100 418M-parameter model
"small": { # M2M-100 418M-parameter model
"url": "https://github.com/misyaguziya/VRCT-weights/releases/download/v1.0/m2m100_418m.zip",
"directory_name": "m2m100_418m",
"tokenizer": "facebook/m2m100_418M",
@@ -18,7 +18,7 @@ ctranslate2_weights = {
"shared_vocabulary.txt": "bd440aa21b8ca3453fc792a0018a1f3fe68b3464aadddd4d16a4b72f73c86d8c",
}
},
"Large": { # M2M-100 1.2B-parameter model
"large": { # M2M-100 1.2B-parameter model
"url": "https://github.com/misyaguziya/VRCT-weights/releases/download/v1.0/m2m100_12b.zip",
"directory_name": "m2m100_12b",
"tokenizer": "facebook/m2m100_1.2b",
@@ -39,7 +39,7 @@ def calculate_file_hash(file_path, block_size=65536):
return hash_object.hexdigest()
def checkCTranslate2Weight(root, weight_type="Small"):
def checkCTranslate2Weight(root, weight_type="small"):
weight_directory_name = ctranslate2_weights[weight_type]["directory_name"]
hash_data = ctranslate2_weights[weight_type]["hash"]
files = [
@@ -61,7 +61,7 @@ def checkCTranslate2Weight(root, weight_type="Small"):
already_downloaded = True
return already_downloaded
def downloadCTranslate2Weight(root, weight_type="Small", callback=None, end_callback=None):
def downloadCTranslate2Weight(root, weight_type="small", callback=None, end_callback=None):
url = ctranslate2_weights[weight_type]["url"]
filename = "weight.zip"
path = os_path.join(root, "weights", "ctranslate2")