Make exllamav3 safer as well

This commit is contained in:
oobabooga 2025-04-18 06:17:58 -07:00
parent 03544d4fb6
commit 1c4a2c9a71

View file

@ -153,6 +153,9 @@ class Exllamav3HF(PreTrainedModel):
else:
self.past_seq = seq_tensor
if torch.cuda.is_available():
torch.cuda.synchronize()
loss = None
if labels is not None:
# Shift so that tokens < n predict n