Skip to content

refactor: use the shared zero-variance check for native Tinker advantages - #1122

Open
bradhilton wants to merge 1 commit into
mainfrom
tarkin/tinker-native-shared-zero-variance
Open

bradhilton wants to merge 1 commit into
mainfrom
tarkin/tinker-native-shared-zero-variance

Conversation

@bradhilton

Copy link
Copy Markdown
Collaborator

Agent: Tarkin

Problem: #1115 inlined the equal-reward check (abs(reward - rewards[0]) <= 1e-12) in tinker_native, because #1118's shared rewards_have_zero_variance helper hadn't merged yet.

Behavior after this change: compute_advantages calls art.utils.grpo.rewards_have_zero_variance, so tokenization, the pipeline trainer, the trainable-group metric and tinker_native all use one definition of an equal-reward group. Behavior is unchanged: same tolerance and the same handling of single-reward groups.

Validation: tests/unit/test_tinker_native_advantages.py passes (12 tests); ruff and ruff-format pass.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant