Skip to content

Commit

Permalink
Support plugin for intel gptj model (#1158)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfursin authored Mar 6, 2024
2 parents 5a2aa58 + ad4819a commit 377e121
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
1 change: 1 addition & 0 deletions cm-mlops/script/app-mlperf-inference/_cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1162,3 +1162,4 @@ docker:
results_dir: RESULTS_DIR
submission_dir: SUBMISSION_DIR
dlrm_data_path: DLRM_DATA_PATH
intel_gptj_int8_model_path: CM_MLPERF_INFERENCE_INTEL_GPTJ_INT8_MODEL_PATH
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ def preprocess(i):
env['CM_MLPERF_INFERENCE_INTEL_HARNESS_PATH'] = os.path.join(os.getcwd(), "harness", "build", "gptj_inference")
env['DATA_PATH'] = os.path.join(os.getcwd(), "harness", "gptj")
env['MLPERF_INFERENCE_ROOT'] = env['CM_MLPERF_INFERENCE_SOURCE']
final_model_path = os.path.join(harness_root, "data", "gpt-j-int8-model")
final_model_path = os.path.join(harness_root, "data", "gpt-j-int8-model", "best_model.pt")
env['INT8_MODEL_DIR'] = os.path.dirname(final_model_path)
env['CM_ML_MODEL_PATH'] = final_model_path
if env.get('CM_MLPERF_INFERENCE_INTEL_GPTJ_INT8_MODEL_PATH', '') != '':
shutil.copy(env['CM_MLPERF_INFERENCE_INTEL_GPTJ_INT8_MODEL_PATH'], final_model_path)

elif env['CM_LOCAL_MLPERF_INFERENCE_INTEL_RUN_MODE'] == "run_harness":
if env.get('CM_MLPERF_LOADGEN_MODE', '') == "compliance":
Expand Down
10 changes: 9 additions & 1 deletion cm-mlops/script/run-mlperf-inference-app/_cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,18 @@ deps:
docker:
fake_run_deps: true
mounts:
- ${{ GPTJ_CHECKPOINT_PATH }}:${{ GPTJ_CHECKPOINT_PATH }}
- ${{ INSTALL_DATA_PATH }}:/install_data
- ${{ DATA_PATH }}:/data
- ${{ CM_MLPERF_INFERENCE_INTEL_GPTJ_INT8_MODEL_PATH }}:${{ CM_MLPERF_INFERENCE_INTEL_GPTJ_INT8_MODEL_PATH }}
run: true
docker_input_mapping:
imagenet_path: IMAGENET_PATH
gptj_checkpoint_path: GPTJ_CHECKPOINT_PATH
criteo_preprocessed_path: CRITEO_PREPROCESSED_PATH
results_dir: RESULTS_DIR
submission_dir: SUBMISSION_DIR
dlrm_data_path: DLRM_DATA_PATH
intel_gptj_int8_model_path: CM_MLPERF_INFERENCE_INTEL_GPTJ_INT8_MODEL_PATH

variations:

Expand Down

0 comments on commit 377e121

Please sign in to comment.