Ross Wightman
cec70b6779
Merge pull request #2225 from huggingface/small_things
...
Small things
2024-07-25 20:29:13 -07:00
Ross Wightman
d2240745d3
Fix issue where feature out_indices out of order after wrapping with FeatureGetterNet due to use of set()
2024-07-22 13:33:30 -07:00
Feraidoon Mehri
4cca568bd8
eva.py: fixed bug in applying attention mask
...
The mask should be applied before the softmax.
2024-07-19 15:12:04 +03:30
Ross Wightman
f81b094aaa
Add 'qkv_bias_separate' flag for EVA/beit/swinv2 attn modules to allow an override for easy quantization wrappers. Fix #2098
2024-07-08 13:48:38 -07:00
Ross Wightman
a5a2ad2e48
Fix consistency, testing for forward_head w/ pre_logits, reset_classifier, models with pre_logits size != unpooled feature size
...
* add test that model supports forward_head(x, pre_logits=True)
* add head_hidden_size attr to all models and set differently from num_features attr when head has hidden layers
* test forward_features() feat dim == model.num_features and pre_logits feat dim == self.head_hidden_size
* more consistency in reset_classifier signature, add typing
* asserts in some heads where pooling cannot be disabled
Fix #2194
2024-06-07 13:53:00 -07:00
Ross Wightman
c838c4233f
Add typing to reset_classifier() on other models
2024-05-12 11:12:00 -07:00
Ross Wightman
1d3ab176bc
Remove debug / staging code
2024-05-10 22:16:34 -07:00
Ross Wightman
aa4d06a11c
sbb vit weights on hub, testing
2024-05-10 17:15:01 -07:00
Ross Wightman
3582ca499e
Prepping weight push, benchmarking.
2024-05-10 14:14:06 -07:00
Ross Wightman
f8979d4f50
Comment out time local files while testing new vit weights
2024-05-03 20:26:56 -07:00
Ross Wightman
c719f7eb86
More forward_intermediates() updates
...
* add convnext, resnet, efficientformer, levit support
* remove kwargs only for fn so that torchscript isn't broken for all :(
* use reset_classifier() consistently in prune
2024-05-03 16:22:32 -07:00
Ross Wightman
67332fce24
Add features_intermediate() support to coatnet, maxvit, swin* models. Refine feature interface. Start prep of new vit weights.
2024-04-30 16:56:33 -07:00
Ross Wightman
4b2565e4cb
More forward_intermediates() / FeatureGetterNet work
...
* include relpos vit
* refactor reduction / size calcs so hybrid vits work and dynamic_img_size works
* fix -ve feature indices when pruning
* fix mvitv2 w/ class token
* refine naming
* add tests
2024-04-10 15:11:34 -07:00
Ross Wightman
679daef76a
More forward_intermediates() & features_only work
...
* forward_intermediates() added to beit, deit, eva, mvitv2, twins, vit, vit_sam
* add features_only to forward intermediates to allow just intermediate features
* fix #2060
* fix #1374
* fix #657
2024-04-09 21:29:16 -07:00
LR
e0079c92da
Update eva.py ( #2058 )
...
* Update eva.py
When argument class token = False, self.cls_token = None.
Prevents error from attempting trunc_normal_ on None:
AttributeError: 'NoneType' object has no attribute 'uniform_'
* Update eva.py
fix
2023-12-16 15:10:45 -08:00
Yassine
884ef88818
fix all SDPA dropouts
2023-10-05 08:58:41 -07:00
Ross Wightman
fc5d705b83
dynamic_size -> dynamic_img_size, add dynamic_img_pad for padding option
2023-08-27 15:58:35 -07:00
Ross Wightman
1f4512fca3
Support dynamic_resize in eva.py models
2023-08-27 15:58:35 -07:00
Ross Wightman
f744bda994
use torch.jit.Final instead of Final for beit, eva
2023-05-12 09:12:14 -07:00
Ross Wightman
e4e43190ce
Add typing to all model entrypoint fns, add old cache check env var to builder
2023-05-08 08:52:38 -07:00
Ross Wightman
0b65b5c0ac
Add finalized eva CLIP weights pointing to remapped timm hub models
2023-04-10 23:13:12 -07:00
Ross Wightman
965d0a2d36
fast_attn -> fused_attn, implement global config for enable/disable fused_attn, add to more models. vit clip openai 336 weights.
2023-04-10 12:04:33 -07:00
Ross Wightman
4d135421a3
Implement patch dropout for eva / vision_transformer, refactor / improve consistency of dropout args across all vit based models
2023-04-07 20:27:23 -07:00
Ross Wightman
1bb3989b61
Improve kwarg passthrough for swin, vit, deit, beit, eva
2023-04-05 21:37:16 -07:00
Ross Wightman
adeb9de7c6
Mismatch in eva pretrained_cfg vs model for one of the clip variants
2023-03-31 10:30:30 -07:00
Ross Wightman
0737bd3ec8
eva02 non-CLIP weights on HF hub, add initial eva02 clip model configs w/ postnorm variant & attn LN
2023-03-30 23:43:59 -07:00
Ross Wightman
ac67098147
Add final attr for fast_attn on beit / eva
2023-03-28 08:40:40 -07:00
Ross Wightman
3863d63516
Adding EVA02 weights and model defs, move beit based eva_giant to same eva.py file. Cleanup rotary pos, add lang oriented freq bands to be compat with eva design choice. Fix #1738
2023-03-27 17:16:07 -07:00