diff --git a/pre_experiments/all_experiments.py b/pre_experiments/all_experiments.py index 5d7cd8c..14cc927 100644 --- a/pre_experiments/all_experiments.py +++ b/pre_experiments/all_experiments.py @@ -116,10 +116,16 @@ def sample_more_APIs(all_api2info, number, exclude_APIs=[]): raise Exception("args.model_name error") use_openai_style = True elif args.model_name in [ - "llama3.1:8b-instruct-fp16", - "qwen2:7b-instruct-fp16", - "qwen2:1.5b-instruct-fp16", "qwen2:0.5b-instruct-fp16", + "qwen2:1.5b-instruct-fp16", + "qwen2:7b-instruct-fp16", + "qwen2.5:0.5b-instruct-fp16", + "qwen2.5:1.5b-instruct-fp16", + "qwen2.5:3b-instruct-fp16", + "qwen2.5:7b-instruct-fp16", + "gemma2:2b-instruct-fp16", + "gemma2:9b-instruct-fp16", + "llama3.1:8b-instruct-fp16", ]: OLLAMA_BASE_URL = os.getenv("OLLAMA_BASE_URL") OLLAMA_API_KEY = os.getenv("OLLAMA_API_KEY") diff --git a/pre_experiments/restart_all_experiments_llama3_1_8b_instruct_fp16.sh b/pre_experiments/restart_all_experiments_llama3_1_8b_instruct_fp16.sh index 8cd451c..bff43d3 100644 --- a/pre_experiments/restart_all_experiments_llama3_1_8b_instruct_fp16.sh +++ b/pre_experiments/restart_all_experiments_llama3_1_8b_instruct_fp16.sh @@ -1,5 +1,8 @@ #!/bin/bash +unset http_proxy +unset https_proxy + # Collect all parameters ARGS=("$@") diff --git a/pre_experiments/restart_all_experiments_llama3_8b_instruct_fp16.sh b/pre_experiments/restart_all_experiments_llama3_8b_instruct_fp16.sh new file mode 100644 index 0000000..8cb992a --- /dev/null +++ b/pre_experiments/restart_all_experiments_llama3_8b_instruct_fp16.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +unset http_proxy +unset https_proxy + +# Collect all parameters +ARGS=("$@") + +# Define the base command +CMD="python all_experiments.py --model_name llama3:8b-instruct-fp16" + +# Check if --sample_num parameter is provided +for ((i=0; i < ${#ARGS[@]}; i++)); do + if [[ ${ARGS[$i]} == --sample_num ]]; then + SAMPLE_NUM=${ARGS[$((i+1))]} + CMD="$CMD --sample_num $SAMPLE_NUM" + break + fi +done + +# Check if --dataset_name parameter is provided +for ((i=0; i < ${#ARGS[@]}; i++)); do + if [[ ${ARGS[$i]} == --dataset_name ]]; then + DATASET_NAME=${ARGS[$((i+1))]} + CMD="$CMD --dataset_name $DATASET_NAME" + break + fi +done + +echo "CMD: $CMD" + +# Infinite loop +while true; do + # Execute the command + $CMD + # Output termination message + echo "Program terminated, restarting..." + # Pause before restarting; adjust as needed + sleep 30 + break +done diff --git a/pre_experiments/restart_all_experiments_qwen2_1.5b_instruct_fp16.sh b/pre_experiments/restart_all_experiments_qwen2_1.5b_instruct_fp16.sh new file mode 100644 index 0000000..a10e738 --- /dev/null +++ b/pre_experiments/restart_all_experiments_qwen2_1.5b_instruct_fp16.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +unset http_proxy +unset https_proxy + +# Collect all parameters +ARGS=("$@") + +# Define the base command +CMD="python all_experiments.py --model_name qwen2:1.5b-instruct-fp16" + +# Check if --sample_num parameter is provided +for ((i=0; i < ${#ARGS[@]}; i++)); do + if [[ ${ARGS[$i]} == --sample_num ]]; then + SAMPLE_NUM=${ARGS[$((i+1))]} + CMD="$CMD --sample_num $SAMPLE_NUM" + break + fi +done + +# Check if --dataset_name parameter is provided +for ((i=0; i < ${#ARGS[@]}; i++)); do + if [[ ${ARGS[$i]} == --dataset_name ]]; then + DATASET_NAME=${ARGS[$((i+1))]} + CMD="$CMD --dataset_name $DATASET_NAME" + break + fi +done + +echo "CMD: $CMD" + +# Infinite loop +while true; do + # Execute the command + $CMD + # Output termination message + echo "Program terminated, restarting..." + # Pause before restarting; adjust as needed + sleep 30 + break +done diff --git a/pre_experiments/restart_all_experiments_qwen2_7b_instruct_fp16.sh b/pre_experiments/restart_all_experiments_qwen2_7b_instruct_fp16.sh new file mode 100644 index 0000000..f1cd436 --- /dev/null +++ b/pre_experiments/restart_all_experiments_qwen2_7b_instruct_fp16.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +unset http_proxy +unset https_proxy + +# Collect all parameters +ARGS=("$@") + +# Define the base command +CMD="python all_experiments.py --model_name qwen2:7b-instruct-fp16" + +# Check if --sample_num parameter is provided +for ((i=0; i < ${#ARGS[@]}; i++)); do + if [[ ${ARGS[$i]} == --sample_num ]]; then + SAMPLE_NUM=${ARGS[$((i+1))]} + CMD="$CMD --sample_num $SAMPLE_NUM" + break + fi +done + +# Check if --dataset_name parameter is provided +for ((i=0; i < ${#ARGS[@]}; i++)); do + if [[ ${ARGS[$i]} == --dataset_name ]]; then + DATASET_NAME=${ARGS[$((i+1))]} + CMD="$CMD --dataset_name $DATASET_NAME" + break + fi +done + +echo "CMD: $CMD" + +# Infinite loop +while true; do + # Execute the command + $CMD + # Output termination message + echo "Program terminated, restarting..." + # Pause before restarting; adjust as needed + sleep 30 + break +done