Update cross_entropy_loss.py
This commit is contained in:
parent
6db9d286d8
commit
8aefcd0b50
1 changed files with 2 additions and 2 deletions
|
|
@ -273,8 +273,8 @@ class Fast_CrossEntropyLoss(torch.autograd.Function):
|
|||
n_chunks = div + (mod != 0)
|
||||
losses = torch.empty(n_rows, dtype = torch.float32, device = logits.device)
|
||||
|
||||
DO_SOFTCAPPING = logit_softcapping != 0
|
||||
DO_LOGIT_SCALING = logit_scaling != 0
|
||||
DO_SOFTCAPPING : bool = bool(logit_softcapping != 0)
|
||||
DO_LOGIT_SCALING : bool = bool(logit_scaling != 0)
|
||||
|
||||
if n_chunks == 1:
|
||||
# For small vocabs <= 65336 like Llama, Mistral
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue