Skip to content

Support max_seq_len argument in multimodal text-to-text export#209

Open
kamalkraj wants to merge 1 commit intohuggingface:mainfrom
kamalkraj:fix/multimodal-max-seq-len
Open

Support max_seq_len argument in multimodal text-to-text export#209
kamalkraj wants to merge 1 commit intohuggingface:mainfrom
kamalkraj:fix/multimodal-max-seq-len

Conversation

@kamalkraj
Copy link

Summary
This PR updates the load_multimodal_text_to_text_model function to support the max_seq_len argument, allowing users to explicitly define
the maximum sequence length during model export.

Changes

  • Modified optimum/exporters/executorch/tasks/multimodal_text_to_text.py.
  • Added logic to check for max_seq_len in kwargs.
  • Sets max_length to max_seq_len if provided; otherwise, it falls back to the existing max_length logic (defaulting to 2048).

Motivation
This change improves flexibility by accommodating the max_seq_len parameter, which is often used in ExecuTorch configurations, while
maintaining backward compatibility with max_length.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant