Skip to content

v0.82.2

Choose a tag to compare

@abrichr abrichr released this 29 Mar 23:38
· 102 commits to main since this release

v0.82.2 (2026-03-29)

Bug Fixes

  • Patch model.forward() directly instead of wrapper class (#253, 0f381b1)

TRL unwraps models via Accelerate, stripping wrapper classes. The fix: patch forward() on the model instance itself. This survives unwrapping.

  • patch_model_for_trl(model) → returns cache_fn
  • cache_fn(inputs) caches pixel_values from processor output
  • Patched forward() injects cached pixel_values when TRL omits them
  • Patched call also injects (covers all call paths)
  • trl_wrapper passes original model to TRL (not a wrapper)
  • cache_vision_fn passed through to rollout_func

Co-authored-by: Claude Opus 4.6 (1M context) noreply@anthropic.com


Detailed Changes: v0.82.1...v0.82.2