deepspeedai / deepspeedai/DeepSpeedExamples
Step 2 reward model finetuning: how is the loss computed?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 6.8k
- Forks
- 1.1k
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 1
Description
Hi there,
I notice that in step 2, the reported scores (i.e. chosen_mean_scores and reject_mean_scores) are the same as the description:
... either the end token of the sequence or the first padding token ...
But in the loss computation, the implementation count on the mean log_sigmoid score among all divergence tokens, not the last ones. Is this an intended feature? In Anthropic's paper "A General Language Assistant as a Laboratory for Alignment", they only use the last token to compute reward, which seems like a more standard approach.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Step 2 reward-model finetuning loss implementation and the code producing chosen_mean_scores and reject_mean_scores. Compare how divergence tokens are selected and aggregated with the issue’s end/padding-token description and the cited Anthropic approach. Done when the intended aggregation is established and the implementation or issue documentation clearly reflects that decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100