transformers
[generate] Completely stop relying on `cache_position` to prepare inputs
#44130
Merged

[generate] Completely stop relying on `cache_position` to prepare inputs #44130

Cyrilvallez merged 29 commits into main from generate-input-prep
Cyrilvallez
Cyrilvallez generalize
7c7e0d8f
Cyrilvallez better doc
5bb56b6f
HuggingFaceDocBuilderDev
Cyrilvallez don't mixup the logic everywhere
283b721f
Cyrilvallez doc
c609fd7d
Cyrilvallez fix all
05309c00
Cyrilvallez no unsqueeze
ba392f33
Cyrilvallez more fixes
28d2b41b
Cyrilvallez add position_ids
4ef23932
Cyrilvallez simplify all a lot
babbd8f6
Cyrilvallez doc
6286638a
Cyrilvallez small oupsi
6aae383c
Cyrilvallez more small fixes
71b54f15
Cyrilvallez more fixes
dd3215db
Cyrilvallez fix assisted decoding
44c24e58
Cyrilvallez slice
8c783fcc
Cyrilvallez fix
2baa7a35
Cyrilvallez remove outdated test
5d761fc0
Cyrilvallez fix openai
5fc5ba2c
Cyrilvallez fix mamba2
40a4390e
Cyrilvallez fix xlm
22ab44eb
Cyrilvallez fixes
d537d262
Cyrilvallez fix
a00608af
Cyrilvallez fix rag
f5636b87
Cyrilvallez Cyrilvallez changed the title Input preparation [generate] Stop relying on `cache_position` to slice inputs and simplify inputs preparation 114 days ago
Cyrilvallez Cyrilvallez changed the title [generate] Stop relying on `cache_position` to slice inputs and simplify inputs preparation [generate] Completely stop relying on `cache_position` to prepare inputs 114 days ago
zucchini-nlp
zucchini-nlp commented on 2026-02-20
Cyrilvallez can restart from sliced inputs with a full mask
0714af16
Cyrilvallez fix test
cabbd7f5
Cyrilvallez
zucchini-nlp
zucchini-nlp approved these changes on 2026-02-20
Cyrilvallez skip whisper test for now
20431e03
Cyrilvallez remove tests for deprecated hub-specific generation generations
53e9b1dc
Cyrilvallez fix llava test - not related to PR but was failing...
ac7a4fe7
huggingface huggingface deleted a comment from github-actions on 2026-02-20
huggingface huggingface deleted a comment from github-actions on 2026-02-20
huggingface huggingface deleted a comment from github-actions on 2026-02-20
Cyrilvallez style
ab8ffcfa
github-actions
Cyrilvallez
github-actions
huggingface huggingface deleted a comment from github-actions on 2026-02-20
github-actions
Cyrilvallez
Cyrilvallez Cyrilvallez merged ecf79eb2 into main 113 days ago
Cyrilvallez Cyrilvallez deleted the generate-input-prep branch 113 days ago

Login to write a write a comment.

Login via GitHub

Reviewers
Assignees
No one assigned
Labels
Milestone