Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 8 additions & 2 deletions docs/source/grpo_trainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,14 @@ accelerate launch \

### Configuration Tips

> [!WARNING]
> VLM training may fail if image tokens are truncated. We highly recommend disabling truncation by setting `max_prompt_length` to `None`.
> [!TIP]
> For VLMs, truncating may remove image tokens, leading to errors during training. To avoid this, set `max_length=None` in the [`GRPOConfig`]. This allows the model to process the full sequence length without truncating image tokens.
>
> ```python
> GRPOConfig(max_length=None, ...)
> ```
>
> Only use `max_length` when you've verified that truncation won't remove image tokens for the entire dataset.

- Use LoRA on vision-language projection layers
- Enable 4-bit quantization to reduce memory usage
Expand Down
10 changes: 8 additions & 2 deletions docs/source/rloo_trainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,8 +549,14 @@ accelerate launch \

### Configuration Tips

> [!WARNING]
> VLM training may fail if image tokens are truncated. We highly recommend disabling truncation by setting `max_prompt_length` to `None`.
> [!TIP]
> For VLMs, truncating may remove image tokens, leading to errors during training. To avoid this, set `max_length=None` in the [`RLOOConfig`]. This allows the model to process the full sequence length without truncating image tokens.
>
> ```python
> RLOOConfig(max_length=None, ...)
> ```
>
> Only use `max_length` when you've verified that truncation won't remove image tokens for the entire dataset.

- Use LoRA on vision-language projection layers
- Enable 4-bit quantization to reduce memory usage
Expand Down
Loading