Stardragon2099
commited on
Commit
•
0bd6ae4
1
Parent(s):
ff5314f
Upload Florence2ForConditionalGeneration
Browse files- README.md +199 -0
- config.json +239 -0
- generation_config.json +13 -0
- model.safetensors +3 -0
README.md
ADDED
@@ -0,0 +1,199 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: transformers
|
3 |
+
tags: []
|
4 |
+
---
|
5 |
+
|
6 |
+
# Model Card for Model ID
|
7 |
+
|
8 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
## Model Details
|
13 |
+
|
14 |
+
### Model Description
|
15 |
+
|
16 |
+
<!-- Provide a longer summary of what this model is. -->
|
17 |
+
|
18 |
+
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
|
19 |
+
|
20 |
+
- **Developed by:** [More Information Needed]
|
21 |
+
- **Funded by [optional]:** [More Information Needed]
|
22 |
+
- **Shared by [optional]:** [More Information Needed]
|
23 |
+
- **Model type:** [More Information Needed]
|
24 |
+
- **Language(s) (NLP):** [More Information Needed]
|
25 |
+
- **License:** [More Information Needed]
|
26 |
+
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
+
|
28 |
+
### Model Sources [optional]
|
29 |
+
|
30 |
+
<!-- Provide the basic links for the model. -->
|
31 |
+
|
32 |
+
- **Repository:** [More Information Needed]
|
33 |
+
- **Paper [optional]:** [More Information Needed]
|
34 |
+
- **Demo [optional]:** [More Information Needed]
|
35 |
+
|
36 |
+
## Uses
|
37 |
+
|
38 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
39 |
+
|
40 |
+
### Direct Use
|
41 |
+
|
42 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
43 |
+
|
44 |
+
[More Information Needed]
|
45 |
+
|
46 |
+
### Downstream Use [optional]
|
47 |
+
|
48 |
+
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
49 |
+
|
50 |
+
[More Information Needed]
|
51 |
+
|
52 |
+
### Out-of-Scope Use
|
53 |
+
|
54 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
+
|
56 |
+
[More Information Needed]
|
57 |
+
|
58 |
+
## Bias, Risks, and Limitations
|
59 |
+
|
60 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
+
|
62 |
+
[More Information Needed]
|
63 |
+
|
64 |
+
### Recommendations
|
65 |
+
|
66 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
+
|
68 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
69 |
+
|
70 |
+
## How to Get Started with the Model
|
71 |
+
|
72 |
+
Use the code below to get started with the model.
|
73 |
+
|
74 |
+
[More Information Needed]
|
75 |
+
|
76 |
+
## Training Details
|
77 |
+
|
78 |
+
### Training Data
|
79 |
+
|
80 |
+
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
81 |
+
|
82 |
+
[More Information Needed]
|
83 |
+
|
84 |
+
### Training Procedure
|
85 |
+
|
86 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
+
|
88 |
+
#### Preprocessing [optional]
|
89 |
+
|
90 |
+
[More Information Needed]
|
91 |
+
|
92 |
+
|
93 |
+
#### Training Hyperparameters
|
94 |
+
|
95 |
+
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
96 |
+
|
97 |
+
#### Speeds, Sizes, Times [optional]
|
98 |
+
|
99 |
+
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
100 |
+
|
101 |
+
[More Information Needed]
|
102 |
+
|
103 |
+
## Evaluation
|
104 |
+
|
105 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
106 |
+
|
107 |
+
### Testing Data, Factors & Metrics
|
108 |
+
|
109 |
+
#### Testing Data
|
110 |
+
|
111 |
+
<!-- This should link to a Dataset Card if possible. -->
|
112 |
+
|
113 |
+
[More Information Needed]
|
114 |
+
|
115 |
+
#### Factors
|
116 |
+
|
117 |
+
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
118 |
+
|
119 |
+
[More Information Needed]
|
120 |
+
|
121 |
+
#### Metrics
|
122 |
+
|
123 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
124 |
+
|
125 |
+
[More Information Needed]
|
126 |
+
|
127 |
+
### Results
|
128 |
+
|
129 |
+
[More Information Needed]
|
130 |
+
|
131 |
+
#### Summary
|
132 |
+
|
133 |
+
|
134 |
+
|
135 |
+
## Model Examination [optional]
|
136 |
+
|
137 |
+
<!-- Relevant interpretability work for the model goes here -->
|
138 |
+
|
139 |
+
[More Information Needed]
|
140 |
+
|
141 |
+
## Environmental Impact
|
142 |
+
|
143 |
+
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
144 |
+
|
145 |
+
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
146 |
+
|
147 |
+
- **Hardware Type:** [More Information Needed]
|
148 |
+
- **Hours used:** [More Information Needed]
|
149 |
+
- **Cloud Provider:** [More Information Needed]
|
150 |
+
- **Compute Region:** [More Information Needed]
|
151 |
+
- **Carbon Emitted:** [More Information Needed]
|
152 |
+
|
153 |
+
## Technical Specifications [optional]
|
154 |
+
|
155 |
+
### Model Architecture and Objective
|
156 |
+
|
157 |
+
[More Information Needed]
|
158 |
+
|
159 |
+
### Compute Infrastructure
|
160 |
+
|
161 |
+
[More Information Needed]
|
162 |
+
|
163 |
+
#### Hardware
|
164 |
+
|
165 |
+
[More Information Needed]
|
166 |
+
|
167 |
+
#### Software
|
168 |
+
|
169 |
+
[More Information Needed]
|
170 |
+
|
171 |
+
## Citation [optional]
|
172 |
+
|
173 |
+
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
174 |
+
|
175 |
+
**BibTeX:**
|
176 |
+
|
177 |
+
[More Information Needed]
|
178 |
+
|
179 |
+
**APA:**
|
180 |
+
|
181 |
+
[More Information Needed]
|
182 |
+
|
183 |
+
## Glossary [optional]
|
184 |
+
|
185 |
+
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
186 |
+
|
187 |
+
[More Information Needed]
|
188 |
+
|
189 |
+
## More Information [optional]
|
190 |
+
|
191 |
+
[More Information Needed]
|
192 |
+
|
193 |
+
## Model Card Authors [optional]
|
194 |
+
|
195 |
+
[More Information Needed]
|
196 |
+
|
197 |
+
## Model Card Contact
|
198 |
+
|
199 |
+
[More Information Needed]
|
config.json
ADDED
@@ -0,0 +1,239 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "microsoft/Florence-2-base-ft",
|
3 |
+
"architectures": [
|
4 |
+
"Florence2ForConditionalGeneration"
|
5 |
+
],
|
6 |
+
"auto_map": {
|
7 |
+
"AutoConfig": "microsoft/Florence-2-base-ft--configuration_florence2.Florence2Config",
|
8 |
+
"AutoModelForCausalLM": "microsoft/Florence-2-base-ft--modeling_florence2.Florence2ForConditionalGeneration"
|
9 |
+
},
|
10 |
+
"bos_token_id": 2,
|
11 |
+
"eos_token_id": 1,
|
12 |
+
"ignore_index": -100,
|
13 |
+
"is_encoder_decoder": true,
|
14 |
+
"model_type": "florence2",
|
15 |
+
"pad_token_id": 0,
|
16 |
+
"projection_dim": 768,
|
17 |
+
"text_config": {
|
18 |
+
"_attn_implementation_autoset": true,
|
19 |
+
"_name_or_path": "",
|
20 |
+
"activation_dropout": 0.1,
|
21 |
+
"activation_function": "gelu",
|
22 |
+
"add_bias_logits": false,
|
23 |
+
"add_cross_attention": false,
|
24 |
+
"add_final_layer_norm": false,
|
25 |
+
"architectures": null,
|
26 |
+
"attention_dropout": 0.1,
|
27 |
+
"bad_words_ids": null,
|
28 |
+
"begin_suppress_tokens": null,
|
29 |
+
"bos_token_id": 0,
|
30 |
+
"chunk_size_feed_forward": 0,
|
31 |
+
"classif_dropout": 0.1,
|
32 |
+
"classifier_dropout": 0.0,
|
33 |
+
"cross_attention_hidden_size": null,
|
34 |
+
"d_model": 768,
|
35 |
+
"decoder_attention_heads": 12,
|
36 |
+
"decoder_ffn_dim": 3072,
|
37 |
+
"decoder_layerdrop": 0.0,
|
38 |
+
"decoder_layers": 6,
|
39 |
+
"decoder_start_token_id": 2,
|
40 |
+
"diversity_penalty": 0.0,
|
41 |
+
"do_sample": false,
|
42 |
+
"dropout": 0.1,
|
43 |
+
"early_stopping": true,
|
44 |
+
"encoder_attention_heads": 12,
|
45 |
+
"encoder_ffn_dim": 3072,
|
46 |
+
"encoder_layerdrop": 0.0,
|
47 |
+
"encoder_layers": 6,
|
48 |
+
"encoder_no_repeat_ngram_size": 0,
|
49 |
+
"eos_token_id": 2,
|
50 |
+
"exponential_decay_length_penalty": null,
|
51 |
+
"finetuning_task": null,
|
52 |
+
"forced_bos_token_id": 0,
|
53 |
+
"forced_eos_token_id": 2,
|
54 |
+
"gradient_checkpointing": false,
|
55 |
+
"id2label": {
|
56 |
+
"0": "LABEL_0",
|
57 |
+
"1": "LABEL_1",
|
58 |
+
"2": "LABEL_2"
|
59 |
+
},
|
60 |
+
"init_std": 0.02,
|
61 |
+
"is_decoder": false,
|
62 |
+
"is_encoder_decoder": true,
|
63 |
+
"label2id": {
|
64 |
+
"LABEL_0": 0,
|
65 |
+
"LABEL_1": 1,
|
66 |
+
"LABEL_2": 2
|
67 |
+
},
|
68 |
+
"length_penalty": 1.0,
|
69 |
+
"max_length": 20,
|
70 |
+
"max_position_embeddings": 1024,
|
71 |
+
"min_length": 0,
|
72 |
+
"model_type": "florence2_language",
|
73 |
+
"no_repeat_ngram_size": 3,
|
74 |
+
"normalize_before": false,
|
75 |
+
"num_beam_groups": 1,
|
76 |
+
"num_beams": 3,
|
77 |
+
"num_hidden_layers": 6,
|
78 |
+
"num_return_sequences": 1,
|
79 |
+
"output_attentions": false,
|
80 |
+
"output_hidden_states": false,
|
81 |
+
"output_scores": false,
|
82 |
+
"pad_token_id": 1,
|
83 |
+
"prefix": null,
|
84 |
+
"problem_type": null,
|
85 |
+
"pruned_heads": {},
|
86 |
+
"remove_invalid_values": false,
|
87 |
+
"repetition_penalty": 1.0,
|
88 |
+
"return_dict": true,
|
89 |
+
"return_dict_in_generate": false,
|
90 |
+
"scale_embedding": false,
|
91 |
+
"sep_token_id": null,
|
92 |
+
"suppress_tokens": null,
|
93 |
+
"task_specific_params": null,
|
94 |
+
"temperature": 1.0,
|
95 |
+
"tf_legacy_loss": false,
|
96 |
+
"tie_encoder_decoder": false,
|
97 |
+
"tie_word_embeddings": true,
|
98 |
+
"tokenizer_class": null,
|
99 |
+
"top_k": 50,
|
100 |
+
"top_p": 1.0,
|
101 |
+
"torch_dtype": null,
|
102 |
+
"torchscript": false,
|
103 |
+
"typical_p": 1.0,
|
104 |
+
"use_bfloat16": false,
|
105 |
+
"use_cache": true,
|
106 |
+
"vocab_size": 51289
|
107 |
+
},
|
108 |
+
"torch_dtype": "float32",
|
109 |
+
"transformers_version": "4.47.0",
|
110 |
+
"vision_config": {
|
111 |
+
"_attn_implementation_autoset": false,
|
112 |
+
"_name_or_path": "",
|
113 |
+
"add_cross_attention": false,
|
114 |
+
"architectures": null,
|
115 |
+
"bad_words_ids": null,
|
116 |
+
"begin_suppress_tokens": null,
|
117 |
+
"bos_token_id": null,
|
118 |
+
"chunk_size_feed_forward": 0,
|
119 |
+
"cross_attention_hidden_size": null,
|
120 |
+
"decoder_start_token_id": null,
|
121 |
+
"depths": [
|
122 |
+
1,
|
123 |
+
1,
|
124 |
+
9,
|
125 |
+
1
|
126 |
+
],
|
127 |
+
"dim_embed": [
|
128 |
+
128,
|
129 |
+
256,
|
130 |
+
512,
|
131 |
+
1024
|
132 |
+
],
|
133 |
+
"diversity_penalty": 0.0,
|
134 |
+
"do_sample": false,
|
135 |
+
"drop_path_rate": 0.1,
|
136 |
+
"early_stopping": false,
|
137 |
+
"enable_checkpoint": false,
|
138 |
+
"encoder_no_repeat_ngram_size": 0,
|
139 |
+
"eos_token_id": null,
|
140 |
+
"exponential_decay_length_penalty": null,
|
141 |
+
"finetuning_task": null,
|
142 |
+
"forced_bos_token_id": null,
|
143 |
+
"forced_eos_token_id": null,
|
144 |
+
"id2label": {
|
145 |
+
"0": "LABEL_0",
|
146 |
+
"1": "LABEL_1"
|
147 |
+
},
|
148 |
+
"image_feature_source": [
|
149 |
+
"spatial_avg_pool",
|
150 |
+
"temporal_avg_pool"
|
151 |
+
],
|
152 |
+
"image_pos_embed": {
|
153 |
+
"max_pos_embeddings": 50,
|
154 |
+
"type": "learned_abs_2d"
|
155 |
+
},
|
156 |
+
"is_decoder": false,
|
157 |
+
"is_encoder_decoder": false,
|
158 |
+
"label2id": {
|
159 |
+
"LABEL_0": 0,
|
160 |
+
"LABEL_1": 1
|
161 |
+
},
|
162 |
+
"length_penalty": 1.0,
|
163 |
+
"max_length": 20,
|
164 |
+
"min_length": 0,
|
165 |
+
"model_type": "",
|
166 |
+
"no_repeat_ngram_size": 0,
|
167 |
+
"num_beam_groups": 1,
|
168 |
+
"num_beams": 1,
|
169 |
+
"num_groups": [
|
170 |
+
4,
|
171 |
+
8,
|
172 |
+
16,
|
173 |
+
32
|
174 |
+
],
|
175 |
+
"num_heads": [
|
176 |
+
4,
|
177 |
+
8,
|
178 |
+
16,
|
179 |
+
32
|
180 |
+
],
|
181 |
+
"num_return_sequences": 1,
|
182 |
+
"output_attentions": false,
|
183 |
+
"output_hidden_states": false,
|
184 |
+
"output_scores": false,
|
185 |
+
"pad_token_id": null,
|
186 |
+
"patch_padding": [
|
187 |
+
3,
|
188 |
+
1,
|
189 |
+
1,
|
190 |
+
1
|
191 |
+
],
|
192 |
+
"patch_prenorm": [
|
193 |
+
false,
|
194 |
+
true,
|
195 |
+
true,
|
196 |
+
true
|
197 |
+
],
|
198 |
+
"patch_size": [
|
199 |
+
7,
|
200 |
+
3,
|
201 |
+
3,
|
202 |
+
3
|
203 |
+
],
|
204 |
+
"patch_stride": [
|
205 |
+
4,
|
206 |
+
2,
|
207 |
+
2,
|
208 |
+
2
|
209 |
+
],
|
210 |
+
"prefix": null,
|
211 |
+
"problem_type": null,
|
212 |
+
"projection_dim": 768,
|
213 |
+
"pruned_heads": {},
|
214 |
+
"remove_invalid_values": false,
|
215 |
+
"repetition_penalty": 1.0,
|
216 |
+
"return_dict": true,
|
217 |
+
"return_dict_in_generate": false,
|
218 |
+
"sep_token_id": null,
|
219 |
+
"suppress_tokens": null,
|
220 |
+
"task_specific_params": null,
|
221 |
+
"temperature": 1.0,
|
222 |
+
"tf_legacy_loss": false,
|
223 |
+
"tie_encoder_decoder": false,
|
224 |
+
"tie_word_embeddings": true,
|
225 |
+
"tokenizer_class": null,
|
226 |
+
"top_k": 50,
|
227 |
+
"top_p": 1.0,
|
228 |
+
"torch_dtype": null,
|
229 |
+
"torchscript": false,
|
230 |
+
"typical_p": 1.0,
|
231 |
+
"use_bfloat16": false,
|
232 |
+
"visual_temporal_embedding": {
|
233 |
+
"max_temporal_embeddings": 100,
|
234 |
+
"type": "COSINE"
|
235 |
+
},
|
236 |
+
"window_size": 12
|
237 |
+
},
|
238 |
+
"vocab_size": 51289
|
239 |
+
}
|
generation_config.json
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_from_model_config": true,
|
3 |
+
"bos_token_id": 2,
|
4 |
+
"decoder_start_token_id": 2,
|
5 |
+
"early_stopping": true,
|
6 |
+
"eos_token_id": 1,
|
7 |
+
"forced_bos_token_id": 0,
|
8 |
+
"forced_eos_token_id": 2,
|
9 |
+
"no_repeat_ngram_size": 3,
|
10 |
+
"num_beams": 3,
|
11 |
+
"pad_token_id": 0,
|
12 |
+
"transformers_version": "4.47.0"
|
13 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ee327db2c071bb5d88162c1a3df7b07e2f9c0a37331c9f723e8e1db22b4f3cff
|
3 |
+
size 1083916964
|