transformers/docs/source/en/model_doc
Nate Cibik 1fc505b816
Add PvT-v2 Model (#26812)
* Added pytests for pvt-v2, all passed

* Added pvt_v2 to docs/source/end/model_doc

* Ran fix-copies and fixup. All checks passed

* Added additional ReLU for linear attention mode

* pvt_v2_b2_linear converted and working

* copied models/pvt to adapt to pvt_v2

* First commit of pvt_v2

* PvT-v2 now works in AutoModel

* Reverted batch eval changes for PR

* Expanded type support for Pvt-v2 config

* Fixed config docstring. Added channels property

* Fixed model names in tests

* Fixed config backbone compat. Added additional type support for image size in config

* Fixed config backbone compat

* Allowed for batching of eval metrics

* copied models/pvt to adapt to pvt_v2

* First commit of pvt_v2

* Set key and value layers to use separate linear modules. Fixed pruning function

* Set AvgPool to 7

* Fixed issue in init

* PvT-v2 now works in AutoModel

* Successful conversion of pretrained weights for PVT-v2

* Successful conversion of pretrained weights for PVT-v2 models

* Added pytests for pvt-v2, all passed

* Ran fix-copies and fixup. All checks passed

* Added additional ReLU for linear attention mode

* pvt_v2_b2_linear converted and working

* Allowed for batching of eval metrics

* copied models/pvt to adapt to pvt_v2

* First commit of pvt_v2

* Set key and value layers to use separate linear modules. Fixed pruning function

* Set AvgPool to 7

* Fixed issue in init

* PvT-v2 now works in AutoModel

* Successful conversion of pretrained weights for PVT-v2

* Successful conversion of pretrained weights for PVT-v2 models

* Added pytests for pvt-v2, all passed

* Ran fix-copies and fixup. All checks passed

* Added additional ReLU for linear attention mode

* pvt_v2_b2_linear converted and working

* Reverted batch eval changes for PR

* Updated index.md

* Expanded type support for Pvt-v2 config

* Fixed config docstring. Added channels property

* Fixed model names in tests

* Fixed config backbone compat

* Ran fix-copies

* Fixed PvtV2Backbone tests

* Added TFRegNet to OBJECTS_TO_IGNORE in check_docstrings.py

* Fixed backbone stuff and fixed tests: all passing

* Ran make fixup

* Made modifications for code checks

* Remove ONNX config from configuration_pvt_v2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Use explicit image size dict in test_modeling_pvt_v2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Make image_size optional in test_modeling_pvt_v2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Remove _ntuple use in modeling_pvt_v2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Remove reference to fp16_enabled

* Model modules now take config as first argument even when not used

* Replaced abbreviations for "SR" and "AP" with explicit "spatialreduction" and "averagepooling"

* All LayerNorm now instantiates with config.layer_norm_eps

* Added docstring for depth-wise conv layer

* PvtV2Config now only takes Union[int, Tuple[int, int]] for image size

* Refactored PVTv2 in prep for gradient checkpointing

* Gradient checkpointing ready to test

* Removed override of _set_gradient_checkpointing

* Cleaned out old code

* Applied code fixup

* Applied code fixup

* Began debug of pvt_v2 tests

* Leave handling of num_labels to base pretrained config class

* Deactivated gradient checkpointing tests until it is fixed

* Removed PvtV2ImageProcessor which duped PvtImageProcessor

* Allowed for batching of eval metrics

* copied models/pvt to adapt to pvt_v2

* First commit of pvt_v2

* Set key and value layers to use separate linear modules. Fixed pruning function

* Set AvgPool to 7

* Fixed issue in init

* PvT-v2 now works in AutoModel

* Successful conversion of pretrained weights for PVT-v2

* Successful conversion of pretrained weights for PVT-v2 models

* Added pytests for pvt-v2, all passed

* Added pvt_v2 to docs/source/end/model_doc

* Ran fix-copies and fixup. All checks passed

* Added additional ReLU for linear attention mode

* pvt_v2_b2_linear converted and working

* copied models/pvt to adapt to pvt_v2

* First commit of pvt_v2

* PvT-v2 now works in AutoModel

* Reverted batch eval changes for PR

* Expanded type support for Pvt-v2 config

* Fixed config docstring. Added channels property

* Fixed model names in tests

* Fixed config backbone compat. Added additional type support for image size in config

* Fixed config backbone compat

* Allowed for batching of eval metrics

* copied models/pvt to adapt to pvt_v2

* First commit of pvt_v2

* Set key and value layers to use separate linear modules. Fixed pruning function

* Set AvgPool to 7

* Fixed issue in init

* PvT-v2 now works in AutoModel

* Successful conversion of pretrained weights for PVT-v2

* Successful conversion of pretrained weights for PVT-v2 models

* Added pytests for pvt-v2, all passed

* Ran fix-copies and fixup. All checks passed

* Added additional ReLU for linear attention mode

* pvt_v2_b2_linear converted and working

* Allowed for batching of eval metrics

* copied models/pvt to adapt to pvt_v2

* First commit of pvt_v2

* Set key and value layers to use separate linear modules. Fixed pruning function

* Set AvgPool to 7

* Fixed issue in init

* PvT-v2 now works in AutoModel

* Successful conversion of pretrained weights for PVT-v2

* Successful conversion of pretrained weights for PVT-v2 models

* Added pytests for pvt-v2, all passed

* Ran fix-copies and fixup. All checks passed

* Added additional ReLU for linear attention mode

* pvt_v2_b2_linear converted and working

* Reverted batch eval changes for PR

* Expanded type support for Pvt-v2 config

* Fixed config docstring. Added channels property

* Fixed model names in tests

* Fixed config backbone compat

* Ran fix-copies

* Fixed PvtV2Backbone tests

* Added TFRegNet to OBJECTS_TO_IGNORE in check_docstrings.py

* Fixed backbone stuff and fixed tests: all passing

* Ran make fixup

* Made modifications for code checks

* Remove ONNX config from configuration_pvt_v2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Use explicit image size dict in test_modeling_pvt_v2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Make image_size optional in test_modeling_pvt_v2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Remove _ntuple use in modeling_pvt_v2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Remove reference to fp16_enabled

* Model modules now take config as first argument even when not used

* Replaced abbreviations for "SR" and "AP" with explicit "spatialreduction" and "averagepooling"

* All LayerNorm now instantiates with config.layer_norm_eps

* Added docstring for depth-wise conv layer

* PvtV2Config now only takes Union[int, Tuple[int, int]] for image size

* Refactored PVTv2 in prep for gradient checkpointing

* Gradient checkpointing ready to test

* Removed override of _set_gradient_checkpointing

* Cleaned out old code

* Applied code fixup

* Applied code fixup

* Allowed for batching of eval metrics

* copied models/pvt to adapt to pvt_v2

* First commit of pvt_v2

* PvT-v2 now works in AutoModel

* Ran fix-copies and fixup. All checks passed

* copied models/pvt to adapt to pvt_v2

* First commit of pvt_v2

* PvT-v2 now works in AutoModel

* Reverted batch eval changes for PR

* Fixed config docstring. Added channels property

* Fixed config backbone compat

* Allowed for batching of eval metrics

* copied models/pvt to adapt to pvt_v2

* First commit of pvt_v2

* PvT-v2 now works in AutoModel

* Ran fix-copies and fixup. All checks passed

* Allowed for batching of eval metrics

* copied models/pvt to adapt to pvt_v2

* First commit of pvt_v2

* PvT-v2 now works in AutoModel

* Fixed config backbone compat

* Ran fix-copies

* Began debug of pvt_v2 tests

* Leave handling of num_labels to base pretrained config class

* Deactivated gradient checkpointing tests until it is fixed

* Removed PvtV2ImageProcessor which duped PvtImageProcessor

* Fixed issue from rebase

* Fixed issue from rebase

* Set tests for gradient checkpointing to skip those using reentrant since it isn't supported

* Fixed issue from rebase

* Fixed issue from rebase

* Changed model name in docs

* Removed duplicate PvtV2Backbone

* Work around type switching issue in tests

* Fix model name in config comments

* Update docs/source/en/model_doc/pvt_v2.md

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

* Changed name of variable from 'attn_reduce' to 'sr_type'

* Changed name of variable from 'attn_reduce' to 'sr_type'

* Changed from using 'sr_type' to 'linear_attention' for clarity

* Update src/transformers/models/pvt_v2/modeling_pvt_v2.py

Removed old code

* Changed from using 'sr_type' to 'linear_attention' for clarity

* Fixed Class names to be more descriptive

* Update src/transformers/models/pvt_v2/modeling_pvt_v2.py

Removed outdated code

* Moved paper abstract to single line in pvt_v2.md

* Added usage tips to pvt_v2.md

* Simplified module inits by passing layer_idx

* Fixed typing for hidden_act in PvtV2Config

* Removed unusued import

* Add pvt_v2 to docs/source/en/_toctree.yml

* Updated documentation in docs/source/en/model_doc/pvt_v2.md to be more comprehensive.

* Updated documentation in docs/source/en/model_doc/pvt_v2.md to be more comprehensive.

* Update src/transformers/models/pvt_v2/modeling_pvt_v2.py

Move function parameters to single line

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Update src/transformers/models/pvt_v2/modeling_pvt_v2.py

Update year of copyright to 2024

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Update src/transformers/models/pvt_v2/modeling_pvt_v2.py

Make code more explicit

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Updated sr_ratio to be more explicit spatial_reduction_ratio

* Removed excess type hints in modeling_pvt_v2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Move params to single line in modeling_pvt_v2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Removed needless comment in modeling_pvt_v2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Update copyright date in pvt_v2.md

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Moved params to single line in modeling_pvt_v2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Updated copyright date in configuration_pvt_v2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Cleaned comments in modeling_pvt_v2.py

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>

* Renamed spatial_reduction Conv2D operation

* Revert "Update src/transformers/models/pvt_v2/modeling_pvt_v2.py
"

This reverts commit c4a04416dde8f3475ab405d1feb368600e0f8538.

* Updated conversion script to reflect module name change

* Deprecated reshape_last_stage option in config

* Removed unused imports

* Code formatting

* Fixed outdated decorators on test_inference_fp16

* Added "Copied from" comments in test_modeling_pvt_v2.py

* Fixed import listing

* Updated model name

* Force empty commit for PR refresh

* Fixed linting issue

* Removed # Copied from comments

* Added PVTv2 to README_fr.md

* Ran make fix-copies

* Replace all FoamoftheSea hub references with OpenGVLab

* Fixed out_indices and out_features logic in configuration_pvt_v2.py

* Made ImageNet weight conversion verification optional in convert_pvt_v2_to_pytorch.py

* Ran code fixup

* Fixed order of parent classes in PvtV2Config to fix the to_dict method override

---------

Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
Co-authored-by: Arthur <48595927+ArthurZucker@users.noreply.github.com>
2024-03-13 19:05:20 +00:00
..
albert.md
align.md
altclip.md
audio-spectrogram-transformer.md
auto.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
autoformer.md
bark.md
bart.md
barthez.md
bartpho.md
beit.md
bert-generation.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
bert-japanese.md
bert.md Fixed broken link (#29558) 2024-03-11 17:26:38 +00:00
bertweet.md
big_bird.md
bigbird_pegasus.md
biogpt.md
bit.md
blenderbot-small.md
blenderbot.md
blip-2.md
blip.md
bloom.md
bort.md
bridgetower.md
bros.md
byt5.md
camembert.md small doc update for CamemBERT (#28644) 2024-01-29 15:46:32 +01:00
canine.md
chinese_clip.md
clap.md
clip.md Add SiglipForImageClassification and CLIPForImageClassification (#28952) 2024-02-14 08:41:31 +01:00
clipseg.md
clvp.md
code_llama.md
codegen.md
conditional_detr.md
convbert.md
convnext.md
convnextv2.md
cpm.md
cpmant.md
ctrl.md
cvt.md
data2vec.md
deberta-v2.md
deberta.md
decision_transformer.md
deformable_detr.md
deit.md
deplot.md
depth_anything.md [Docs] Add resources (#28705) 2024-02-19 15:22:29 +01:00
deta.md
detr.md
dialogpt.md
dinat.md
dinov2.md
distilbert.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
dit.md
donut.md
dpr.md
dpt.md
efficientformer.md
efficientnet.md
electra.md
encodec.md
encoder-decoder.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
ernie.md
ernie_m.md
esm.md
falcon.md
fastspeech2_conformer.md [Docs] Add language identifiers to fenced code blocks (#28955) 2024-02-12 10:48:31 -08:00
flan-t5.md
flan-ul2.md
flaubert.md
flava.md
fnet.md
focalnet.md
fsmt.md
funnel.md
fuyu.md Fix Fuyu doc typos (#29601) 2024-03-12 10:16:21 +00:00
gemma.md [ gemma] Adds support for Gemma 💎 (#29167) 2024-02-21 14:21:28 +01:00
git.md
glpn.md
gpt-sw3.md Fix paths to AI Sweden Models reference and model loading (#28423) 2024-01-15 09:09:22 +01:00
gpt2.md
gpt_bigcode.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
gpt_neo.md
gpt_neox.md
gpt_neox_japanese.md
gptj.md
gptsan-japanese.md
graphormer.md
groupvit.md
herbert.md
hubert.md
ibert.md
idefics.md
imagegpt.md
informer.md [Docs] Fix spelling and grammar mistakes (#28825) 2024-02-02 08:45:00 +01:00
instructblip.md
jukebox.md [Docs] Fix spelling and grammar mistakes (#28825) 2024-02-02 08:45:00 +01:00
kosmos-2.md
layoutlm.md
layoutlmv2.md [Docs] Add language identifiers to fenced code blocks (#28955) 2024-02-12 10:48:31 -08:00
layoutlmv3.md
layoutxlm.md
led.md
levit.md
lilt.md [Docs] Add language identifiers to fenced code blocks (#28955) 2024-02-12 10:48:31 -08:00
llama.md Adds LlamaForQuestionAnswering class in modeling_llama.py along with AutoModel Support (#28777) 2024-02-06 03:41:42 +01:00
llama2.md
llava.md
longformer.md
longt5.md
luke.md
lxmert.md
m2m_100.md
madlad-400.md
mamba.md [Mamba doc] Post merge updates (#29472) 2024-03-11 09:46:24 +01:00
marian.md
markuplm.md [Docs] Fix spelling and grammar mistakes (#28825) 2024-02-02 08:45:00 +01:00
mask2former.md
maskformer.md [Docs] Fix spelling and grammar mistakes (#28825) 2024-02-02 08:45:00 +01:00
matcha.md
mbart.md
mctct.md
mega.md
megatron-bert.md
megatron_gpt2.md
mgp-str.md [Docs] Fix broken links and syntax issues (#28918) 2024-02-08 14:13:35 -08:00
mistral.md [Mistral, Mixtral] Improve docs (#29084) 2024-02-22 11:48:01 +01:00
mixtral.md [Mistral, Mixtral] Improve docs (#29084) 2024-02-22 11:48:01 +01:00
mluke.md
mms.md [Docs] Fix spelling and grammar mistakes (#28825) 2024-02-02 08:45:00 +01:00
mobilebert.md
mobilenet_v1.md
mobilenet_v2.md
mobilevit.md
mobilevitv2.md
mpnet.md
mpt.md
mra.md
mt5.md Adding [T5/MT5/UMT5]ForTokenClassification (#28443) 2024-02-01 03:53:49 +01:00
musicgen.md [Docs] Add language identifiers to fenced code blocks (#28955) 2024-02-12 10:48:31 -08:00
mvp.md
nat.md
nezha.md
nllb-moe.md
nllb.md
nougat.md
nystromformer.md
oneformer.md
open-llama.md
openai-gpt.md
opt.md
owlv2.md
owlvit.md
patchtsmixer.md [Docs] Add resources (#28705) 2024-02-19 15:22:29 +01:00
patchtst.md [Docs] Add resources (#28705) 2024-02-19 15:22:29 +01:00
pegasus.md
pegasus_x.md [Docs] Fix broken links and syntax issues (#28918) 2024-02-08 14:13:35 -08:00
perceiver.md
persimmon.md
phi.md Fix phi model doc checkpoint (#28581) 2024-01-22 17:15:07 +00:00
phobert.md
pix2struct.md 🌐 [i18n-ZH] Translate chat_templating.md into Chinese (#28790) 2024-02-26 08:42:24 -08:00
plbart.md
poolformer.md
pop2piano.md [Docs] Add language identifiers to fenced code blocks (#28955) 2024-02-12 10:48:31 -08:00
prophetnet.md
pvt.md [Docs] Fix broken links and syntax issues (#28918) 2024-02-08 14:13:35 -08:00
pvt_v2.md Add PvT-v2 Model (#26812) 2024-03-13 19:05:20 +00:00
qdqbert.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
qwen2.md [Doc] update model doc qwen2 (#29238) 2024-02-23 10:43:31 +01:00
rag.md
realm.md
reformer.md [Docs] Fix spelling and grammar mistakes (#28825) 2024-02-02 08:45:00 +01:00
regnet.md
rembert.md
resnet.md
retribert.md
roberta-prelayernorm.md
roberta.md
roc_bert.md
roformer.md
rwkv.md [Docs] Fix spelling and grammar mistakes (#28825) 2024-02-02 08:45:00 +01:00
sam.md [Docs] Add resources (#28705) 2024-02-19 15:22:29 +01:00
seamless_m4t.md
seamless_m4t_v2.md
segformer.md
seggpt.md Fix minor typo: infenrece => inference (#29621) 2024-03-13 14:49:09 +00:00
sew-d.md
sew.md
siglip.md [Docs] Add resources (#28705) 2024-02-19 15:22:29 +01:00
speech-encoder-decoder.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
speech_to_text.md
speech_to_text_2.md
speecht5.md
splinter.md
squeezebert.md
stablelm.md Add StableLM (#28810) 2024-02-14 07:15:18 +01:00
starcoder2.md [docs] Add starcoder2 docs (#29454) 2024-03-06 06:58:37 +01:00
swiftformer.md
swin.md
swin2sr.md
swinv2.md
switch_transformers.md
t5.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
t5v1.1.md
table-transformer.md
tapas.md
tapex.md
time_series_transformer.md
timesformer.md
trajectory_transformer.md
transfo-xl.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
trocr.md
tvlt.md
tvp.md
udop.md Add UDOP (#22940) 2024-03-04 18:49:02 +01:00
ul2.md
umt5.md [Docs] Fix spelling and grammar mistakes (#28825) 2024-02-02 08:45:00 +01:00
unispeech-sat.md [Docs] Fix spelling and grammar mistakes (#28825) 2024-02-02 08:45:00 +01:00
unispeech.md
univnet.md
upernet.md
van.md [Docs] Fix spelling and grammar mistakes (#28825) 2024-02-02 08:45:00 +01:00
videomae.md
vilt.md
vipllava.md
vision-encoder-decoder.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
vision-text-dual-encoder.md
visual_bert.md Update all references to canonical models (#29001) 2024-02-16 08:16:58 +01:00
vit.md
vit_hybrid.md
vit_mae.md
vit_msn.md
vitdet.md
vitmatte.md
vits.md
vivit.md
wav2vec2-bert.md Add new meta w2v2-conformer BERT-like model (#28165) 2024-01-18 13:37:34 +00:00
wav2vec2-conformer.md
wav2vec2.md [Docs] Fix spelling and grammar mistakes (#28825) 2024-02-02 08:45:00 +01:00
wav2vec2_phoneme.md
wavlm.md [Docs] Fix spelling and grammar mistakes (#28825) 2024-02-02 08:45:00 +01:00
whisper.md [Docs] Add resources (#28705) 2024-02-19 15:22:29 +01:00
xclip.md
xglm.md
xlm-prophetnet.md
xlm-roberta-xl.md
xlm-roberta.md
xlm-v.md
xlm.md
xlnet.md
xls_r.md
xlsr_wav2vec2.md
xmod.md
yolos.md
yoso.md