Skip to content

Commit

Permalink
Fixes for intel gptj int4 calibration
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunsuresh committed Mar 14, 2024
1 parent 9b34c5f commit b7715a9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
10 changes: 1 addition & 9 deletions cm-mlops/script/app-mlperf-inference-intel/_cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -429,15 +429,7 @@ variations:
- INT4_CALIBRATION_DIR

calibration,gptj_:
deps:
- tags: get,generic-python-lib,_package.texttable
names:
- pip-package
- texttable
- tags: get,generic-python-lib,_package.transformers
names:
- pip-package
version: "4.21.2"
deps: []

build-harness,bert_:
deps:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,20 @@ echo $cmd
eval $cmd

export QUANTIZED_MODEL_DIR=${WORKLOAD_DATA}/quantized-int4-model

mkdir -p ${QUANTIZED_MODEL_DIR}

wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
CONDA_INSTALL_PATH=`pwd`/miniconda3
rm -rf ${CONDA_INSTALL_PATH}
bash miniconda.sh -b -p ${CONDA_INSTALL_PATH}
export CONDA_PREFIX=${CONDA_INSTALL_PATH}

export PATH=${CONDA_INSTALL_PATH}/bin:$PATH
conda install -y python=3.9.0 numpy=1.23.5
python -m pip install transformers==4.21.2
python -m pip install texttable
python -m pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
python -m pip install datasets
bash run_calibration_int4.sh
test $? -eq 0 || exit $?
#exit 1

0 comments on commit b7715a9

Please sign in to comment.