ModelsReviewed · Microsoft

Florence-2-large (Microsoft, Hugging Face model card)

Florence-2-large is a 0.77-billion-parameter Microsoft vision-language model that turns an image plus a short task prompt into captions, object boxes, grounded phrases or OCR text. It suits developers who want one compact model for several image tasks. However, the pinned revision is a lightly continued-pretrained checkpoint that its own card says 'might not be trained well'. The card's examples set trust_remote_code=True for both the model and processor. The card gives Hugging Face Transformers code, a list of prompt tokens such as <OD>, <OCR> and <CAPTION>, author-reported benchmark tables, and an MIT licence declaration. It is aimed at Python users with PyTorch, and the evidence does not state memory needs, speed or price.

Researched 12 Nov 2026

In short.

Florence-2-large is a 0.77-billion-parameter Microsoft vision-language model for developers who want one compact model to caption images, detect objects, ground phrases and read text. However, this pinned revision is a lightly continued-pretrained checkpoint that its own card warns 'might not be trained well'. The card's examples set trust_remote_code=True for both the model and processor. You pick the task by putting a prompt token such as <OD>, <CAPTION> or <OCR> in front of the model, which then generates text that a helper function turns into labels and coordinates. The card declares an MIT licence and gives Transformers code and author-reported benchmarks. It does not state memory requirements, speed, price, safety limits or the licence text itself. Nothing here was run or tested, so every behaviour below is as described by the model card.

Researched and written by an AI model and checked by a second AI model. How it works

Coverage is the complete selected scope: the single model-card file (README.md) for microsoft/Florence-2-large at commit 21a599d414c4d928c9032694c424fb94458e3594. The card's licence declaration (MIT) is part of that file's metadata. The separate LICENSE file it links to, the sample notebook, the technical report on arXiv, the sibling model pages and the repository's code and weights were outside the selected scope and were not read. No code was executed, no model was downloaded, and no benchmark was reproduced, so every statement about behaviour, accuracy, cost and compatibility is taken from the model card or marked unknown. No file is offered for redistribution, because only the model card was retained, and the full licence text is not among the retained material.

The overview

What this resource is

The selected resource is the model card (README.md) for microsoft/Florence-2-large on Hugging Face, pinned to commit 21a599d414c4d928c9032694c424fb94458e3594. The card describes a Hub repository holding a HuggingFace transformers implementation of Microsoft's Florence-2 model. Its metadata gives the licence as mit, the pipeline tag as image-text-to-text and the tag as vision.

The card calls Florence-2 'an advanced vision foundation model that uses a prompt-based approach to handle a wide range of vision and vision-language tasks'. Florence-2-large has 0.77B parameters and is listed as 'Pretrained model with FLD-5B'. FLD-5B is the authors' training set, described as 5.4 billion annotations across 126 million images. The card links a technical report [https://arxiv.org/abs/2311.06242] and a sample notebook. Neither was captured, so their contents are not assessed here.

This particular revision has a note at the top of the model summary. It says this is a continued pretrained version of Florence-2-large with 4k context length, that only 0.1B samples were used for the continued pretraining, and that the OCR task now uses a line separator ('\n'). It also states COCO OD AP 39.8.

Overall assessment

On the evidence, this is a clearly documented, small multi-task image model with a permissive licence declaration. It is worth trying for prototypes that need captions, boxes or OCR from one checkpoint. The card gives copy-ready Transformers code, names each task prompt, shows structured output formats for detection, phrase grounding and region tasks, and reports benchmark numbers against named comparison models.

Several things stop this report from going further. The card itself warns that the continued pretraining was light. The card's examples set trust_remote_code=True for both the model and processor. With that setting, Python code from the model repository can run on load, and that repository code was not captured. The benchmark tables are reported by the authors and were not reproduced, and the card does not make clear whether they describe this continued-pretrained checkpoint or the original one. Nothing was executed for this report, so quality on any particular kind of image is unknown.

Who it is for

The model suits Python developers and researchers who want a single compact model for image captioning, object detection, phrase grounding and OCR, and who are comfortable with PyTorch and the Transformers library. Beginners can follow the card's snippets, but they need to install the dependencies themselves, because the card gives no install instructions.

It is a poor fit for anyone who needs open-ended chat about images or documented visual question answering with this checkpoint. The card shows VQA results only for the separate fine-tuned models (Florence-2-base-ft and Florence-2-large-ft), and it gives no VQA prompt for this one. It also does not suit people who need guaranteed accuracy, since no safety, bias or failure-rate information is given.

What it can do

The card lists these tasks, each chosen by a prompt token: <CAPTION>, <DETAILED_CAPTION> and <MORE_DETAILED_CAPTION> for captions of increasing detail; <CAPTION_TO_PHRASE_GROUNDING>, which needs extra caption text and returns boxes and labels for phrases in it; <OD> for object detection; <DENSE_REGION_CAPTION>; <REGION_PROPOSAL>; <OCR>; and <OCR_WITH_REGION>.

Output formats are given for the region tasks. Object detection, dense region caption, region proposal and phrase grounding return a dictionary with 'bboxes' (lists of [x1, y1, x2, y2]) and 'labels'. OCR with region returns 'quad_boxes' (eight coordinates per text region) and 'labels' holding the text. The card also shows a second helper that demonstrates object-detection confidence scoring by calculating transition scores, passing them to post_process_generation and printing the result.

The summary text also mentions segmentation, and the benchmark tables include a RefCOCO RES mIoU column (35.8 for Florence-2-large zero-shot). The card gives no segmentation code or prompt, so how to use that capability with this checkpoint is not documented in the captured material.

Using it

What you need to run it

The code imports requests, torch, PIL (Pillow) and transformers (AutoProcessor, AutoModelForCausalLM). No package versions or install commands are given, so the compatible Transformers and PyTorch versions are unknown. Both the model and the processor are loaded with trust_remote_code=True, which means Python code from the model repository runs on your machine. That repository code was not part of the captured material.

A GPU is optional on the card's own evidence: the code picks cuda:0 with float16 if CUDA is available, and otherwise falls back to CPU with float32. The card says all models are trained with float16. Disk size, RAM or VRAM needs and inference speed are not stated. The examples also download the model from Hugging Face and fetch a sample image over the internet.

How it works

The card describes a sequence-to-sequence model: an image and a text prompt go in, and the model generates text out. The task is chosen by the prompt token, for example '<OD>', and phrase grounding adds the caption text after the token. The processor combines the text and the image into input_ids and pixel_values, and model.generate produces token ids that batch_decode turns into text.

The card's examples keep special tokens during decoding (skip_special_tokens=False). The processor's post_process_generation method, given the task name and the image size, then converts the decoded text into a parsed result. For detection, phrase grounding and region tasks, that result takes the dictionary forms described above. The README does not explain which tokens the model generates. Beyond calling the architecture sequence-to-sequence, it gives no further architectural details. According to the card, the model uses the FLD-5B dataset 'to master multi-task learning' and is suited to both zero-shot and fine-tuned settings.

Setup steps shown in the card

The card's quick start has these steps. Choose the device and dtype (float16 on CUDA, float32 on CPU). Load the model with AutoModelForCausalLM.from_pretrained('microsoft/Florence-2-large', torch_dtype=..., trust_remote_code=True) and move it to the device. Load AutoProcessor with the same repository name and trust_remote_code=True. Open an image with PIL. Build the inputs with processor(text=prompt, images=image, return_tensors='pt'). Call model.generate with num_beams=3 and do_sample=False. Decode and post-process.

The quick start sets max_new_tokens=4096, while the reusable run_example helper in the Tasks section uses 1024. Because the card does not pin a Transformers version and the repository code was not captured, whether these steps work with a current Transformers release is not established here. A fuller notebook (sample_inference.ipynb) is linked but was not captured.

Worked example from the card

The card's quick start sends the prompt '<OD>' with a sample car photo from the Hugging Face documentation-images dataset. After post-processing, it prints a dictionary of the form {'<OD>': {'bboxes': [[x1, y1, x2, y2], ...], 'labels': ['label1', 'label2', ...]}}. The card does not print the actual output for that image, and this report did not run it, so what the model returns on the sample is unknown.

For phrase grounding, the card passes the task token plus a caption, text_input='A green car parked in front of a yellow building.', and expects boxes and labels for phrases in that caption. One detail to be aware of: the card writes 'results = run_example(...)', but the run_example helper as printed only prints the parsed answer and has no return statement. A reader who wants the dictionary in a variable would need to add 'return parsed_answer' themselves.

Assessment & evidence

Limitations and risks

The most important limit comes from the card: this version is continued-pretrained with 4k context length on only 0.1B samples, 'thus it might not be trained well'. The card does not say how it compares with the earlier Florence-2-large checkpoint beyond the COCO OD AP of 39.8 in the note. That figure sits next to a zero-shot COCO detection mAP of 37.5 in the benchmark table, and the card does not explain which checkpoint each number describes.

Using trust_remote_code=True executes code from the repository when the model loads. That code was not inspected for this report. The card has no sections on intended use, out-of-scope use, bias, safety, privacy or failure cases, so those risks are not assessed. Accuracy on OCR, small objects, crowded scenes, non-English text or domain-specific images is unknown. The fine-tuned benchmark tables describe the -ft models, not this checkpoint, so they should not be read as this model's results.

The card also gives no hardware guidance. It does not say whether CPU inference is practical at the generation lengths it uses.

Why this assessment

The assessment rests on one document, the model card at this commit. It is substantive: it names the model size, the training data scale, the task prompts, output formats and runnable code, and it contains author-reported numbers against named baselines. That is enough to describe what the model is meant to do and how it is meant to be called.

It is not enough to say how well the model works in practice, how it behaves on your data, or whether the repository code is safe and current. Claims about quality are therefore limited to what the authors report. The card's own caution about light continued pretraining is the main reason for advising a trial on your own images before any commitment.

Alternatives named in the card

The card lists three sibling models: Florence-2-base (0.23B, pretrained), Florence-2-base-ft (0.23B, fine-tuned on downstream tasks) and Florence-2-large-ft (0.77B, fine-tuned). Its tables show the fine-tuned versions scoring higher on several tasks. For example, Florence-2-large-ft is listed at 43.4 COCO detection mAP, and it has VQA results (VQAv2 test-dev 81.7). The base model is much smaller, which may matter if memory is tight, but the card gives no speed or memory comparison.

The tables also name other systems: Kosmos-2 on grounding, Flamingo (80B) on captioning, and specialist detectors and grounding models such as UNINEXT and Ferret. Those comparisons are the authors' own and mix zero-shot and fine-tuned settings, so they are not a like-for-like buying guide. A specialist detector or a dedicated OCR engine may suit a single narrow task. This report does not compare them, since no evidence on them was captured.

Evidence base and its quality

The only evidence is the model card (README.md) for microsoft/Florence-2-large at commit 21a599d414c4d928c9032694c424fb94458e3594, from its original address [https://huggingface.co/microsoft/Florence-2-large/raw/21a599d414c4d928c9032694c424fb94458e3594/README.md]. It covers the whole of the selected model card. It supports the model's purpose, size, task list, code, benchmark claims and licence declaration.

It does not support any claim about real behaviour, because nothing was executed. Benchmark numbers are the authors' own and were not independently reproduced. Some tables are dense and one value looks out of line with its neighbours (for example, Florence-2-base-ft RefCOCOg test at 82.2 against 89.8 on val). Whether that is a typo cannot be told from the card. The linked notebook, technical report, LICENSE file, repository code and weights were not captured.

Access & freshness

Costs

The card states no price, usage fee or hosted API charge. It does not say how large the downloaded files are. The licence declaration is MIT (see rights), but the card does not discuss download or hosting terms beyond that. The model has 0.77B parameters, and the card says it is trained in float16. At about two bytes per parameter that would put the weights on the order of 1.5 GB, but this is back-of-envelope arithmetic, and the real file size and memory use are not stated.

Compute cost, whether GPU or CPU, is unknown. No latency, throughput or memory figures appear in the captured material. Total cost of running it depends on your hardware, image volume and the long generation settings the card uses (max_new_tokens of 1024 or 4096 with 3 beams).

Licence and usage rights

The card's metadata declares 'license: mit' and gives a licence link [https://huggingface.co/microsoft/Florence-2-large/resolve/main/LICENSE]. That linked file was outside the selected scope and was not captured. The licence wording, the copyright notice and any additional terms were therefore not reviewed. The MIT licence is generally permissive about use, copying and modification, and it requires keeping the copyright and permission notice. Confirm the exact text before relying on it for commercial or redistributed use.

The card does not say what licence or usage terms apply to the FLD-5B training data or to the sample image URL, and it does not state any restrictions on how model outputs may be used. The link points at the main branch rather than this exact commit, so the licence text could in principle differ from what was in place at this revision. That is unknown. The README itself was captured as a single file; no weights or code files were captured.

Freshness and versioning

The captured page is the README at commit 21a599d414c4d928c9032694c424fb94458e3594, captured on 2026-11-12. The card gives no release date, version number or changelog for this revision. The only dated reference is the citation of the technical report with year 2023. The note about 4k context, 0.1B continued-pretraining samples and the OCR line-separator change shows this revision differs from an earlier checkpoint, but when the change was made is not stated.

Nothing in the captured text says the model is deprecated or replaced. The card does not mention any successor or any maintenance policy, so it is unknown whether newer revisions or models exist.

Suggested next steps

Before adopting it, read the actual LICENSE file and the repository's Python files that trust_remote_code=True will run, and pin the revision you test so results stay repeatable. Run the card's <OD>, <CAPTION> and <OCR> snippets on a small sample of your own images, and record memory use, speed and the quality of the results on your hardware. Decide there whether it is good enough.

If memory is tight, compare Florence-2-base. If you need VQA or stronger benchmark numbers, compare Florence-2-large-ft. If you rely on the phrase-grounding example, add a return statement to the helper function. Treat the card's benchmark tables as the authors' claims until you have checked them against your own task.

Evidence for this report

selected-page.txtselected · checked 2026-11-12