This commit is contained in:
iomgaa 2025-05-12 12:16:35 +08:00
parent 6eaca41018
commit 77cf24c925

View File

@ -612,14 +612,17 @@ class MiniMindLM(PreTrainedModel):
logits=logits, logits=logits,
past_key_values=past_kvs, past_key_values=past_kvs,
) )
output.hidden_states = h
output.aux_loss = aux_loss
# 尝试添加其他属性(如果支持的话) # 尝试添加其他属性(如果支持的话)
try: # try:
output.hidden_states = h # output.hidden_states = h
output.aux_loss = aux_loss # output.aux_loss = aux_loss
except: # except:
pass # pass
return output return output