transformers/tests/models/gpt2
cyyever 786d9c5ed9
Fix more inefficient PT operations (#37060)
* Fix inefficient operations

* Remove cpu() call

* Reorder detach()

* Reorder detach()

* tolist without detach

* item without detach

* Update src/transformers/models/rag/modeling_rag.py

Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>

* Update tests/models/encodec/test_modeling_encodec.py

Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>

* Use detach().cpu().numpy

* Revert some numpy operations

* More fixes

---------

Co-authored-by: Joao Gante <joaofranciscocardosogante@gmail.com>
2025-03-31 16:31:24 +01:00
..
__init__.py Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
test_modeling_flax_gpt2.py [tests] remove flax-pt equivalence and cross tests (#36283) 2025-02-19 15:13:27 +00:00
test_modeling_gpt2.py Fix more inefficient PT operations (#37060) 2025-03-31 16:31:24 +01:00
test_modeling_tf_gpt2.py chore: fix typos in the tests directory (#36813) 2025-03-21 10:20:05 +01:00
test_tokenization_gpt2_tf.py update ruff version (#30932) 2024-05-22 06:40:15 +02:00
test_tokenization_gpt2.py Use lru_cache for tokenization tests (#36818) 2025-03-28 15:09:35 +01:00