julian-fong commited on
Commit
f0520a8
1 Parent(s): ee30c06

Upload model

Browse files
README.md ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - vit
4
+ - adapter-transformers
5
+ datasets:
6
+ - cifar100
7
+ ---
8
+
9
+ # Adapter `julian-fong/cifar100-adapterplus_config` for google/vit-base-patch16-224-in21k
10
+
11
+ An [adapter](https://adapterhub.ml) for the `google/vit-base-patch16-224-in21k` model that was trained on the [cifar100](https://huggingface.co/datasets/cifar100/) dataset and includes a prediction head for image classification.
12
+
13
+ This adapter was created for usage with the **[Adapters](https://github.com/Adapter-Hub/adapters)** library.
14
+
15
+ ## Usage
16
+
17
+ First, install `adapters`:
18
+
19
+ ```
20
+ pip install -U adapters
21
+ ```
22
+
23
+ Now, the adapter can be loaded and activated like this:
24
+
25
+ ```python
26
+ from adapters import AutoAdapterModel
27
+
28
+ model = AutoAdapterModel.from_pretrained("google/vit-base-patch16-224-in21k")
29
+ adapter_name = model.load_adapter("julian-fong/cifar100-adapterplus_config", set_active=True)
30
+ ```
31
+
32
+ ## Architecture & Training
33
+
34
+ <!-- Add some description here -->
35
+
36
+ ## Evaluation results
37
+
38
+ <!-- Add some description here -->
39
+
40
+ ## Citation
41
+
42
+ <!-- Add some description here -->
adapter_config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "adapter_residual_before_ln": false,
4
+ "cross_adapter": false,
5
+ "dropout": 0.0,
6
+ "factorized_phm_W": true,
7
+ "factorized_phm_rule": false,
8
+ "hypercomplex_nonlinearity": "glorot-uniform",
9
+ "init_weights": "houlsby",
10
+ "inv_adapter": null,
11
+ "inv_adapter_reduction_factor": null,
12
+ "is_parallel": false,
13
+ "learn_phm": true,
14
+ "leave_out": [],
15
+ "ln_after": false,
16
+ "ln_before": false,
17
+ "mh_adapter": false,
18
+ "non_linearity": "gelu",
19
+ "original_ln_after": true,
20
+ "original_ln_before": false,
21
+ "output_adapter": true,
22
+ "phm_bias": true,
23
+ "phm_c_init": "normal",
24
+ "phm_dim": 4,
25
+ "phm_init_range": 0.0001,
26
+ "phm_layer": false,
27
+ "phm_rank": 1,
28
+ "reduction_factor": 96,
29
+ "residual_before_ln": true,
30
+ "scaling": "channel",
31
+ "shared_W_phm": false,
32
+ "shared_phm_rule": true,
33
+ "stochastic_depth": 0.1,
34
+ "use_gating": false
35
+ },
36
+ "hidden_size": 768,
37
+ "model_class": "ViTAdapterModel",
38
+ "model_name": "google/vit-base-patch16-224-in21k",
39
+ "model_type": "vit",
40
+ "name": "adapterplus_config",
41
+ "version": "adapters.1.0.1"
42
+ }
head_config.json ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "config": {
3
+ "activation_function": "tanh",
4
+ "bias": true,
5
+ "dropout_prob": null,
6
+ "head_type": "image_classification",
7
+ "label2id": {
8
+ "LABEL_0": 0,
9
+ "LABEL_1": 1,
10
+ "LABEL_10": 10,
11
+ "LABEL_11": 11,
12
+ "LABEL_12": 12,
13
+ "LABEL_13": 13,
14
+ "LABEL_14": 14,
15
+ "LABEL_15": 15,
16
+ "LABEL_16": 16,
17
+ "LABEL_17": 17,
18
+ "LABEL_18": 18,
19
+ "LABEL_19": 19,
20
+ "LABEL_2": 2,
21
+ "LABEL_20": 20,
22
+ "LABEL_21": 21,
23
+ "LABEL_22": 22,
24
+ "LABEL_23": 23,
25
+ "LABEL_24": 24,
26
+ "LABEL_25": 25,
27
+ "LABEL_26": 26,
28
+ "LABEL_27": 27,
29
+ "LABEL_28": 28,
30
+ "LABEL_29": 29,
31
+ "LABEL_3": 3,
32
+ "LABEL_30": 30,
33
+ "LABEL_31": 31,
34
+ "LABEL_32": 32,
35
+ "LABEL_33": 33,
36
+ "LABEL_34": 34,
37
+ "LABEL_35": 35,
38
+ "LABEL_36": 36,
39
+ "LABEL_37": 37,
40
+ "LABEL_38": 38,
41
+ "LABEL_39": 39,
42
+ "LABEL_4": 4,
43
+ "LABEL_40": 40,
44
+ "LABEL_41": 41,
45
+ "LABEL_42": 42,
46
+ "LABEL_43": 43,
47
+ "LABEL_44": 44,
48
+ "LABEL_45": 45,
49
+ "LABEL_46": 46,
50
+ "LABEL_47": 47,
51
+ "LABEL_48": 48,
52
+ "LABEL_49": 49,
53
+ "LABEL_5": 5,
54
+ "LABEL_50": 50,
55
+ "LABEL_51": 51,
56
+ "LABEL_52": 52,
57
+ "LABEL_53": 53,
58
+ "LABEL_54": 54,
59
+ "LABEL_55": 55,
60
+ "LABEL_56": 56,
61
+ "LABEL_57": 57,
62
+ "LABEL_58": 58,
63
+ "LABEL_59": 59,
64
+ "LABEL_6": 6,
65
+ "LABEL_60": 60,
66
+ "LABEL_61": 61,
67
+ "LABEL_62": 62,
68
+ "LABEL_63": 63,
69
+ "LABEL_64": 64,
70
+ "LABEL_65": 65,
71
+ "LABEL_66": 66,
72
+ "LABEL_67": 67,
73
+ "LABEL_68": 68,
74
+ "LABEL_69": 69,
75
+ "LABEL_7": 7,
76
+ "LABEL_70": 70,
77
+ "LABEL_71": 71,
78
+ "LABEL_72": 72,
79
+ "LABEL_73": 73,
80
+ "LABEL_74": 74,
81
+ "LABEL_75": 75,
82
+ "LABEL_76": 76,
83
+ "LABEL_77": 77,
84
+ "LABEL_78": 78,
85
+ "LABEL_79": 79,
86
+ "LABEL_8": 8,
87
+ "LABEL_80": 80,
88
+ "LABEL_81": 81,
89
+ "LABEL_82": 82,
90
+ "LABEL_83": 83,
91
+ "LABEL_84": 84,
92
+ "LABEL_85": 85,
93
+ "LABEL_86": 86,
94
+ "LABEL_87": 87,
95
+ "LABEL_88": 88,
96
+ "LABEL_89": 89,
97
+ "LABEL_9": 9,
98
+ "LABEL_90": 90,
99
+ "LABEL_91": 91,
100
+ "LABEL_92": 92,
101
+ "LABEL_93": 93,
102
+ "LABEL_94": 94,
103
+ "LABEL_95": 95,
104
+ "LABEL_96": 96,
105
+ "LABEL_97": 97,
106
+ "LABEL_98": 98,
107
+ "LABEL_99": 99
108
+ },
109
+ "layers": 1,
110
+ "multilabel": false,
111
+ "num_labels": 100,
112
+ "use_pooler": false
113
+ },
114
+ "hidden_size": 768,
115
+ "model_class": "ViTAdapterModel",
116
+ "model_name": "google/vit-base-patch16-224-in21k",
117
+ "model_type": "vit",
118
+ "name": "adapterplus_config",
119
+ "version": "adapters.1.0.1"
120
+ }
pytorch_adapter.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:98524cfff3c26c49ac830945794bbf550e0d1a0eabc570e5b6ab946a3c6b7992
3
+ size 686690
pytorch_model_head.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:85a26a6ba9a79f87e4bcced7291aa2aa77920e025cb7b29f30585ec779750fee
3
+ size 309146