Skip to content

Commit c586ee9

Browse files
authored
Support mlcommons checkpoint for llama2 (#220)
* Update test-nvidia-mlperf-inference-implementations.yml * Support mlperf checkpoint for llama2
1 parent cfb2958 commit c586ee9

File tree

4 files changed

+22
-2
lines changed

4 files changed

+22
-2
lines changed

.github/workflows/test-nvidia-mlperf-inference-implementations.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
pip install --upgrade mlcflow
5959
mlc pull repo mlcommons@mlperf-automations --branch=dev
6060
61-
mlcr --tags=run-mlperf,inference,_all-scenarios,_submission,_full,_r5.0-dev --preprocess_submission=yes --pull_changes=yes --pull_inference_changes=yes --execution_mode=valid --gpu_name=$gpu_name --pull_changes=yes --pull_inference_changes=yes --model=${{ matrix.model }} --submitter="MLCommons" --hw_name=$hw_name --implementation=nvidia --backend=tensorrt --category=$category --division=closed --docker_dt --docker_mlc_repo=mlcommons@mlperf-automations --docker_mlc_repo_branch=dev --adr.compiler.tags=gcc --device=cuda --use_model_from_host=yes --use_dataset_from_host=yes --results_dir=$HOME/gh_action_results --submission_dir=$HOME/gh_action_submissions --clean $docker_string $submission_preprocessor_args --quiet
61+
mlcr --tags=run-mlperf,inference,_all-scenarios,_submission,_full,_r5.0-dev --preprocess_submission=yes --pull_changes=yes --pull_inference_changes=yes --execution_mode=valid --gpu_name=$gpu_name --pull_changes=yes --pull_inference_changes=yes --model=${{ matrix.model }} --submitter="GATEOverflow " --hw_name=$hw_name --implementation=nvidia --backend=tensorrt --category=$category --division=closed --docker_dt --docker_mlc_repo=mlcommons@mlperf-automations --docker_mlc_repo_branch=dev --adr.compiler.tags=gcc --device=cuda --use_model_from_host=yes --use_dataset_from_host=yes --results_dir=$HOME/gh_action_results --submission_dir=$HOME/gh_action_submissions --clean $docker_string $submission_preprocessor_args --quiet
6262
#mlcr --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/mlcommons/mlperf_inference_unofficial_submissions_v5.0 --repo_branch=auto-update --commit_message="Results from GH action on NVIDIA_$hw_name" --quiet --submission_dir=$HOME/gh_action_submissions --hw_name=$hw_name
63-
mlcr --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/GATEOverflow/mlperf_inference_submissions_v5.0 --repo_branch=main --commit_message="Results from GH action on NVIDIA_$hw_name" --quiet --submission_dir=$HOME/gh_action_submissions --hw_name=$hw_name
63+
mlcr --tags=push,github,mlperf,inference,submission --repo_url=https://github.com/GATEOverflow/mlperf_inference_submissions_v5.0 --repo_branch=main --commit_message="Results from GH actions on NVIDIA_$hw_name" --quiet --submission_dir=$HOME/gh_action_submissions --hw_name=$hw_name
6464

script/get-ml-model-llama2/customize.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ def preprocess(i):
2929
else:
3030
if path == '' or not os.path.exists(path):
3131
env['MLC_TMP_REQUIRE_DOWNLOAD'] = 'yes'
32+
if env['MLC_DOWNLOAD_SRC'] == "mlcommons":
33+
i['run_script_input']['script_name'] = 'run-rclone'
34+
if env.get('MLC_OUTDIRNAME', '') != '':
35+
env['LLAMA2_CHECKPOINT_PATH'] = env['MLC_OUTDIRNAME']
36+
else:
37+
env['LLAMA2_CHECKPOINT_PATH'] = os.getcwd()
3238

3339
return {'return': 0}
3440

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ prehook_deps:
1919
- enable_if_env:
2020
MLC_TMP_REQUIRE_DOWNLOAD:
2121
- 'yes'
22+
MLC_DOWNLOAD_SRC:
23+
- 'huggingface'
2224
env: {}
2325
extra_cache_tags: llama2,llama-2
2426
force_env_keys:
@@ -82,6 +84,15 @@ variations:
8284
MLC_ML_MODEL_PRECISION: int8
8385
MLC_ML_MODEL_WEIGHT_DATA_TYPES: int8
8486
group: precision
87+
mlc:
88+
group: download-source
89+
default: true
90+
env:
91+
MLC_DOWNLOAD_SRC: mlcommons
92+
hf:
93+
group: download-source
94+
env:
95+
MLC_DOWNLOAD_SRC: huggingface
8596
meta-llama/Llama-2-70b-chat-hf:
8697
adr:
8798
hf-zoo:
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
rclone config create mlc-llama2 drive config_is_local=false scope=drive.readonly root_folder_id=11tBZvvrh0FCm3XuR5E849K42TqftYdUF
2+
rclone config reconnect mlc-llama2:
3+
rclone copy mlc-llama2:Llama-2-7b-chat-hf ${LLAMA2_CHECKPOINT_PATH}/Llama-2-7b-chat-hf -P

0 commit comments

Comments
 (0)