allenai / reward-bench

RewardBench: the first evaluation tool for reward models.
https://huggingface.co/spaces/allenai/reward-bench
Apache License 2.0
277 stars 27 forks source link

Add `pad_token_id` from tokenizer to model config. #117

Closed hank0316 closed 2 months ago

hank0316 commented 2 months ago

Resolves #115

Add pad_token_id to model config for models whose config did not contains pad_token_id. ex. TinyLlama

natolambert commented 2 months ago

Hey @hank0316 -- looks good. Two quick things:

  1. Did you check that this doesn't break other models? I'm not sure if it needs to be an elif vs an if, did you check?
  2. Can you add the same code to this script too? https://github.com/allenai/reward-bench/blob/5cd2fe67962cb848e3db0f67b380540465169f06/scripts/run_bon.py#L171
  3. Maybe add a comment as to why we did this?

Regardless, should be pretty simple.

hank0316 commented 2 months ago

@natolambert Thanks for the guidance. Here's the update:

scripts/run_rm.py:

scripts/run_bon.py: