Unverified Commit d765717c authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Fix `RwkvModel` (#23392)



fix
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 80ca9247
......@@ -679,7 +679,7 @@ class RwkvModel(RwkvPreTrainedModel):
all_hidden_states = all_hidden_states + (hidden_states,)
if not return_dict:
return (hidden_states, state, all_hidden_states, all_self_attentions)
return tuple(x for x in [hidden_states, state, all_hidden_states, all_self_attentions] if x is not None)
return RwkvOutput(
last_hidden_state=hidden_states,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment