{
 "kind": "model",
 "slug": "microsoft-florence-2-base",
 "path": "models/open/microsoft-florence-2-base/",
 "name": "Florence-2-base",
 "maker": "Microsoft",
 "density": "full",
 "crumbs": [
  [
   "Models",
   "models/"
  ],
  [
   "Open models",
   "models/open/"
  ]
 ],
 "lead": "Captions, text and objects from images.",
 "chips": [
  {
   "label": "Vision and documents",
   "path": "models/open/?task=vision"
  },
  {
   "label": "Commercial use"
  },
  {
   "label": "Runs on 16 GB"
  }
 ],
 "primary": {
  "label": "Copy model id",
  "copy": "microsoft/Florence-2-base"
 },
 "links": [
  {
   "label": "Hugging Face",
   "href": "https://huggingface.co/microsoft/Florence-2-base"
  },
  {
   "label": "Demos",
   "href": "https://huggingface.co/spaces?search=Florence-2-base"
  }
 ],
 "track": "New versions, price and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "Commercial use",
   "value": "Allowed",
   "status": "yes",
   "sub": "MIT",
   "quote": "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software",
   "note": "MIT allows use and sale; keep the notice with copies.",
   "src": "https://huggingface.co/microsoft/Florence-2-base/raw/main/LICENSE"
  },
  {
   "key": "local",
   "label": "On your machine",
   "status": "yes",
   "value": "16 GB of memory",
   "sub": "0.2B parameters, ~0.1 GB at 4-bit",
   "note": "Our estimate: about 0.6 GB per billion parameters at 4-bit, with room for the context.",
   "src": "https://huggingface.co/microsoft/Florence-2-base"
  },
  {
   "key": "api",
   "label": "Through an API",
   "status": "info",
   "value": "Not served yet",
   "sub": "Run it yourself",
   "note": "No Hugging Face Inference Provider serves it today.",
   "src": "https://huggingface.co/microsoft/Florence-2-base"
  },
  {
   "key": "rising",
   "label": "Momentum",
   "status": "info",
   "value": "445 likes",
   "sub": "Hugging Face trending score 2",
   "note": "Likes and the trending score are Hugging Face's own figures; attention, not quality.",
   "src": "https://huggingface.co/microsoft/Florence-2-base"
  }
 ],
 "vfoot": "Checked against its official pages on Nov 23, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Florence-2-base does",
   "parts": [
    {
     "t": "prose",
     "text": "Florence-2-base is an open vision model by Microsoft that describes images, reads the text in them and finds objects, each picked with a short task word. It is small, with 0.23 billion parameters. The model is on Hugging Face, free to use in paid products under the MIT license."
    },
    {
     "t": "h3",
     "text": "What people use it for"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "Describe photos and write alt text",
       "text": "Get a short, detailed or very detailed description of an image, for alt text, product photos or a searchable library.",
       "idea": false
      },
      {
       "title": "Read text in images",
       "text": "Pull printed text out of screenshots, signs or scanned pages, with or without the position of each line.",
       "idea": false
      },
      {
       "title": "Find objects and their boxes",
       "text": "Get a list of the things in a photo with a box around each, to count items or crop them.",
       "idea": false
      },
      {
       "title": "Find the thing a sentence describes",
       "text": "Give a sentence such as \"a green car\" and get boxes around the matching parts of the image.",
       "idea": false
      },
      {
       "title": "Label every region of an image",
       "text": "Get short descriptions for many regions at once, to tag images or build a training set.",
       "idea": false
      },
      {
       "title": "Sort receipts and screenshots",
       "text": "Read the text from receipts or screenshots and file them by what they say.",
       "idea": true
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Florence-2-base popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "445",
       "l": "likes on Hugging Face"
      },
      {
       "n": "23.8M",
       "l": "downloads, last 30 days"
      },
      {
       "n": "2",
       "l": "Hugging Face trending score"
      }
     ]
    },
    {
     "t": "small",
     "text": "As reported by Hugging Face, checked Nov 26, 2026. Downloads include automated ones; some repositories report none."
    }
   ]
  },
  {
   "id": "run",
   "nav": "Run it",
   "h2": "Where to run Florence-2-base",
   "parts": [
    {
     "t": "h3",
     "text": "On your machine"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "Parameters",
       "v": "0.2B"
      },
      {
       "l": "Memory at 4-bit",
       "v": "about 0.1 GB",
       "sub": "Our estimate: 0.6 GB per billion parameters, with room for the context."
      }
     ]
    }
   ]
  },
  {
   "id": "license",
   "nav": "License",
   "h2": "Florence-2-base license",
   "parts": [
    {
     "t": "prose",
     "text": "MIT license: free to use, change and share, also in paid products. Keep the copyright and license notice with copies you share."
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In a paid product",
       "v": "Yes",
       "status": "yes",
       "sub": "MIT allows use and sale; keep the notice with copies.",
       "quote": "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software",
       "src": "https://huggingface.co/microsoft/Florence-2-base/raw/main/LICENSE"
      },
      {
       "l": "Ship the weights to users",
       "v": "With conditions",
       "status": "cond",
       "sub": "You may share the model files; include the MIT copyright and permission notice.",
       "quote": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.",
       "src": "https://huggingface.co/microsoft/Florence-2-base/raw/main/LICENSE"
      },
      {
       "l": "Work for clients",
       "v": "Yes",
       "status": "yes",
       "sub": "MIT lets you use it in work you sell to clients.",
       "quote": "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software",
       "src": "https://huggingface.co/microsoft/Florence-2-base/raw/main/LICENSE"
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Florence-2-base",
       "me": true,
       "facts": [
        "445 likes",
        "MIT"
       ]
      },
      {
       "name": "Unlimited-OCR",
       "path": "models/open/baidu-unlimited-ocr/",
       "why": "baidu · image-text-to-text",
       "facts": [
        "5,055 likes",
        "MIT"
       ]
      },
      {
       "name": "GLM-OCR",
       "path": "models/open/zai-org-glm-ocr/",
       "why": "zai-org · image-to-text",
       "facts": [
        "2,246 likes",
        "MIT"
       ]
      },
      {
       "name": "Qwen2.5-VL-7B-Instruct",
       "path": "models/open/qwen-qwen2-5-vl-7b-instruct/",
       "why": "Qwen · image-text-to-text",
       "facts": [
        "1,781 likes",
        "Apache 2.0"
       ]
      },
      {
       "name": "RMBG-2.0",
       "path": "models/open/briaai-rmbg-2-0/",
       "why": "briaai · image-segmentation",
       "facts": [
        "1,678 likes",
        "Custom license"
       ]
      }
     ],
     "more": "All vision and documents models",
     "more_path": "models/open/?task=vision"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "In a Python virtual environment with torch, transformers and pillow, write a script that loads microsoft/Florence-2-base with AutoModelForCausalLM and AutoProcessor (trust_remote_code=True, float16 on CUDA, float32 on CPU, and import torch), runs the <OCR> task on image.png and prints the result of processor.post_process_generation."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Load the model and processor; both need trust_remote_code=True, and the model downloads on first use.",
       "code": "model = AutoModelForCausalLM.from_pretrained(\"microsoft/Florence-2-base\", torch_dtype=torch_dtype, trust_remote_code=True).to(device)\nprocessor = AutoProcessor.from_pretrained(\"microsoft/Florence-2-base\", trust_remote_code=True)\n",
       "src": "https://huggingface.co/microsoft/Florence-2-base/raw/main/README.md"
      },
      {
       "text": "Pick a task word, run it on an image and turn the output into labels and boxes.",
       "code": "inputs = processor(text=prompt, images=image, return_tensors=\"pt\").to(device, torch_dtype)\ngenerated_ids = model.generate(\n    input_ids=inputs[\"input_ids\"],\n    pixel_values=inputs[\"pixel_values\"],\n    max_new_tokens=1024,\n    do_sample=False,\n    num_beams=3,\n)\ngenerated_text = processor.batch_decode(generated_ids, skip_special_tokens=False)[0]\nparsed_answer = processor.post_process_generation(generated_text, task=\"<OD>\", image_size=(image.width, image.height))\n",
       "src": "https://huggingface.co/microsoft/Florence-2-base/raw/main/README.md"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "Running the model card's snippet exactly as written",
       "fix": "Add import torch at the top",
       "why": "The snippet uses torch.cuda and torch.float16 but its imports do not include torch."
      },
      {
       "dont": "Loading it with AutoModelForCausalLM.from_pretrained(\"microsoft/Florence-2-base\") and no other options",
       "fix": "Pass trust_remote_code=True to both the model and the processor",
       "why": "The model's code ships inside the Hugging Face repository, not in the transformers library."
      },
      {
       "dont": "Reading boxes out of the raw generated text",
       "fix": "Call processor.post_process_generation with the same task word and the image size",
       "why": "That call turns the output into a dict with pixel boxes and labels."
      },
      {
       "dont": "Sending <CAPTION_TO_PHRASE_GROUNDING> without a sentence",
       "fix": "Pass the sentence as text_input, for example \"A green car parked in front of a yellow building.\"",
       "why": "This task needs the caption as extra input."
      },
      {
       "dont": "Typing a free question like \"What brand is this car?\" as the prompt",
       "fix": "Use one of the listed task words, or a fine-tuned or chat model for questions",
       "why": "The model switches tasks by task prompts; the base model is pretrained, not tuned for question answering."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Can I use Florence-2-base in a paid product?",
       "a": "Yes. It is MIT-licensed; keep the license notice with copies.",
       "evidence": {
        "url": "https://huggingface.co/microsoft/Florence-2-base/raw/main/LICENSE",
        "quote": "to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software"
       }
      },
      {
       "q": "Which tasks can it do?",
       "a": "Captions at three detail levels, object detection, finding a described thing, region captions and proposals, and reading text with or without its position.",
       "evidence": {
        "url": "https://huggingface.co/microsoft/Florence-2-base/raw/main/README.md",
        "quote": "Here are the tasks Florence-2 could perform"
       }
      },
      {
       "q": "What is the difference between base and base-ft?",
       "a": "Both have 0.23 billion parameters; base is only pretrained, while base-ft is further tuned on a set of common tasks.",
       "evidence": {
        "url": "https://huggingface.co/microsoft/Florence-2-base/raw/main/README.md",
        "quote": "Florence-2-base-ft[[HF]](https://huggingface.co/microsoft/Florence-2-base-ft) | 0.23B  | Finetuned model on a colletion of downstream tasks"
       }
      },
      {
       "q": "How big is it?",
       "a": "0.23 billion parameters; the larger Florence-2-large has 0.77 billion.",
       "evidence": {
        "url": "https://huggingface.co/microsoft/Florence-2-base/raw/main/README.md",
        "quote": "Florence-2-large[[HF]](https://huggingface.co/microsoft/Florence-2-large) | 0.77B"
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Maker",
   "Microsoft"
  ],
  [
   "Task",
   "Vision and documents"
  ],
  [
   "Pipeline",
   "image-text-to-text"
  ],
  [
   "On Hugging Face since",
   "Jun 15, 2024"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Parameters",
   "0.2B"
  ],
  [
   "Hugging Face",
   "microsoft/Florence-2-base"
  ]
 ],
 "good": [
  "It does fixed tasks picked by a task word such as <CAPTION> or <OCR>; it is not a chat model you can ask open questions.",
  "Loading it runs code files stored with the model, which you must allow with trust_remote_code=True.",
  "This base model is not fine-tuned for any one task; the -ft versions are, and a larger 0.77 billion version exists."
 ],
 "checked_line": "Hand-checked from 5 official pages on Nov 23, 2026; numbers refresh daily.",
 "logo": null
}