# Florence-2 (slim)

> Florence-2 is Microsoft's family of small vision foundation models, 0.23B and 0.77B parameters, that take a task prompt such as <OD> and return captions, object boxes, grounded phrases, regions, OCR text or segmentation, under the MIT licence.

- Full: https://www.anchorterminal.com/tools/florence-2.md (~6,800 tokens) · this version ~1,630 tokens · JSON https://www.anchorterminal.com/tools/florence-2.json · canonical https://www.anchorterminal.com/tools/florence-2
- Index: https://www.anchorterminal.com/llms.txt · API: https://www.anchorterminal.com/api/v1/index.json · MCP: https://www.anchorterminal.com/mcp · Updated: 2026-12-01 · pricing https://www.anchorterminal.com/tools/florence-2#pricing · reviews https://www.anchorterminal.com/tools/florence-2#reviews
- Licence: CC BY 4.0, credit Anchor Terminal and link this page (https://www.anchorterminal.com/terms/#data)

**D · 48.5/100 · rank #165 of 184 open-weight models · #16 in Computer vision models, APIs & labelling · not agent-ready · confidence medium**


Assessment: Florence-2 turns one task token into captions, boxes, grounded phrases, OCR with regions or segmentation from 0.23B or 0.77B parameters under MIT, and Transformers and vLLM run it. Microsoft's own repository needs trust_remote_code and ships a pickle file, and its files last changed on 4 August 2025.

## Facts

- Kind: Open-weight model · vendor: Microsoft · category: Computer vision models, APIs & labelling · legal entity: Microsoft · provenance 72/100
- Packages: huggingface `microsoft/Florence-2-large`, huggingface `microsoft/Florence-2-base`, huggingface `microsoft/Florence-2-large-ft`, huggingface `microsoft/Florence-2-base-ft`
- Auth: None · pricing: Free · x402: no · licence: MIT
- Benchmark probes: not run yet, so Performance is pending
- Surface graded: The open weights at huggingface.co/microsoft/Florence-2-large (the large pretrained model), read from the card, the Hub's model information and search listing, the technical report's abstract, Transformers' Florence-2 documentation and vLLM's supported-models table on 1 December 2026. The base, base-ft and large-ft repositories sit beside it. The Hub's discussion list was read before the Hugging Face host limit of 15 reads was reached. Nothing was downloaded or run
- Model: A sequence-to-sequence vision model with a text prompt as the task instruction. Tasks on the card are caption, detailed caption, more detailed caption, caption to phrase grounding, object detection, dense region caption, region proposal, OCR and OCR with region. Parameters 0.23B (base) and 0.77B (large), trained in float16 per the card
- Variants: Florence-2-base and -large are pretrained on FLD-5B. The -ft versions are fine-tuned on a collection of downstream tasks. All four were created on the Hub on 15 June 2024
- Files: model.safetensors and pytorch_model.bin side by side, the tokeniser files, and modeling_florence2.py, configuration_florence2.py and processing_florence2.py, which the card's example loads with trust_remote_code=True. The repository also holds a LICENSE and a SECURITY.md
- Licence: MIT, from the Hub's metadata and the repository's LICENSE file
- Runtimes: Transformers has Florence2ForConditionalGeneration natively since 20 August 2025, loading the florence-community checkpoints. Microsoft's own repository still loads through custom code. vLLM's supported-models table lists Florence2ForConditionalGeneration through a plugin repository, bart-plugin. llama.cpp's architecture list has no Florence-2
- Context: The card's summary line says the large repository is a continued pretrained version with 4k context length, trained on 0.1B further samples, with OCR output updated to use a line separator. It gives the COCO detection AP of that version as 39.8
- Training data: FLD-5B, 5.4 billion annotations on 126 million images, built by Microsoft with automated annotation and model refinement per the card and the technical report. The dataset isn't linked from the card

- Scores: Capability pending, Reach 65, Risk 35, Agent interface 60, Documentation and upkeep 23
- Why:  · Reach, Memory 30 from the card's 0.77B parameters at float16. Runtimes 10, Transformers (native) and vLLM (plugin), 5 each. · Risk, File safety 5, since pytorch_model.bin sits beside the safetensors (15) and the card's load runs repository code with trust_remote_code (10… · Agent interface, Read for a vision model. · Documentation and upkeep, The card has three of seven items (8) and a short description of FLD-5B (5).
- Sources: 9, open questions: 5, both in the full twin
- Capabilities: vision.detect, vision.segment, vision.describe, model.open-weights
- JSON: https://www.anchorterminal.com/api/v1/tools/florence-2.json · card, about 200 tokens, for choosing between listings: https://www.anchorterminal.com/tools/florence-2.card.md
- Its vendor verifies the listing with `verify_listing` or `POST https://www.anchorterminal.com/api/v1/verify` (the full twin says how); no effect on the grade.
- Support: https://huggingface.co/microsoft/Florence-2-large; more in the full twin

## Before you call it

1. Load a florence-community checkpoint with Transformers' native class when you can (its docs use florence-community/Florence-2-base). Microsoft's repository needs trust_remote_code=True, which runs its Python files.
2. Send one task token per call, such as <OD> or <CAPTION>, and pass the output to processor.post_process_generation with the task and the image size.
3. Use float16 on a GPU and float32 on a CPU. The card says all models were trained in float16.
4. Pick -ft for the tasks it was fine-tuned on and the pretrained model for prompts it wasn't. The card describes both and compares them.
5. To find named things, use the caption to phrase grounding task with a caption. <OD> returns boxes with the labels the model learned.

## Connect

```bash
pip install -U transformers accelerate pillow requests
python -c "from transformers import AutoProcessor, AutoModelForCausalLM; m = AutoModelForCausalLM.from_pretrained('microsoft/Florence-2-large', trust_remote_code=True); print(m.config.model_type)"
```

## Similar tools

| Tool | Grade | Score | Shared capabilities | Slim |
| --- | --- | --- | --- | --- |
| Moondream | C | 54.7 | vision.detect, vision.segment, vision.describe, model.open-weights | https://www.anchorterminal.com/tools/moondream.min.md |
| PaliGemma | E | 44.8 | vision.detect, vision.segment, vision.describe, model.open-weights | https://www.anchorterminal.com/tools/paligemma.min.md |
| Roboflow | B | 67.7 | vision.detect, vision.segment, vision.describe | https://www.anchorterminal.com/tools/roboflow.min.md |
| RF-DETR | C | 59.3 | vision.detect, vision.segment, model.open-weights | https://www.anchorterminal.com/tools/rf-detr.min.md |
| Ultralytics YOLO | D | 52 | vision.detect, vision.segment, model.open-weights | https://www.anchorterminal.com/tools/ultralytics-yolo.min.md |


## Panel reviews (0, desk reviews from public material, no calls made)

