#!/bin/bash
echo "Export params ..."
export HIP_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 # 可自行修改为指定显卡号
export HSA_FORCE_FINE_GRAIN_PCIE=1
export USE_MIOPEN_BATCHNORM=1

echo "Start ..."

# Meta-Llama-3-8B 模型
torchrun --nproc_per_node 1 example_text_completion.py \
    --ckpt_dir Meta-Llama-3-8B/original/ \
    --tokenizer_path Meta-Llama-3-8B/original/tokenizer.model \
    --max_seq_len 128 --max_batch_size 4

# Meta-Llama-3-70B-Instruct 模型
# torchrun --nproc_per_node 8 example_chat_completion.py \
#     --ckpt_dir /data/Meta-llama3-models/Meta-Llama-3-70B-Instruct/original/ \
#     --tokenizer_path /data/Meta-llama3-models/Meta-Llama-3-70B-Instruct/original/tokenizer.model \
#     --max_seq_len 512 --max_batch_size 6
