| |
| export HF_ALLOW_CODE_EVAL=1 |
| export HF_DATASETS_TRUST_REMOTE_CODE=1 |
| export TRANSFORMERS_TRUST_REMOTE_CODE=1 |
| export CUDA_VISIBLE_DEVICES=0,1 |
| export PYTHONPATH="/scratch/e0973935/dInfer/python:${PYTHONPATH}" |
| |
|
|
| parallel_decoding='threshold' |
| length=1024 |
| block_length=32 |
| model_path='/scratch/e0973935/model_weights/local_LLaDA2.0-mini' |
| threshold=0.3 |
| low_threshold=0.2 |
| cache='prefix' |
| warmup_times=0 |
| prefix_look=0 |
| after_look=0 |
| cont_weight=0 |
| use_credit=False |
| use_compile=True |
| tp_size=2 |
| gpus='0;1' |
| parallel='tp' |
| output_dir='/scratch/e0973935/dInfer/evaluations/outputs' |
| model_type='llada2' |
| use_bd=True |
| master_port="23456" |
| save_samples=True |
| batch_size=1 |
| |
| |
|
|
|
|
| if [ "$parallel" = "tp" ]; then |
| for task in mbpp_sanitized_llada_mini; do |
| output_path="${output_dir}/${task}" |
| python eval_dinfer_sglang.py --tasks "${task}" \ |
| --confirm_run_unsafe_code --model dInfer_eval \ |
| --model_args model_path="${model_path}",gen_length="${length}",block_length="${block_length}",threshold="${threshold}",low_threshold="${low_threshold}",show_speed=True,save_dir="${output_path}",parallel_decoding="${parallel_decoding}",cache="${cache}",warmup_times="${warmup_times}",use_compile="${use_compile}",tp_size="${tp_size}",parallel="${parallel}",cont_weight="${cont_weight}",use_credit="${use_credit}",prefix_look="${prefix_look}",after_look="${after_look}",gpus="${gpus}",model_type="${model_type}",use_bd="${use_bd}",master_port="${master_port}",save_samples="${save_samples}" \ |
| --output_path "${output_path}" --include_path /scratch/e0973935/dInfer/evaluations/tasks --apply_chat_template |
| done |
| else |
| echo "parallel must be tp" |
| fi |
|
|
|
|
|
|