transformers/tests/models/gpt2
Anton Vlasjuk b275a41005
[GPT2] Add SDPA support (#31172)
* `gpt2` sdpa support

* fix (at least) one test, style, repo consistency

* fix sdpa mask in forward --> fixes generation

* test

* test2

* test3

* test4

* simplify shapes for attn mask creation and small comments

* hub fail test

* benchmarks

* flash attn 2 mask should not be inverted on enc-dec setup

* fix comment

* apply some suggestion from code review

- only save _attn_implentation once
- remove unnecessary comment

* change elif logic

* [run-slow] gpt2

* modify `test_gpt2_sample_max_time` to follow previous assertion patterns
2024-06-19 09:40:57 +02:00
..
__init__.py Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
test_modeling_flax_gpt2.py Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
test_modeling_gpt2.py [GPT2] Add SDPA support (#31172) 2024-06-19 09:40:57 +02:00
test_modeling_tf_gpt2.py Remove static pretrained maps from the library's internals (#29112) 2024-03-25 10:33:38 +01:00
test_tokenization_gpt2_tf.py update ruff version (#30932) 2024-05-22 06:40:15 +02:00
test_tokenization_gpt2.py Adds pretrained IDs directly in the tests (#29534) 2024-03-13 14:53:27 +01:00