PKU SafeRLHF 125-Subset Evaluation Bundle
This bundle contains the code and prepared data used for the 125-sample
evaluation subset under:
figure6_eval728_without_train_overlap_125_repro_seed0
It is intended as a portable reproduction package for:
- generation on the fixed 125-prompt subset
- pairwise helpfulness / harmlessness judging
- single-model humanness judging
- the newer mark-error humanness judging
Layout
code/: generation, judging, merge, and cluster helper scriptsdata/: prepared 125-prompt subset and base-model generationsprompts/: prompt template used by the mark-error humanness judgemetadata/: manifest and source-address notes
Included Data
data/evaluation_prompts-full-728_without_train_overlap_125_random_seed0.jsondata/evaluation_prompts-first2_from_random125_seed0.jsondata/generation_125.jsondata/generation_first2.json
The generation_125.json file is the base-model generation file used as the
blue/reference side in pairwise evaluation for the 125 subset.
Included Code
Main generation scripts:
code/generate_dynamic_old_genarm.pycode/generate_old_genarm_custom_scheme.pycode/helpfulness_scheme_interface.py
Evaluation scripts:
code/gpt4_eval_Beaver.pycode/gpt4_eval_Beaver_local_shard.pycode/gpt4_eval_Beaver_humanness_single.pycode/gpt4_eval_Beaver_humanness_single_local_shard.pycode/gpt4_eval_Beaver_humanness_mark_error.pycode/gpt4_eval_Beaver_humanness_mark_error_local_shard.py
Merge scripts:
code/merge_generation_shards.pycode/merge_beaver_eval_shards.pycode/merge_beaver_humanness_single_shards.pycode/merge_beaver_humanness_mark_error_shards.py
125-subset pipeline helpers:
code/run_eval125_dynamic_alpha_helpful_only.shcode/run_eval125_scheme_a_static_helpful_only.shcode/run_mark_error_humanness_125_for_model.shcode/mark_error_humanness_125_2gpu.pbs
Notes
Some scripts in code/ still contain absolute paths from the source cluster.
For use on another machine, update:
- base model path
- ARM checkpoint paths
- local judge model path
- Python / conda environment paths
- cache paths
The prepared 125-subset data itself is portable and does not depend on those
cluster paths.
Typical Usage
- Place your base model and ARM adapters somewhere accessible.
- Edit the path variables in the runner shell scripts.
- Use
data/evaluation_prompts-full-728_without_train_overlap_125_random_seed0.json
as the prompt subset. - Use
data/generation_125.jsonas the base/reference generation file for
pairwise evaluation.
New Mark-Error Humanness Judge
This bundle includes the newer label-based humanness scorer:
clean -> 0uncertain -> 0, excluded from the denominatorparse_error -> 0, excluded from the denominatorhit_max,repeat,weird,template->-1
The mark-error prompt is included at:
prompts/humanlike_mark_error_prompt.yml