transformers/tests/models
Arthur c236a62172
[CLAP] Add CLAP to the library (#21370)
* add model like clip

* update

* text model ok

* clap text works

* some refactor

- `CLAPVision` to `CLAPAudio`
- refactor kwargs of audio modules

* more refactor

* more refactor

* more refactor

* correct fusion

* more refactor

* new modules

* add basic processor

* fixup

* remove whisper copioed from

* audio logits match

* add doc

* correct filters mel and add maxlength

* style

* few fixes

* forward passes

* fixup

* fixup

* some clean up

* remove mels form the dictionnary

* pad after the repeat

* update padding when dsmaller

* fix padding

* style

* use swin patch merging

* use copied from swin

* processor with any tokenizer

* more copied from

* some clean up

* more refactor

* fix mel when rand_trunc

* style

* remove unused imports

* update processing

* remove image processing tests

* add testing fiel

* fixmodeling issues

* replace with `is_longer`

* clap in serialization

* more refactor

* `make fixup`

* make fixup

* fix feature extractor

* update test feature extractor

* `make fixup`

* clean up config

* more clean up

* more cleanup

* update tests

* refactor tests and inits

* removeCLAP vision config

* remove CLAP from image procssing auto and dummy vision objects

* update inits

* style

* re order classes in modeling clap

* Use roberta tokenizer as the other weights are not open sourced

* small cleaup

* remove tokenization CLAP

* processor tokenizr is roberta

* update feature extraction doc

* remove vclap from model zero shot

* update f_min and f_max to frequency_xx

* some changes

- fix modeling keys
- add `is_longer` in the forward pass
- make fixup

* make fixup

* consistent behavior ebtween rand_crop and fusion

* add numpy resize and bilinear and documentation

* move resizing to image utils

* clean feature extraction

* import resize from correct file

* resize in image transforms

* update

* style

* style

* nit

* remove unused arguments form the feature extractor

* style

* few fixes + make fixup

* oops

* fix more tests

* add zero shot audio classification pipeline

* update zeroshot classification pipeline

* fixup

* fix copies

* all CI tests pass

* make fixup + fix docs

* fix docs

* fix docs

* update tests pip;eline

* update zero shot pipeline

* update feature extraction clap

* update tokenization auto

* use nested simplify

* update pipeline tests

* Apply suggestions from code review

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* split in two lines

* fixes

* refactor

* clean up

* add integration tests

* update config docstring

* style

* update processor

* fix processor test

* fix feat extractor tests

* update docs

* Apply suggestions from code review

Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>

* fix readmes

* fix tips

* Update src/transformers/models/auto/configuration_auto.py

* update doc and remove todo -> properly explained

* fix idx and typo

* typoe

* cleanup config

* cleanup tests, styles and doc

* ignore docstyle on image transform

* add conversion script

* remove the `clap` indx in favor of `CLAP`

* update __init

* nits

* Update src/transformers/pipelines/__init__.py

* fix bug

* clarifiy config

* fix copy

* fix init

* Apply suggestions from code review

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* fix model output

* fix comment

* make fixup

* make fixup

* rename to `Clap`

* replace to `Clap`

* replace to `Clap`

* repo consistency

* again repo-consistency

* make fixup

* Apply suggestions from code review

Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>

* add config

* changes

* update conversion

* Apply suggestions from code review

Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>

* remove unused function

* update based on code reviews

* style

* more comments

* cleanup

* clean up

* style

* apply suggestions

* Empty commit

* pipeline will be added in a different PR

* update calls to audio utils functions

* update pipeline init

* style

* style

* styling again

* use pad

* fix repo-consistency

* update utils and add doc for audio utils

* clean up resize by using torch. update inits accordingly

* style

* CLap's  tokenizer is RobertA

* add audio utils to internal toctreee

* update totctree

* style

* update documentation and normalize naming accross audio utils and feature extraction clap

* style

* clean up

* update doc and typos

* fix doctest

* update modelin code, got rid of a lot of reshaping

* style on added doc audio utils

* update modeling clap

* style

* Apply suggestions from code review

Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>

* docstringvariables with CLAP

* rename key

* update modeling CLAP

* update audio utils docstring

* update processing clap

* fix readmes

* fix toctree

* udpate configuration clap

* fix init

* make fixup

* fix

* fix

* update naming

* update

* update checkpoint path

* Apply suggestions from code review

* Major refactoring

* Update src/transformers/models/clap/configuration_clap.py

* merge

---------

Co-authored-by: younesbelkada <younesbelkada@gmail.com>
Co-authored-by: Younes Belkada <49240599+younesbelkada@users.noreply.github.com>
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
Co-authored-by: Sanchit Gandhi <93869735+sanchit-gandhi@users.noreply.github.com>
2023-02-16 20:59:27 +01:00
..
albert Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
altclip Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
audio_spectrogram_transformer Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
auto [tokenizer] sanitize saved config (#21483) 2023-02-07 10:51:45 -08:00
bart 🚨🚨🚨 Enforce single model initialization (#21431) 2023-02-09 15:46:26 -05:00
barthez Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
bartpho Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
beit Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
bert Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
bert_generation Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
bert_japanese Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
bertweet Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
big_bird Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
bigbird_pegasus Generate: move generation_*.py src files into generation/*.py (#20096) 2022-11-09 15:34:08 +00:00
biogpt Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
bit [Backbones] Improve out features (#20675) 2022-12-09 09:14:52 +01:00
blenderbot Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
blenderbot_small Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
blip Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
blip_2 Fix Blip-2 CI again (#21637) 2023-02-15 10:59:42 +01:00
bloom Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
bort Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
bridgetower Tag tests as slow (#21537) 2023-02-09 14:46:15 +00:00
byt5 Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
camembert Added with torch.no_grad() to Camembert integration test (#21544) 2023-02-10 10:58:29 +01:00
canine Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
chinese_clip Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
clap [CLAP] Add CLAP to the library (#21370) 2023-02-16 20:59:27 +01:00
clip Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
clipseg Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
codegen Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
conditional_detr Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
convbert Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
convnext Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
cpm Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
ctrl Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
cvt [CvT] Tensorflow implementation (#18597) 2022-10-11 18:16:52 +01:00
data2vec update relative positional embedding (#20203) 2022-11-15 10:46:34 +01:00
deberta Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
deberta_v2 Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
decision_transformer Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
deformable_detr Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
deit Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
deta 🚨🚨🚨 Enforce single model initialization (#21431) 2023-02-09 15:46:26 -05:00
detr Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
dinat Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
distilbert Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
dit Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
donut Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
dpr Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
dpt 🚨🚨🚨 Enforce single model initialization (#21431) 2023-02-09 15:46:26 -05:00
efficientformer Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
electra Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
encoder_decoder Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
ernie update relative positional embedding (#20203) 2022-11-15 10:46:34 +01:00
ernie_m Add Ernie-M Model to huggingface (#21349) 2023-02-15 09:24:56 -05:00
esm Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
flaubert Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
flava Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
fnet Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
fsmt Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
funnel Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
git Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
glpn Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
gpt_neo Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
gpt_neox Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
gpt_neox_japanese Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
gpt_sw3 Add gpt-sw3 model to transformers (#20209) 2022-12-12 13:12:13 -05:00
gpt2 [OPT] Adds GPT2TokenizerFast to the list of tokenizer to use for OPT. (#20823) 2023-02-07 17:35:28 +01:00
gptj [CI ] Remove past in favor of pat_key_values (#21443) 2023-02-07 09:51:35 +01:00
graphormer Fix Graphormer test suite (#21419) 2023-02-02 16:29:13 +01:00
groupvit Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
herbert Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
hubert Skipping more high mem tests - Wav2Vec2 Hubert (#21647) 2023-02-15 16:00:50 +00:00
ibert Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
imagegpt Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
jukebox Ci-jukebox (#20613) 2022-12-06 16:14:03 +01:00
layoutlm Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
layoutlmv2 🚨🚨🚨 Enforce single model initialization (#21431) 2023-02-09 15:46:26 -05:00
layoutlmv3 Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
layoutxlm Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
led Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
levit Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
lilt Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
longformer Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
longt5 Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
luke Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
lxmert Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
m2m_100 Exclude the madeup words from M2M100Tokenizer.vocab_size (#20976) 2023-02-08 09:19:06 -05:00
marian Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
markuplm [processor] Add 'model input names' property (#20117) 2022-11-10 19:29:20 +00:00
mask2former Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
maskformer Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
mbart Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
mbart50 Replace as_target context managers by direct calls (#18325) 2022-07-29 08:09:09 -04:00
mctct Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
megatron_bert Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
megatron_gpt2 Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
mluke Black preview (#17217) 2022-05-12 16:25:55 -04:00
mobilebert Tag tests as slow (#21537) 2023-02-09 14:46:15 +00:00
mobilenet_v1 Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
mobilenet_v2 Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
mobilevit Tag tests as slow (#21537) 2023-02-09 14:46:15 +00:00
mpnet Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
mt5 Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
mvp Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
nat Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
nezha Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
nllb Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
nystromformer Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
oneformer Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
openai Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
opt Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
owlvit Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
pegasus Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
pegasus_x Generate: move generation_*.py src files into generation/*.py (#20096) 2022-11-09 15:34:08 +00:00
perceiver Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
phobert Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
plbart Generate: fix plbart generation tests (#20391) 2022-11-22 17:56:04 +00:00
poolformer Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
prophetnet 🚨🚨🚨 Enforce single model initialization (#21431) 2023-02-09 15:46:26 -05:00
qdqbert Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
rag Tag tests as slow (#21537) 2023-02-09 14:46:15 +00:00
realm Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
reformer 🚨🚨🚨 Enforce single model initialization (#21431) 2023-02-09 15:46:26 -05:00
regnet [Tests] Improve test_attention_outputs (#20701) 2022-12-14 14:41:40 +01:00
rembert Wrap RemBert integration test forward passes with torch.no_grad() (#21503) 2023-02-08 14:00:52 +01:00
resnet [Tests] Improve test_attention_outputs (#20701) 2022-12-14 14:41:40 +01:00
retribert Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
roberta Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
roberta_prelayernorm Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
roc_bert fix both failing RoCBert tests (#20469) 2022-11-28 17:08:57 +01:00
roformer Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
segformer Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
sew Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
sew_d Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
speech_encoder_decoder Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
speech_to_text Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
speech_to_text_2 Generate: move generation_*.py src files into generation/*.py (#20096) 2022-11-09 15:34:08 +00:00
speecht5 Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
splinter Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
squeezebert Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
swin Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
swin2sr Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
swinv2 Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
switch_transformers Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
t5 Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
table_transformer Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
tapas Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
tapex Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
time_series_transformer Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
timesformer Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
trajectory_transformer Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
transfo_xl Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
trocr Generate: move generation_*.py src files into generation/*.py (#20096) 2022-11-09 15:34:08 +00:00
tvlt Add TVLT (#20725) 2023-02-15 18:10:30 +00:00
unispeech Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
unispeech_sat Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
upernet Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
van [Tests] Improve test_attention_outputs (#20701) 2022-12-14 14:41:40 +01:00
videomae Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
vilt Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
vision_encoder_decoder Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
vision_text_dual_encoder Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
visual_bert Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
vit Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
vit_hybrid 🚨🚨🚨 Enforce single model initialization (#21431) 2023-02-09 15:46:26 -05:00
vit_mae Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
vit_msn Some fixes regarding auto mappings and test class names (#19923) 2022-10-27 14:38:59 +02:00
wav2vec2 Skipping more high mem tests - Wav2Vec2 Hubert (#21647) 2023-02-15 16:00:50 +00:00
wav2vec2_conformer [Test] Fix W2V-Conformer integration test (#17303) 2022-05-17 18:20:36 +02:00
wav2vec2_phoneme Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
wav2vec2_with_lm Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
wavlm Move test model folders (#17034) 2022-05-03 14:42:02 +02:00
whisper Fix env. variable type issue in testing (#21609) 2023-02-13 20:53:26 +01:00
x_clip Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
xglm Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
xlm Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
xlm_prophetnet Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
xlm_roberta Added with torch.no_grad() to XLM-Roberta integration test (#21547) 2023-02-09 21:49:54 +01:00
xlm_roberta_xl Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
xlnet Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
xmod [WIP] Move X-MOD models to facebook organization (#21640) 2023-02-16 09:18:25 -05:00
yolos Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
yoso Update quality tooling for formatting (#21480) 2023-02-06 18:10:56 -05:00
__init__.py Move test model folders (#17034) 2022-05-03 14:42:02 +02:00