Skip to content

FeynRL v0.2.0

Latest

Choose a tag to compare

@murdock-aubry murdock-aubry released this 14 Jul 20:25
· 56 commits to main since this release

🖼️ Headline: Vision-Language Model (VLM) support

FeynRL now trains vision-language models with the same SFT and RL recipes as LLMs.

  • New model.model_class: "llm" | "vlm" config, with VLM-specific options: data.image_key, data.max_image_pixels, model.max_images_per_prompt, and per-submodule attn_implementation dicts (e.g. different attention backends for the vision tower vs. the language model).
  • New multimodal data feeds: ImagePairedFeed (SFT), ImagePreferenceFeed (DPO/CL), ImagePromptsFeed (RL rollouts), plus shared image loading/resizing utilities. Multimodal kwargs are plumbed end-to-end through the replay buffer and both vLLM rollout engines.
  • Unified model loading (misc/model_loading.py): build_hf_model, load_tokenizer_or_processor, and ensure_pad_token handle LLM vs. VLM differences (AutoProcessor, text_config pad-token nesting) in one place.
  • Generic VLM ↔ vLLM weight-sync key remapping: RL weight sync now remaps state-dict keys via the model's own _checkpoint_conversion_mapping, so newer transformers VLM layouts (Qwen2.5-VL, Gemma, and others) sync correctly into vLLM without per-model hacks.
  • New VLM data prep (data_prep/mm_math.py) and reward (rewards/mathvista_reward_func.py); config validation guards Gemma-3 VLM against the incompatible batch_invariant attention backend.

📚 New examples & results

The examples/ folder is reorganized by model type (llm/, vlm/) with full configs, reproduction commands, and results for every experiment:

  • VLM · MM-Math (Qwen2.5-VL-3B-Instruct) — SFT and GRPO recipes, evaluated on MM-Math, Geometry3K, and MathVista (GRPO: +11.0 pp on MM-Math over base).
  • VLM · Snake 🐍 (SmolVLM2-500M-Video-Instruct) — a 500M VLM learns to play Snake from pixels via supervised imitation; includes data generation, rollout script, and an interactive UI.
  • LLM · GSM8K SFT (Gemma-2-2B-it) — new SFT example, 21.81% → 32.59% pass@1. Community contribution — thanks @nstranges! (#89)
  • Existing LLM GRPO examples (Qwen2.5-1.5B-Instruct, Qwen3-4B-Thinking) moved under examples/llm/rl/, and all commands now show CUDA_VISIBLE_DEVICES and --experiment_id explicitly.

💾 Checkpointing & resume

  • New run.enable_saving_resume_state (default true): checkpoints include DeepSpeed optimizer/scheduler/RNG state (ds_engine/) for exact training resume; resuming from a checkpoint saved without it now fails fast with a clear error. (#59)
  • Checkpoint saving handles the VLM processor alongside the tokenizer so saved checkpoints are complete for inference and resume.

⚙️ Other improvements & fixes

  • Stricter eval config validation
  • Fixed async config weight_sync_method handling. (#69)
  • Docs: README rewritten around LLM + VLM support, added acknowledgements (Open-Instruct, PipelineRL) and a citation entry; Python version consistency (#78) and Qwen3 example config fixes (#72).

🧪 Testing

Expanded unit-test suites covering VLM weight remapping, multimodal preference feeds, mm-kwargs extraction, model loading, replay buffer, DPO loss, and config validation.

Full Changelog: v0.1.0...v0.2.0

What's Changed

New Contributors

Full Changelog: v0.1.0...v0.2.0

What's Changed

New Contributors

Full Changelog: v0.1.0...v0.2.0