-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: Bidirectional masked importance sampling ratio (MIS) for IcePop #4732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
I think the logic should be good but I need some directions for the docs. Currently the upper bound is called And if I add M to the current TRL formula:
So I'd like to harmonize and refactor For reference, in MiMO they call it eps_low and eps_high (but it might be confusing with asymmetric PPO clips). in IcePoP it's alpha and beta. So not sure here what to do before proceeding further with the docs. |
|
Sorry for the delay. Looks good overall, though I’m not convinced that a lower bound is inappropriate for TIS. Intuitively, the same rationale applies on both sides: we still want to use the gradient signal even when the training policy drifts from inference policy. A lower bound would then be a way to preserve sample efficiency, with the caveat that it can amplify unreliable signal if the mismatch reflects genuinely OOD samples rather than minor drift. Viewed this way, the motivation for double-sided boundaries applies to both TIS and MIS. TIS is essentially trying to extract information from every sample under the assumption that the inference–training mismatch is reasonably controlled, while MIS takes a more conservative stance by rejecting samples or tokens that fall outside a defined trust region. I’ll defer the naming decision to @qgallouedec, but I agree with the concern that |
|
Thanks for the feedback. I will make the necessary changes for TIS as well then. With the help of the documentation, ultimately it'll give users more combinations to choose on what they want to do/act accordingly. |
Agreed. We should clarify (in paper index) that the referenced TIS paper only employs an upper bound. I'm considering extending our repertoire of importance sampling ratios with a geometric mean variant as well, but may hold of until this PR is merged |
…nce_sampling_max` This is done to better align both min and max bounds arguments for TIS and MIS
|
To update on this PR:
I think it's good for review now, and in any case if @qgallouedec wants to rename args, the changes should be minimal now. |

What does this PR do?
Please see more details in fixing #4735
Current TRL:

IcePop:

Note: This lower bound hparam
vllm_importance_sampling_minhas been made available only for MIS and not TIS.First reason is that I'm following the original paper intentions and 2nd, unlike the upper bound utility with TIS, a lower bound would be undesirable since off policy ratios ex 0.0005 would be truncated to ex 0.5, which mean we would amplify the gradient of a bad sample. Hence the reasons I'm keeping this MIS only.
Before submitting
Pull Request section?
to it if that's the case.
Who can review?
Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.