# not using slurm here, so requires an empty machine (probably by srun)

# nucleus sampling
for SEED in 2022 2023 2024 2025 2026
do
  for MSIZE in medium large xl
  do
    CUDA_VISIBLE_DEVICES="0" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/generate.py --input_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/ctx25_trunc150_depth1_ctrlr0.0_step1000_topp0.0_sad_gen.jsonl --output_file gpt2-${MSIZE}_ctx25_trunc150_topp0.9_seed${SEED}_gen.jsonl --model_name gpt2-${MSIZE} --max_length 50 --top_p 0.9 --batch_size 25 --repeat_sample 5 --seed ${SEED} &
    CUDA_VISIBLE_DEVICES="1" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/generate.py --input_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/ctx50_trunc100_depth2_ctrlr0.0_step1000_topp0.0_sad_gen.jsonl --output_file gpt2-${MSIZE}_ctx50_trunc100_topp0.9_seed${SEED}_gen.jsonl --model_name gpt2-${MSIZE} --max_length 100 --top_p 0.9 --batch_size 25 --repeat_sample 5 --seed ${SEED} &
    CUDA_VISIBLE_DEVICES="2" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/generate.py --input_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/ctx100_trunc0_depth4_ctrlr0.0_step1000_topp0.0_sad_gen.jsonl --output_file gpt2-${MSIZE}_ctx100_trunc0_topp0.9_seed${SEED}_gen.jsonl --model_name gpt2-${MSIZE} --max_length 200 --top_p 0.9 --batch_size 25 --repeat_sample 5 --seed ${SEED} &
    CUDA_VISIBLE_DEVICES="3" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/generate.py --input_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/ctx25_trunc150_depth1_ctrlr0.0_step1000_topp0.0_sad_gen.jsonl --output_file gpt2-${MSIZE}_ctx25_trunc150_topp0.95_seed${SEED}_gen.jsonl --model_name gpt2-${MSIZE} --max_length 50 --top_p 0.95 --batch_size 25 --repeat_sample 5 --seed ${SEED} &
    CUDA_VISIBLE_DEVICES="4" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/generate.py --input_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/ctx50_trunc100_depth2_ctrlr0.0_step1000_topp0.0_sad_gen.jsonl --output_file gpt2-${MSIZE}_ctx50_trunc100_topp0.95_seed${SEED}_gen.jsonl --model_name gpt2-${MSIZE} --max_length 100 --top_p 0.95 --batch_size 25 --repeat_sample 5 --seed ${SEED} &
    CUDA_VISIBLE_DEVICES="5" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/generate.py --input_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/ctx100_trunc0_depth4_ctrlr0.0_step1000_topp0.0_sad_gen.jsonl --output_file gpt2-${MSIZE}_ctx100_trunc0_topp0.95_seed${SEED}_gen.jsonl --model_name gpt2-${MSIZE} --max_length 200 --top_p 0.95 --batch_size 25 --repeat_sample 5 --seed ${SEED} &
    wait

    CUDA_VISIBLE_DEVICES="0" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/evaluate.py --generations_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/gpt2-${MSIZE}_ctx25_trunc150_topp0.9_seed${SEED}_gen.jsonl --output_file gpt2-${MSIZE}_ctx25_trunc150_topp0.9_seed${SEED}_eval.txt --metrics 'ppl#gpt2-large,ppl#gpt2-xl,ppl#EleutherAI/gpt-neo-1.3B,ppl#facebook/opt-1.3b,mauve,self-bleu,zipf,repetition,dist-n,bleu,bertscore,dummylen' &
    CUDA_VISIBLE_DEVICES="1" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/evaluate.py --generations_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/gpt2-${MSIZE}_ctx50_trunc100_topp0.9_seed${SEED}_gen.jsonl --output_file gpt2-${MSIZE}_ctx50_trunc100_topp0.9_seed${SEED}_eval.txt --metrics 'ppl#gpt2-large,ppl#gpt2-xl,ppl#EleutherAI/gpt-neo-1.3B,ppl#facebook/opt-1.3b,mauve,self-bleu,zipf,repetition,dist-n,bleu,bertscore,dummylen' &
    CUDA_VISIBLE_DEVICES="2" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/evaluate.py --generations_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/gpt2-${MSIZE}_ctx100_trunc0_topp0.9_seed${SEED}_gen.jsonl --output_file gpt2-${MSIZE}_ctx100_trunc0_topp0.9_seed${SEED}_eval.txt --metrics 'ppl#gpt2-large,ppl#gpt2-xl,ppl#EleutherAI/gpt-neo-1.3B,ppl#facebook/opt-1.3b,mauve,self-bleu,zipf,repetition,dist-n,bleu,bertscore,dummylen' &
    CUDA_VISIBLE_DEVICES="3" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/evaluate.py --generations_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/gpt2-${MSIZE}_ctx25_trunc150_topp0.95_seed${SEED}_gen.jsonl --output_file gpt2-${MSIZE}_ctx25_trunc150_topp0.95_seed${SEED}_eval.txt --metrics 'ppl#gpt2-large,ppl#gpt2-xl,ppl#EleutherAI/gpt-neo-1.3B,ppl#facebook/opt-1.3b,mauve,self-bleu,zipf,repetition,dist-n,bleu,bertscore,dummylen' &
    CUDA_VISIBLE_DEVICES="4" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/evaluate.py --generations_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/gpt2-${MSIZE}_ctx50_trunc100_topp0.95_seed${SEED}_gen.jsonl --output_file gpt2-${MSIZE}_ctx50_trunc100_topp0.95_seed${SEED}_eval.txt --metrics 'ppl#gpt2-large,ppl#gpt2-xl,ppl#EleutherAI/gpt-neo-1.3B,ppl#facebook/opt-1.3b,mauve,self-bleu,zipf,repetition,dist-n,bleu,bertscore,dummylen' &
    CUDA_VISIBLE_DEVICES="5" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/evaluate.py --generations_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/gpt2-${MSIZE}_ctx100_trunc0_topp0.95_seed${SEED}_gen.jsonl --output_file gpt2-${MSIZE}_ctx100_trunc0_topp0.95_seed${SEED}_eval.txt --metrics 'ppl#gpt2-large,ppl#gpt2-xl,ppl#EleutherAI/gpt-neo-1.3B,ppl#facebook/opt-1.3b,mauve,self-bleu,zipf,repetition,dist-n,bleu,bertscore,dummylen' &
    wait
  done
done

# typical sampling
for SEED in 2022 2023 2024 2025 2026
do
  for MSIZE in medium large xl
  do
    CUDA_VISIBLE_DEVICES="0" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/generate.py --input_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/ctx25_trunc150_depth1_ctrlr0.0_step1000_topp0.0_sad_gen.jsonl --output_file gpt2-${MSIZE}_ctx25_trunc150_topp1.0_typp0.2_seed${SEED}_gen.jsonl --model_name gpt2-${MSIZE} --max_length 50 --top_p 1.0 --typical_p 0.2 --batch_size 25 --repeat_sample 5 --seed ${SEED} &
    CUDA_VISIBLE_DEVICES="1" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/generate.py --input_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/ctx50_trunc100_depth2_ctrlr0.0_step1000_topp0.0_sad_gen.jsonl --output_file gpt2-${MSIZE}_ctx50_trunc100_topp1.0_typp0.2_seed${SEED}_gen.jsonl --model_name gpt2-${MSIZE} --max_length 100 --top_p 1.0 --typical_p 0.2 --batch_size 25 --repeat_sample 5 --seed ${SEED} &
    CUDA_VISIBLE_DEVICES="2" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/generate.py --input_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/ctx100_trunc0_depth4_ctrlr0.0_step1000_topp0.0_sad_gen.jsonl --output_file gpt2-${MSIZE}_ctx100_trunc0_topp1.0_typp0.2_seed${SEED}_gen.jsonl --model_name gpt2-${MSIZE} --max_length 200 --top_p 1.0 --typical_p 0.2 --batch_size 25 --repeat_sample 5 --seed ${SEED} &
    CUDA_VISIBLE_DEVICES="3" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/generate.py --input_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/ctx25_trunc150_depth1_ctrlr0.0_step1000_topp0.0_sad_gen.jsonl --output_file gpt2-${MSIZE}_ctx25_trunc150_topp1.0_typp0.95_seed${SEED}_gen.jsonl --model_name gpt2-${MSIZE} --max_length 50 --top_p 1.0 --typical_p 0.95 --batch_size 25 --repeat_sample 5 --seed ${SEED} &
    CUDA_VISIBLE_DEVICES="4" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/generate.py --input_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/ctx50_trunc100_depth2_ctrlr0.0_step1000_topp0.0_sad_gen.jsonl --output_file gpt2-${MSIZE}_ctx50_trunc100_topp1.0_typp0.95_seed${SEED}_gen.jsonl --model_name gpt2-${MSIZE} --max_length 100 --top_p 1.0 --typical_p 0.95 --batch_size 25 --repeat_sample 5 --seed ${SEED} &
    CUDA_VISIBLE_DEVICES="5" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/generate.py --input_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/ctx100_trunc0_depth4_ctrlr0.0_step1000_topp0.0_sad_gen.jsonl --output_file gpt2-${MSIZE}_ctx100_trunc0_topp1.0_typp0.95_seed${SEED}_gen.jsonl --model_name gpt2-${MSIZE} --max_length 200 --top_p 1.0 --typical_p 0.95 --batch_size 25 --repeat_sample 5 --seed ${SEED} &
    wait

    CUDA_VISIBLE_DEVICES="0" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/evaluate.py --generations_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/gpt2-${MSIZE}_ctx25_trunc150_topp1.0_typp0.2_seed${SEED}_gen.jsonl --output_file gpt2-${MSIZE}_ctx25_trunc150_topp1.0_typp0.2_seed${SEED}_eval.txt --metrics 'ppl#gpt2-large,ppl#gpt2-xl,ppl#EleutherAI/gpt-neo-1.3B,ppl#facebook/opt-1.3b,mauve,self-bleu,zipf,repetition,dist-n,bleu,bertscore,dummylen' &
    CUDA_VISIBLE_DEVICES="1" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/evaluate.py --generations_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/gpt2-${MSIZE}_ctx50_trunc100_topp1.0_typp0.2_seed${SEED}_gen.jsonl --output_file gpt2-${MSIZE}_ctx50_trunc100_topp1.0_typp0.2_seed${SEED}_eval.txt --metrics 'ppl#gpt2-large,ppl#gpt2-xl,ppl#EleutherAI/gpt-neo-1.3B,ppl#facebook/opt-1.3b,mauve,self-bleu,zipf,repetition,dist-n,bleu,bertscore,dummylen' &
    CUDA_VISIBLE_DEVICES="2" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/evaluate.py --generations_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/gpt2-${MSIZE}_ctx100_trunc0_topp1.0_typp0.2_seed${SEED}_gen.jsonl --output_file gpt2-${MSIZE}_ctx100_trunc0_topp1.0_typp0.2_seed${SEED}_eval.txt --metrics 'ppl#gpt2-large,ppl#gpt2-xl,ppl#EleutherAI/gpt-neo-1.3B,ppl#facebook/opt-1.3b,mauve,self-bleu,zipf,repetition,dist-n,bleu,bertscore,dummylen' &
    CUDA_VISIBLE_DEVICES="3" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/evaluate.py --generations_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/gpt2-${MSIZE}_ctx25_trunc150_topp1.0_typp0.95_seed${SEED}_gen.jsonl --output_file gpt2-${MSIZE}_ctx25_trunc150_topp1.0_typp0.95_seed${SEED}_eval.txt --metrics 'ppl#gpt2-large,ppl#gpt2-xl,ppl#EleutherAI/gpt-neo-1.3B,ppl#facebook/opt-1.3b,mauve,self-bleu,zipf,repetition,dist-n,bleu,bertscore,dummylen' &
    CUDA_VISIBLE_DEVICES="4" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/evaluate.py --generations_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/gpt2-${MSIZE}_ctx50_trunc100_topp1.0_typp0.95_seed${SEED}_gen.jsonl --output_file gpt2-${MSIZE}_ctx50_trunc100_topp1.0_typp0.95_seed${SEED}_eval.txt --metrics 'ppl#gpt2-large,ppl#gpt2-xl,ppl#EleutherAI/gpt-neo-1.3B,ppl#facebook/opt-1.3b,mauve,self-bleu,zipf,repetition,dist-n,bleu,bertscore,dummylen' &
    CUDA_VISIBLE_DEVICES="5" HF_HOME="/private/home/xhan77/.cache/huggingface" python evaluation/evaluate.py --generations_file /private/home/xhan77/ssd-lm/logging/ssd_dbs25/gpt2-${MSIZE}_ctx100_trunc0_topp1.0_typp0.95_seed${SEED}_gen.jsonl --output_file gpt2-${MSIZE}_ctx100_trunc0_topp1.0_typp0.95_seed${SEED}_eval.txt --metrics 'ppl#gpt2-large,ppl#gpt2-xl,ppl#EleutherAI/gpt-neo-1.3B,ppl#facebook/opt-1.3b,mauve,self-bleu,zipf,repetition,dist-n,bleu,bertscore,dummylen' &
    wait
  done
done