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,
past_key_values=past_kvs,
)
# 尝试添加其他属性(如果支持的话)
try:
output.hidden_states = h
output.aux_loss = aux_loss
except:
pass
# 尝试添加其他属性(如果支持的话)
# try:
# output.hidden_states = h
# output.aux_loss = aux_loss
# except:
# pass
return output