You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: revert to range checks for vision token detection
Revert the torch.isin optimization as pointed out by DarkLight1337.
The torch.isin approach only matches tokens that are exactly
vision_start_id or vision_end_id, but we need to match ALL tokens
in the range [vision_start_id, vision_end_id].
The range check correctly handles:
- All tokens within the range (not just endpoints)
- Future expansion of the vision token range
- Proper semantic intent of the code
Keep the get_pooling_params consolidation as that change is correct.
Signed-off-by: Sigrid Jin (Sionic AI) <sigrid@sionic.ai>
0 commit comments