transformers/tests/models/rag
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_rag.py Fix more inefficient PT operations (#37060) 2025-03-31 16:31:24 +01:00
test_modeling_tf_rag.py Add dataset_revision argument to RagConfig (#29610) 2024-03-14 16:48:11 +01:00
test_retrieval_rag.py Disallow pickle.load unless TRUST_REMOTE_CODE=True (#27776) 2023-12-04 16:48:37 +01:00
test_tokenization_rag.py Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00