"tests/pipelines/test_pipelines_audio_classification.py" did not exist on "7fb2a8b3d93104fbe45667fffc6716cb26b9515e"
Unverified Commit 4abd3ee4 authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Fix poor past ci (#24485)



* fix

* fix

---------
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent 239ace15
......@@ -638,7 +638,11 @@ class SequenceBiasLogitsProcessor(LogitsProcessor):
torch.tensor(sequence_ids[:-1], dtype=input_ids.dtype, device=input_ids.device),
).prod(dim=1)
matching_mask[:, last_token] |= matching_rows.bool()
bias += torch.where(matching_mask, self.length_greather_than_1_bias, 0.0)
bias += torch.where(
matching_mask,
self.length_greather_than_1_bias,
torch.tensor(0.0, device=self.length_greather_than_1_bias.device),
)
# 5 - apply the bias to the scores
scores = scores + bias
......
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