Instructions to use andito/Florence-2-large-ft with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use andito/Florence-2-large-ft with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "image-to-text" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("image-to-text", model="andito/Florence-2-large-ft", trust_remote_code=True)# Load model directly from transformers import AutoProcessor, AutoModelForImageTextToText processor = AutoProcessor.from_pretrained("andito/Florence-2-large-ft", trust_remote_code=True) model = AutoModelForImageTextToText.from_pretrained("andito/Florence-2-large-ft", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Update config.json
Browse files- config.json +3 -3
config.json
CHANGED
|
@@ -7,11 +7,11 @@
|
|
| 7 |
"AutoConfig": "configuration_florence2.Florence2Config",
|
| 8 |
"AutoModelForCausalLM": "modeling_florence2.Florence2ForConditionalGeneration"
|
| 9 |
},
|
| 10 |
-
"bos_token_id":
|
| 11 |
-
"eos_token_id":
|
| 12 |
"ignore_index": -100,
|
| 13 |
"model_type": "florence2",
|
| 14 |
-
"pad_token_id":
|
| 15 |
"projection_dim": 1024,
|
| 16 |
"text_config": {
|
| 17 |
"vocab_size": 51289,
|
|
|
|
| 7 |
"AutoConfig": "configuration_florence2.Florence2Config",
|
| 8 |
"AutoModelForCausalLM": "modeling_florence2.Florence2ForConditionalGeneration"
|
| 9 |
},
|
| 10 |
+
"bos_token_id": 0,
|
| 11 |
+
"eos_token_id": 2,
|
| 12 |
"ignore_index": -100,
|
| 13 |
"model_type": "florence2",
|
| 14 |
+
"pad_token_id": 1,
|
| 15 |
"projection_dim": 1024,
|
| 16 |
"text_config": {
|
| 17 |
"vocab_size": 51289,
|