No need to recreate anything actually.

This commit is contained in:
Nicolas Patry 2024-07-01 16:37:36 +00:00
parent ef8bce0b41
commit 1c7c21d596

View File

@ -31,7 +31,8 @@ if FLASH_DECODING:
self.cu_seqlen_k = cu_seqlen_k self.cu_seqlen_k = cu_seqlen_k
def clamp(self, max): def clamp(self, max):
return Seqlen(torch.clamp(self.input_lengths, max=max)) # Flash decoding doesn't need to clamp
return self
else: else: