Skip to content

Commit

Permalink
use last_hidden_state as the last layer outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Lee authored and Sean Lee committed Jan 10, 2025
1 parent aaee300 commit 9284508
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions angle_emb/angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,7 @@ def __call__(self,
else:
ret = self.model(output_hidden_states=True, return_dict=True, **inputs)
all_layer_outputs = ret.hidden_states
all_layer_outputs[-1] = ret.last_hidden_state
if return_all_layer_outputs:
return (all_layer_outputs, ret.logits) if return_mlm_logits else all_layer_outputs
outputs = all_layer_outputs[layer_index]
Expand Down

0 comments on commit 9284508

Please sign in to comment.