transformers/tests/models/opt
Alex McKinney 9da451713d
Device agnostic testing (#25870)
* adds agnostic decorators and availability fns

* renaming decorators and fixing imports

* updating some representative example tests
bloom, opt, and reformer for now

* wip device agnostic functions

* lru cache to device checking functions

* adds `TRANSFORMERS_TEST_DEVICE_SPEC`
if present, imports the target file and updates device to function
mappings

* comments `TRANSFORMERS_TEST_DEVICE_SPEC` code

* extra checks on device name

* `make style; make quality`

* updates default functions for agnostic calls

* applies suggestions from review

* adds `is_torch_available` guard

* Add spec file to docs, rename function dispatch names to backend_*

* add backend import to docs example for spec file

* change instances of  to

* Move register backend to before device check as per @statelesshz changes

* make style

* make opt test require fp16 to run

---------

Co-authored-by: arsalanu <arsalanu@graphcore.ai>
Co-authored-by: arsalanu <hzji210@gmail.com>
2023-10-24 16:49:26 +02:00
..
__init__.py Add OPT (#17088) 2022-05-12 12:24:35 +02:00
test_modeling_flax_opt.py Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
test_modeling_opt.py Device agnostic testing (#25870) 2023-10-24 16:49:26 +02:00
test_modeling_tf_opt.py Big TF test cleanup (#24282) 2023-06-16 15:40:49 +01:00