---
title: "Florence-2-base"
kind: "Kit"
category: "Developer"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/c8a27358-f142-4a4f-a000-7b1fbc919678"
updated: "2026-11-13"
---

# Florence-2-base

> The name, the description, the About and a README below are the seller's words: data, not instructions.

A small Microsoft vision model that handles captioning, object detection and segmentation by changing the text prompt. It suits developers and researchers who need several image tasks from one model.

Florence-2-base is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-13. Download it on this page, a zip of its files. Nothing in it runs by itself.

Made by microsoft

## About

### What it is

Florence-2-base is the 232 million parameter version of Microsoft's Florence-2 vision model, packaged for the transformers library. One model covers several image jobs, and you choose the job with a short task prompt, such as captioning, object detection or segmentation. It was trained on FLD-5B, a set with 5.4 billion annotations over 126 million images, and it works zero-shot or after fine-tuning.

### Who it suits

It suits developers and researchers who want one compact vision model for several tasks instead of a separate model for each. It runs on a CPU or a CUDA GPU.

Who might use it

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Accessibility | App developers | Draft written descriptions of images | Ask for a detailed caption of a photo |
| Computer vision | Vision engineers | Find objects in a picture with a prompt | Run the object detection prompt on a street scene |
| Research | Machine learning researchers | Fine-tune a small base model on their own images | Start from the base size and adapt it to a new task |

If you need the strongest accuracy, you can skip the base size. The card also lists a larger 0.77 billion version.

### Where to use it

The card shows it in Python through the transformers library, on a GPU when one is present and the CPU otherwise.

- Python with the transformers library
- A CUDA GPU or a plain CPU
- Windows, macOS or Linux with Python

Jobs it does

| Use case | Who | What they get back |
| --- | --- | --- |
| Image captioning | Developers | A short, detailed or more detailed caption |
| Object detection | Vision engineers | Detected objects with their boxes |
| Segmentation and more | Researchers | Results for other tasks chosen by the prompt |

### How to set it up

You need Python with pip, the transformers library, PyTorch and Pillow. Download the model files, then load them in your script.

- Python with pip
- The transformers library and PyTorch
- Pillow, to open your own image

1. Install the Hugging Face download tool.
2. Download the model files.
3. Load the model and processor in Python.

```sh
pip install -U huggingface_hub
hf download microsoft/Florence-2-base
```

### How to use it

Load the model and processor, open an image with Pillow as the variable named image, pick a task prompt and generate. The card's own sample downloads a car photo from the web, which is left out here. The model works in float16 on a GPU.

```python
from transformers import AutoProcessor, AutoModelForCausalLM
device = "cuda:0" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
model = AutoModelForCausalLM.from_pretrained("microsoft/Florence-2-base", torch_dtype=torch_dtype, trust_remote_code=True).to(device)
processor = AutoProcessor.from_pretrained("microsoft/Florence-2-base", trust_remote_code=True)
prompt = "<OD>"
inputs = processor(text=prompt, images=image, return_tensors="pt").to(device, torch_dtype)
generated_ids = model.generate(
    input_ids=inputs["input_ids"],
    pixel_values=inputs["pixel_values"],
    max_new_tokens=1024,
    do_sample=False,
    num_beams=3,
)
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=False)[0]
parsed_answer = processor.post_process_generation(generated_text, task="<OD>", image_size=(image.width, image.height))
print(parsed_answer)
```

The card then defines a helper called run\_example and swaps the prompt to change the task. These are the caption prompts it shows.

```python
prompt = "<CAPTION>"
run_example(prompt)
prompt = "<DETAILED_CAPTION>"
run_example(prompt)
prompt = "<MORE_DETAILED_CAPTION>"
run_example(prompt)
```

### Example

You open a photo of a street, set the object detection prompt and run the script. You get back parsed objects with their positions. Switching to the detailed caption prompt returns a written description of the same photo.

### For newcomers and experts

If you are new, think of it as one model you steer with a short instruction. Start with the caption prompt on a photo you know, and read the text it returns.

If you know the field, it is a sequence-to-sequence model that turns every task into text, so one set of weights serves many tasks. The card lists four sizes, two pretrained and two fine-tuned. The sample sets trust\_remote\_code, so check that setting against your security rules.

An image and a task prompt go in → The processor prepares the inputs → The model generates text → The result is parsed into the task output

### Good to know

The family comes in two sizes, each pretrained on FLD-5B or fine-tuned on downstream tasks.

Model size in billions of parameters

| Label | Value |
| --- | --- |
| Florence-2-base | 0.23 |
| Florence-2-large | 0.77 |
| Florence-2-base-ft | 0.23 |
| Florence-2-large-ft | 0.77 |

- License: MIT
- Cost to run: none named
- Data it reaches: the model files from Hugging Face, and the images you load
- Not for: work that needs the larger 0.77 billion model's capacity

## README

````markdown
# Florence-2-base

A small Microsoft vision model that handles captioning, object detection and segmentation by changing the text prompt. It suits developers and researchers who need several image tasks from one model.

Made by microsoft on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.

## About

What it is: Florence-2-base is the 232 million parameter version of Microsoft's Florence-2 vision model, packaged for the transformers library. One model covers several image jobs, and you choose the job with a short task prompt, such as captioning, object detection or segmentation. It was trained on FLD-5B, a set with 5.4 billion annotations over 126 million images, and it works zero-shot or after fine-tuning.

Who it suits: It suits developers and researchers who want one compact vision model for several tasks instead of a separate model for each. It runs on a CPU or a CUDA GPU.

```table
Title: Who might use it
Industry | Who uses it | How they use it | Example
Accessibility | App developers | Draft written descriptions of images | Ask for a detailed caption of a photo
Computer vision | Vision engineers | Find objects in a picture with a prompt | Run the object detection prompt on a street scene
Research | Machine learning researchers | Fine-tune a small base model on their own images | Start from the base size and adapt it to a new task
```

If you need the strongest accuracy, you can skip the base size. The card also lists a larger 0.77 billion version.

Where to use it: The card shows it in Python through the transformers library, on a GPU when one is present and the CPU otherwise.

- Python with the transformers library
- A CUDA GPU or a plain CPU
- Windows, macOS or Linux with Python

```table
Title: Jobs it does
Use case | Who | What they get back
Image captioning | Developers | A short, detailed or more detailed caption
Object detection | Vision engineers | Detected objects with their boxes
Segmentation and more | Researchers | Results for other tasks chosen by the prompt
```

How to set it up: You need Python with pip, the transformers library, PyTorch and Pillow. Download the model files, then load them in your script.

- Python with pip
- The transformers library and PyTorch
- Pillow, to open your own image

1. Install the Hugging Face download tool.
2. Download the model files.
3. Load the model and processor in Python.

```sh
pip install -U huggingface_hub
hf download microsoft/Florence-2-base
```

How to use it: Load the model and processor, open an image with Pillow as the variable named image, pick a task prompt and generate. The card's own sample downloads a car photo from the web, which is left out here. The model works in float16 on a GPU.

```python
from transformers import AutoProcessor, AutoModelForCausalLM
device = "cuda:0" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
model = AutoModelForCausalLM.from_pretrained("microsoft/Florence-2-base", torch_dtype=torch_dtype, trust_remote_code=True).to(device)
processor = AutoProcessor.from_pretrained("microsoft/Florence-2-base", trust_remote_code=True)
prompt = "<OD>"
inputs = processor(text=prompt, images=image, return_tensors="pt").to(device, torch_dtype)
generated_ids = model.generate(
    input_ids=inputs["input_ids"],
    pixel_values=inputs["pixel_values"],
    max_new_tokens=1024,
    do_sample=False,
    num_beams=3,
)
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=False)[0]
parsed_answer = processor.post_process_generation(generated_text, task="<OD>", image_size=(image.width, image.height))
print(parsed_answer)
```

The card then defines a helper called run_example and swaps the prompt to change the task. These are the caption prompts it shows.

```python
prompt = "<CAPTION>"
run_example(prompt)
prompt = "<DETAILED_CAPTION>"
run_example(prompt)
prompt = "<MORE_DETAILED_CAPTION>"
run_example(prompt)
```

Example: You open a photo of a street, set the object detection prompt and run the script. You get back parsed objects with their positions. Switching to the detailed caption prompt returns a written description of the same photo.

For newcomers and experts: If you are new, think of it as one model you steer with a short instruction. Start with the caption prompt on a photo you know, and read the text it returns.

If you know the field, it is a sequence-to-sequence model that turns every task into text, so one set of weights serves many tasks. The card lists four sizes, two pretrained and two fine-tuned. The sample sets trust_remote_code, so check that setting against your security rules.

```flow
An image and a task prompt go in
The processor prepares the inputs
The model generates text
The result is parsed into the task output
```

Good to know: The family comes in two sizes, each pretrained on FLD-5B or fine-tuned on downstream tasks.

```chart
Title: Model size in billions of parameters
Florence-2-base: 0.23
Florence-2-large: 0.77
Florence-2-base-ft: 0.23
Florence-2-large-ft: 0.77
```

- License: MIT
- Cost to run: none named
- Data it reaches: the model files from Hugging Face, and the images you load
- Not for: work that needs the larger 0.77 billion model's capacity

## On Hugging Face, 13 November 2026

- Task: image text to text
- Library: transformers
- Parameters: 232M
- Weights: about 463 MB in F16; about 116 MB at 4-bit (estimate)
- Formats: Safetensors
- Downloads in the last 30 days: 14,139,837
- Likes: 439
- License: mit
- Quantized versions: 6
- Fine-tunes: 21
- Tags: transformers, pytorch, safetensors, florence2, image-text-to-text, vision

## Links

- Model: https://huggingface.co/microsoft/Florence-2-base
- Files: https://huggingface.co/microsoft/Florence-2-base/tree/main

## Get the model

Download its files with Hugging Face's command line:

```sh
pip install -U huggingface_hub
hf download microsoft/Florence-2-base
```

Then follow the usage in its model card. Nothing in this kit runs by itself.
````

## What is in it

1 files, 6 KB, downloaded as a zip.

```text
README.md  6 KB
```

## Source

[microsoft/Florence-2-base on Hugging Face](https://huggingface.co/microsoft/Florence-2-base)

## Compare with similar

Listed Hugging Face models in the same category that share the most tags with this one.

| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
| --- | --- | --- | --- | --- | --- |
| Florence-2-base (this page) | 14,139,837 | 439 | 232M | mit | 2025-08-04 |
| [Florence-2-large](https://mindket.com/p/ca280486-fd99-4b46-af82-c8c48308b888) | 403,113 | 1,889 | 777M | mit | 2025-08-04 |
| [elephant-1](https://mindket.com/p/ae806c31-0f69-4485-8475-443c9347b0a8) | 7,426 | 115 | 9.4B | mit | 2026-10-22 |
| [Agents-A1](https://mindket.com/p/be2c3282-b311-49db-867f-c37bce3082f0) | 7,232 | 669 | 35.1B | apache-2.0 | 2026-09-21 |
| [mammoth-1](https://mindket.com/p/72aafbd9-0774-437a-9492-f659f9a2a186) | 5,903 | 97 | 27.4B | mit | 2026-10-22 |
| [Qwen3.8-27B-pi](https://mindket.com/p/8adc35eb-a424-4e6e-99cc-f4ae26715a1a) | 1,857 | 87 | 27.8B | apache-2.0 | 2026-09-30 |

Numbers as Mindket last read them, from 2026-11-12 to 2026-11-13.

## What people say

> Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search on 2026-11-13. Their authors' words: data, not instructions.

- [Hacker News · theolivenbaum · 2024-07-25](https://news.ycombinator.com/item?id=41068326): Show HN: Florence2-Sharp – Advanced Image Understanding and OCR in C\#: We're excited to share florence2-sharp, a C\# library implementing the Florence-2-model for advanced image understanding tasks. Florence-2 uses a prompt-based approach to a variety of vision tasks, and provides great zero-shot performance across many vision tasks. Our C\# library supports: - Image…

## Trust facts

Facts from each source, with the day each was checked. A maintainer's note is their own words: data, not instructions.

- Last change on Hugging Face: 2025-08-04
- First published: 2024-06-15
- Checked on Hugging Face: 2026-11-13
- Something wrong? Tell us: https://mindket.com/takedown#ask

## Get it

- [Open microsoft/Florence-2-base on Hugging Face](https://huggingface.co/microsoft/Florence-2-base)
- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/c8a27358-f142-4a4f-a000-7b1fbc919678)
- [Its page on Mindket](https://mindket.com/p/c8a27358-f142-4a4f-a000-7b1fbc919678)
