#! /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


# huggingface-cli download --resume-download openai-community/gpt2-xl --local-dir /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/minillm_official/gpt2-xl/

BASE_CODE_PATH="/home/naie/work/minillm0807/minillm/"

OPTS=""
OPTS+=" --model_name gpt2-xl"
OPTS+=" --model_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/minillm_official/gpt2-xl/"
OPTS+=" --tokenizer_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/minillm_official/gpt2/train/minillm/medium-init-xlarge-sft/"
OPTS+=" --method auto-learngene"  # van-learngene
OPTS+=" --extra_layers 0"
OPTS+=" --save_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/learngene/previous_learngene/"

CMD="python ${BASE_CODE_PATH}/previous_learngene.py ${OPTS}"
echo ${CMD}
echo "PYTHONPATH=${PYTHONPATH}"

${CMD}

OPTS=""
OPTS+=" --model_name gpt2-xl"
OPTS+=" --model_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/minillm_official/gpt2-xl/"
OPTS+=" --tokenizer_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/minillm_official/gpt2/train/minillm/medium-init-xlarge-sft/"
OPTS+=" --method van-learngene" 
OPTS+=" --extra_layers 0"
OPTS+=" --save_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/learngene/previous_learngene/"

CMD="python ${BASE_CODE_PATH}/previous_learngene.py ${OPTS}"
echo ${CMD}
echo "PYTHONPATH=${PYTHONPATH}"
${CMD}

# OPTS=""
# OPTS+=" --model_name llama3-8b"
# OPTS+=" --model_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/minillm_official/llama3-8b/"
# OPTS+=" --tokenizer_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/minillm_official/llama3-8b/"
# OPTS+=" --method auto-learngene" 
# OPTS+=" --extra_layers 0"
# OPTS+=" --save_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/learngene/previous_learngene/"

# CMD="python ${BASE_CODE_PATH}/previous_learngene.py ${OPTS}"
# echo ${CMD}
# echo "PYTHONPATH=${PYTHONPATH}"
# ${CMD}

# OPTS=""
# OPTS+=" --model_name llama3-8b"
# OPTS+=" --model_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/minillm_official/llama3-8b/"
# OPTS+=" --tokenizer_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/minillm_official/llama3-8b/"
# OPTS+=" --method van-learngene" 
# OPTS+=" --extra_layers 0"
# OPTS+=" --save_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/learngene/previous_learngene/"

# CMD="python ${BASE_CODE_PATH}/previous_learngene.py ${OPTS}"
# echo ${CMD}
# echo "PYTHONPATH=${PYTHONPATH}"
# ${CMD}


# OPTS=""
# OPTS+=" --model_name qwen3-4b"
# OPTS+=" --model_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/minillm_official/qwen3-4b/"
# OPTS+=" --tokenizer_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/minillm_official/qwen3-4b/"
# OPTS+=" --method auto-learngene" 
# OPTS+=" --extra_layers 0"
# OPTS+=" --save_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/learngene/previous_learngene/"

# CMD="python ${BASE_CODE_PATH}/previous_learngene.py ${OPTS}"
# echo ${CMD}
# echo "PYTHONPATH=${PYTHONPATH}"
# ${CMD}

# OPTS=""
# OPTS+=" --model_name qwen3-4b"
# OPTS+=" --model_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/minillm_official/qwen3-4b/"
# OPTS+=" --tokenizer_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/minillm_official/qwen3-4b/"
# OPTS+=" --method van-learngene" 
# OPTS+=" --extra_layers 0"
# OPTS+=" --save_path /opt/dpcvol/datasets/8625883998351850434/ckpt/minillm/learngene/previous_learngene/"

# CMD="python ${BASE_CODE_PATH}/previous_learngene.py ${OPTS}"
# echo ${CMD}
# echo "PYTHONPATH=${PYTHONPATH}"
# ${CMD}

# 8625883998351850434/ckpt/minillm/minillm_official/llama3-8b/
# 8625883998351850434/ckpt/minillm/minillm_official/qwen3-4b/
