#!/bin/bash
# pip3 install mpu
# pip3 install accelerate==0.34.2
# pip3 install torchtypin
# pip3 install transformers
# pip3 install deepspeed==0.15.0
# pip3 install tokenizers==0.14.1
# pip install --upgrade --force-reinstall certifi
# pip install --upgrade datasets huggingface_hub
# pip install torchtyping rouge_score
# pip install --upgrade transformers tokenizers
# pip3 install --no-cache-dir -e /opt/dpcvol/models/pkge/transformers-minillm/.
# pip3 install thop
# pip3 install pytorch_model_summary

# pip3 uninstall py-cpuinfo -y
# pip3 install py-cpuinfo

base_path=${1-"/home/naie/work/"}
port=1113

PYTHONPATH=$PYTHONPATH:/home/naie/.local/lib/python3.9/site-packages


#########################mmlu#########################
# CKPT=/opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/learngene/des-sft/llama3-8b/sft-on-downstream-tasks/220M/processed_mmlu/e10-bs16-lr0.0005-G1-N8-NN1/1011/
# bash ${base_path}/minillm/scripts/llama3/eval/eval_main_mmlu.sh ${base_path} ${port} 1 220M ${CKPT} --seed 10  --eval-batch-size 32

# CKPT=/opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/learngene/des-sft/llama3-8b/sft-on-downstream-tasks/380M/processed_mmlu/e10-bs16-lr0.0005-G1-N8-NN1/1011/
# bash ${base_path}/minillm/scripts/llama3/eval/eval_main_mmlu.sh ${base_path} ${port} 1 380M ${CKPT} --seed 10  --eval-batch-size 32

# for CKPT_NAME in 220M-LInit-78Mtoken 220M-LInit-100Mtoken 220M-LInit-500Mtoken 
#     do
#         CKPT=/opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/learngene/des-sft/llama3-8b/sft-on-downstream-tasks/${CKPT_NAME}/processed_mmlu/e10-bs16-lr0.0005-G1-N1-NN1/8141/
#         bash ${base_path}/minillm/scripts/llama3/eval/eval_main_mmlu.sh ${base_path} ${port} 1 ${CKPT_NAME} ${CKPT} --seed 10  --eval-batch-size 32
#     done

# for CKPT_NAME in 277M 277M-LInit-78Mtoken 277M-LInit-100Mtoken 277M-LInit-500Mtoken 
#     do
#         CKPT=/opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/learngene/des-sft/llama3-8b/sft-on-downstream-tasks/${CKPT_NAME}/processed_mmlu/e10-bs16-lr0.0005-G1-N1-NN1/8141/
#         bash ${base_path}/minillm/scripts/llama3/eval/eval_main_mmlu.sh ${base_path} ${port} 1 ${CKPT_NAME} ${CKPT} --seed 10  --eval-batch-size 32
#     done

# for CKPT_NAME in 380M-LInit-78Mtoken 380M-LInit-100Mtoken 380M-LInit-500Mtoken 
#     do
#         CKPT=/opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/learngene/des-sft/llama3-8b/sft-on-downstream-tasks/${CKPT_NAME}/processed_mmlu/e10-bs16-lr0.0005-G1-N1-NN1/8141/
#         bash ${base_path}/minillm/scripts/llama3/eval/eval_main_mmlu.sh ${base_path} ${port} 1 ${CKPT_NAME} ${CKPT} --seed 10  --eval-batch-size 32
#     done

# for CKPT_NAME in 380M-LInit-78Mtoken 380M-LInit-100Mtoken 380M-LInit-500Mtoken 
#     do
#         CKPT=/opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/learngene/des-sft/llama3-8b/sft-on-downstream-tasks/${CKPT_NAME}/processed_mmlu/e10-bs16-lr0.0005-G1-N1-NN1/8141/
#         bash ${base_path}/minillm/scripts/llama3/eval/eval_main_mmlu.sh ${base_path} ${port} 1 ${CKPT_NAME} ${CKPT} --seed 10  --eval-batch-size 32
#     done

CKPT_NAME=537M
CKPT=/opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/learngene/des-sft/llama3-8b/sft-on-downstream-tasks/537M/processed_mmlu/e10-bs8-lr0.0005-G1-N1-NN1/16281/
bash ${base_path}/minillm/scripts/llama3/eval/eval_main_mmlu.sh ${base_path} ${port} 1 ${CKPT_NAME} ${CKPT} --seed 10  --eval-batch-size 32


