[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
8927715168
commit
f8c451e22a
1 changed files with 2 additions and 1 deletions
|
|
@ -120,7 +120,7 @@ class FastSentenceTransformer(FastModel):
|
|||
):
|
||||
# backwards compatibility for older transformers versions (4.57.3 and below)
|
||||
head_mask = kwargs.pop("head_mask", None)
|
||||
|
||||
|
||||
position_bias = self.compute_position_bias(hidden_states)
|
||||
all_hidden_states = () if output_hidden_states else None
|
||||
all_attentions = () if output_attentions else None
|
||||
|
|
@ -138,6 +138,7 @@ class FastSentenceTransformer(FastModel):
|
|||
return module(
|
||||
*inputs, output_attentions = output_attentions
|
||||
)
|
||||
|
||||
return custom_forward
|
||||
|
||||
layer_outputs = torch.utils.checkpoint.checkpoint(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue