Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions verl/workers/fsdp_workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,15 @@ def _build_model_optimizer(
if self.ulysses_sequence_parallel_size > 1 and hasattr(actor_model_config, "vision_config"):
actor_model_config.vision_config._attn_implementation = "eager"

# patch for qwen2.5-vl: when using flash_attention_3, set vision tower to use flash_attention_2
# because the vision tower does not support flash_attention_3
if (
getattr(actor_model_config, "model_type", None) == "qwen2_5_vl"
and attn_implementation == "flash_attention_3"
and hasattr(actor_model_config, "vision_config")
):
actor_model_config.vision_config._attn_implementation = "flash_attention_2"

# patch for kimi-vl
if getattr(actor_model_config, "model_type", None) == "kimi_vl":
actor_model_config.text_config.topk_method = "greedy"
Expand Down
Loading