candle
candle copied to clipboard
bert attention mask
Is there something like torch.finfo(dtype).min in candle?
Probably a duplicate of #1799
Is there something like torch.finfo(dtype).min in candle?
@lz1998, you can use f32::NEG_INFINITY and then cast to the correct Tensor type.
What's the status of this PR? I've noticed that this PR is necessary to match the output of transformers or sentence_transformers when batch inputs are of different token length.
+1 for this. Please merge it. @LaurentMazare
Merged, thanks and sorry for the delay.