Update llama.py

This commit is contained in:
Daniel Han 2024-12-20 03:01:28 -08:00
commit 7425bbbd88

View file

@ -1008,6 +1008,7 @@ def CausalLM_fast_forward(fast_forward_inference):
if not RETURN_LOGITS and HAS_CUT_CROSS_ENTROPY and labels is not None:
n_items = kwargs.get("num_items_in_batch", None) or kwargs.get("n_items", None)
print(n_items)
loss = fused_linear_cross_entropy(
hidden_states = hidden_states,
lm_weight = lm_head,