transformers/tests/generation
Joao Gante 0e0e5c1044
[generate] Run custom generation code from the Hub (#36405)
* mvp

* remove trust_remote_code

* generate_from_hub

* handle requirements; docs

* english

* doc PR suggestions

* Apply suggestions from code review

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>

* changed remote code path to generate/generate.py

* model repo has custom generate -> override base generate

* check for proper inheritance

* some doc updates (missing: tag-related docs)

* update docs to model repo

* nit

* nit

* nits

* Update src/transformers/dynamic_module_utils.py

* Apply suggestions from code review

* Update docs/source/en/generation_strategies.md

Co-authored-by: Pedro Cuenca <pedro@huggingface.co>

* trust remote code is required

* use new import utils for requirements version parsing

* use  org examples

* add tests

* Apply suggestions from code review

Co-authored-by: Manuel de Prada Corral <6536835+manueldeprada@users.noreply.github.com>

* ascii file structure; tag instructions on readme.md

---------

Co-authored-by: Steven Liu <59462357+stevhliu@users.noreply.github.com>
Co-authored-by: Pedro Cuenca <pedro@huggingface.co>
Co-authored-by: Manuel de Prada Corral <6536835+manueldeprada@users.noreply.github.com>
2025-05-15 10:35:54 +01:00
..
__init__.py [Test refactor 1/5] Per-folder tests reorganization (#15725) 2022-02-23 15:46:28 -05:00
test_beam_constraints.py Use Python 3.9 syntax in tests (#37343) 2025-04-08 14:12:08 +02:00
test_beam_search.py Use Python 3.9 syntax in tests (#37343) 2025-04-08 14:12:08 +02:00
test_candidate_generator.py prune LM Head for USD (#36695) 2025-04-08 16:44:10 +01:00
test_configuration_utils.py Use Python 3.9 syntax in tests (#37343) 2025-04-08 14:12:08 +02:00
test_fsdp.py enable generation fsdp/utils cases on XPU (#38009) 2025-05-09 20:52:41 +00:00
test_logits_process.py Allow Exclusion of Input IDs from RepetitionPenaltyLogitsProcessor (#37625) 2025-04-21 15:46:05 +01:00
test_stopping_criteria.py Use Python 3.9 syntax in tests (#37343) 2025-04-08 14:12:08 +02:00
test_streamers.py Use Python 3.9 syntax in tests (#37343) 2025-04-08 14:12:08 +02:00
test_utils.py [generate] Run custom generation code from the Hub (#36405) 2025-05-15 10:35:54 +01:00