transformers
Fix contrastive search to correctly handle input with padding
#33507
Merged

Fix contrastive search to correctly handle input with padding #33507

gante merged 6 commits into huggingface:main from fix-contrastive-search-inconsistency
ducviet00
amyeroberts amyeroberts added Generation
gante
gante commented on 2024-09-17
ducviet00
ducviet00
ducviet00
ducviet00 commented on 2024-09-17
ducviet00 fix: handle padding in contrastive search for decoder-only models
055b692b
ducviet00 fix: handle padding in contrastive search for encoder-decoder models
daa26963
ducviet00 tests: move padding contrastive test to test_util, add t5 test
a10ec988
ducviet00 fix: handle if model_kwargs["decoder_attention_mask"] is None
6a86c0d5
ducviet00 ducviet00 requested a review from gante gante 1 year ago
ducviet00 refactor: improve padding input contrastive search generation tests
b8a08dd7
ducviet00 chore: _ranking_fast to use LongTensor for cosine_matrix_mask
21d0207d
ducviet00
ducviet00 ducviet00 changed the title Fix contrastive search to correctly handle input padding in decoder-only models Fix contrastive search to correctly handle input padding 1 year ago
ducviet00 ducviet00 changed the title Fix contrastive search to correctly handle input padding Fix contrastive search to correctly handle input with padding 1 year ago
gante
gante approved these changes on 2024-09-19
gante gante requested a review from LysandreJik LysandreJik 1 year ago
LysandreJik
LysandreJik approved these changes on 2024-09-20
gante gante merged dc8b6eae into main 1 year ago
gante

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
No one assigned
Labels
Milestone