v0.82.2
v0.82.2 (2026-03-29)
Bug Fixes
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