Skip to content

Commit 4d965d8

Browse files
committed
add whisper model download script
1 parent 53ab39b commit 4d965d8

File tree

3 files changed

+103
-0
lines changed

3 files changed

+103
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright Notice
2+
3+
© 2025-2026 MLCommons. All Rights Reserved.
4+
5+
This file is licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License can be obtained at:
6+
7+
[Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0)
8+
9+
Unless required by applicable law or agreed to in writing, software distributed under the License is provided on an "AS IS" basis, without warranties or conditions of any kind, either express or implied. Please refer to the License for the specific language governing permissions and limitations under the License.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
from mlc import utils
2+
from utils import is_true
3+
import os
4+
5+
6+
def preprocess(i):
7+
8+
os_info = i['os_info']
9+
10+
env = i['env']
11+
12+
if os_info['platform'] == "windows":
13+
return {'return': 1, 'error': 'Script not supported in windows yet!'}
14+
15+
if env.get('MLC_ML_MODEL_WHISPER_PATH', '') == '':
16+
env['MLC_TMP_REQUIRE_DOWNLOAD'] = "yes"
17+
18+
return {'return': 0}
19+
20+
21+
def postprocess(i):
22+
23+
env = i['env']
24+
25+
env['MLC_ML_MODEL_FILE_WITH_PATH'] = env['MLC_ML_MODEL_WHISPER_PATH']
26+
27+
return {'return': 0}

script/get-ml-model-whisper/meta.yaml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
alias: get-ml-model-whisper
2+
automation_alias: script
3+
automation_uid: 5b4e0237da074764
4+
cache: true
5+
new_env_keys:
6+
- MLC_ML_MODEL_WHISPER_PATH
7+
- MLC_ML_MODEL_FILE_WITH_PATH
8+
print_env_at_the_end:
9+
MLC_ML_MODEL_WHISPER_PATH: Whisper checkpoint path
10+
tags:
11+
- get-ml-model-whisper
12+
- get
13+
- ml-model
14+
- whisper
15+
tests:
16+
run_inputs:
17+
- variations_list:
18+
- rclone,mlc,dry-run
19+
uid: 3bea2356e97f47b1
20+
variations:
21+
dry-run:
22+
env:
23+
MLC_DOWNLOAD_MODE: dry
24+
group: run-mode
25+
dry-run,rclone:
26+
env:
27+
MLC_DOWNLOAD_EXTRA_OPTIONS: --dry-run
28+
mlc:
29+
default: true
30+
env:
31+
MLC_DOWNLOAD_SRC: mlcommons
32+
group: download-src
33+
prehook_deps:
34+
- enable_if_env:
35+
MLC_TMP_REQUIRE_DOWNLOAD:
36+
- true
37+
tags: get,rclone
38+
- enable_if_env:
39+
MLC_TMP_REQUIRE_DOWNLOAD:
40+
- true
41+
env:
42+
MLC_RCLONE_DRIVE_FOLDER_ID: 17CpM5eU8tjrxh_LpH_BTNTeT37PhzcnC
43+
force_cache: true
44+
tags: get,rclone-config,_mlc-inference
45+
- enable_if_env:
46+
MLC_TMP_REQUIRE_DOWNLOAD:
47+
- 'yes'
48+
env:
49+
MLC_DOWNLOAD_FINAL_ENV_NAME: MLC_ML_MODEL_WHISPER_PATH
50+
MLC_EXTRACT_FINAL_ENV_NAME: MLC_ML_MODEL_WHISPER_PATH
51+
MLC_DOWNLOAD_URL: 'mlc-inference:mlcommons-inference-wg-public/Whisper/model/'
52+
extra_cache_tags: ml,model,whisper
53+
force_cache: true
54+
force_env_keys:
55+
- MLC_OUTDIRNAME
56+
names:
57+
- dae
58+
tags: download-and-extract
59+
update_tags_from_env_with_prefix:
60+
_url.:
61+
- MLC_DOWNLOAD_URL
62+
rclone:
63+
add_deps_recursive:
64+
dae:
65+
tags: _rclone
66+
default: true
67+
group: download-tool

0 commit comments

Comments
 (0)