World_Model / Prism /LLaDA /LLaDA_Prism /scripts /run_humaneval.sh
BryanW's picture
Add files using upload-large-folder tool
a60ff7d verified
#!/bin/bash
set -e
set -x
PROJECT_ROOT="<PATH_TO_YOUR_ROOT>"
MODEL_PATH="<PATH_TO_YOUR_LLaDA_8B_INSTRUCT_WEIGHTS>"
BASE_OUTPUT_PATH="${PROJECT_ROOT}/outputs/results_humaneval"
cd "$PROJECT_ROOT"
export CUDA_VISIBLE_DEVICES=0,1,2,3
export HF_ENDPOINT=https://hf-mirror.com
LENGTH=512
STEPS=32
BLOCK=32
TASK="humaneval"
NAME="win_0.1-0.6"
mkdir -p "${BASE_OUTPUT_PATH}/${NAME}"
accelerate launch evaluation_script.py \
--model LLaDA \
--tasks ${TASK} \
--batch_size 1 \
--model_args "pretrained=${MODEL_PATH},mask_id=126336,assistant_prefix=<reasoning>" \
--gen_kwargs "use_hts=True,hts_N=16,final_K=4,hts_survivor_k=2,hts_mode=True,hts_start_pct=0.1,hts_end_pct=0.6,pruning_interval=3,decay_factor=1.8,reward_mode=svf,task_type=code,steps=${STEPS},block_length=${BLOCK},gen_length=${LENGTH},temperature=0.7,realtime_output=${BASE_OUTPUT_PATH}/${NAME}/res.jsonl" \
--num_fewshot 0 \
--confirm_run_unsafe_code \
--output_path "${BASE_OUTPUT_PATH}/${NAME}"