Update cross_entropy_loss.py

This commit is contained in:
Daniel Han 2024-09-24 23:57:22 -07:00
commit f8a48090ec

View file

@ -437,7 +437,7 @@ def patch_llama_for_causal_lm():
function = \
function[:function.find(" loss = None")] + \
replacement + \
function[ function.find(" if not return_dict"):]
function[ function.find("if not return_dict"):]
function = function.replace("logits = logits.float()", "\n")
# Missed spaces