Skip to content

Commit

Permalink
sampler: pad dry sequence breakers tensor (#875)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlpinDale authored Dec 8, 2024
1 parent 9288a98 commit f0cc35b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion aphrodite/modeling/sampling_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,9 @@ def from_lists(cls, temperatures: List[float], dynatemp_mins: List[float],
pin_memory=pin_memory,
)
dry_sequence_breakers_t = torch.tensor(
dry_sequence_breaker_ids,
[seq + [0] * (max(len(s) for s in
dry_sequence_breaker_ids) - len(seq))
for seq in dry_sequence_breaker_ids],
device="cpu",
dtype=torch.long,
pin_memory=pin_memory,
Expand Down

0 comments on commit f0cc35b

Please sign in to comment.