Skip to content

Commit

Permalink
fix tensor dimensions are not compatible for FP8 issue in sft (#8787)
Browse files Browse the repository at this point in the history
Co-authored-by: yuhuang <[email protected]>
Co-authored-by: Eric Harper <[email protected]>
  • Loading branch information
3 people authored Jan 18, 2025
1 parent 8bf5144 commit 4df3fe5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def collate_fn(self, batch):
if self.pad_to_max_length:
max_length = self.max_seq_length
else:
max_length = min(self.max_seq_length, self._ceil_to_nearest(max_length, 8))
max_length = min(self.max_seq_length, self._ceil_to_nearest(max_length, 16))
assert max_length <= self.max_seq_length

if not self.get_attention_mask_from_fusion:
Expand Down

0 comments on commit 4df3fe5

Please sign in to comment.