Skip to content

Commit

Permalink
Use image_seq_len to determine proper cache size in generate_v2 (#1673
Browse files Browse the repository at this point in the history
)
  • Loading branch information
joecummings authored Sep 25, 2024
1 parent 924650f commit 738baf8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions recipes/dev/generate_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ def generate(self, cfg: DictConfig):
batch_size=1,
dtype=self._dtype,
encoder_max_seq_len=(
self.model_transform.image_seq_len
if is_multimodal_input
else None
self.model_transform.image_seq_len if is_multimodal_input else None
),
decoder_max_seq_len=total_response_length,
)
Expand Down

0 comments on commit 738baf8

Please sign in to comment.