ONNX Model Zoo

controlllmai/Florence-2-base-ft

By controlllmai · ↓ 9 · ♥ 0 · Updated 2026-03-15

What's in this repo

This page lists the files in controlllmai/Florence-2-base-ft, including decoder_model.onnx, decoder_model_bnb4.onnx, decoder_model_fp16.onnx and more.

  • 48 ONNX models (.onnx files)
  • 59 files, including 48 .onnx, 8 .json, 1 .md, 1 .txt
  • Last updated 2026-03-15

ONNX files

File Size Download
onnx/decoder_model.onnx — Download
onnx/decoder_model_bnb4.onnx — Download
onnx/decoder_model_fp16.onnx — Download
onnx/decoder_model_int8.onnx — Download
onnx/decoder_model_merged.onnx — Download
onnx/decoder_model_merged_bnb4.onnx — Download
onnx/decoder_model_merged_fp16.onnx — Download
onnx/decoder_model_merged_int8.onnx — Download
onnx/decoder_model_merged_q4.onnx — Download
onnx/decoder_model_merged_q4f16.onnx — Download

Showing 10 of 48 .onnx files — see the full file list on the right.

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

https://huggingface.co/microsoft/Florence-2-base-ft with ONNX weights to be compatible with Transformers.js.

Usage (Transformers.js)

If you haven't already, you can install the Transformers.js JavaScript library from NPM using:

npm i @huggingface/transformers

Example: Perform image captioning with onnx-community/Florence-2-base-ft.

import {
    Florence2ForConditionalGeneration,
    AutoProcessor,
    load_image,
} from '@huggingface/transformers';

// Load model, processor, and tokenizer
const model_id = 'onnx-community/Florence-2-base-ft';
const model = await Florence2ForConditionalGeneration.from_pretrained(model_id, { dtype: 'fp32' });
const processor = await AutoProcessor.from_pretrained(model_id);

// Load image and prepare vision inputs
const url = 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/car.jpg';
const image = await load_image(url);

// Specify task and prepare text inputs
const task = '<MORE_DETAILED_CAPTION>';
const prompts = processor.construct_prompts(task);

// Pre-process the image and text inputs
const inputs = await processor(image, prompts);

// Generate text
const generated_ids = await model.generate({
    ...inputs,
    max_new_tokens: 100,
});

// Decode generated text
const generated_text = processor.batch_decode(generated_ids, { skip_special_tokens: false })[0];

// Post-process the generated text
const result = processor.post_process_generation(generated_text, task, image.size);
console.log(result);
// { '<MORE_DETAILED_CAPTION>': 'A green car is parked in front of a tan building. There is a brown door on the building behind the car. There are two windows on the front of the building. ' }

We also released an online demo, which you can try yourself: https://huggingface.co/spaces/Xenova/florence2-webgpu


Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using 🤗 Optimum and structuring your repo like this one (with ONNX weights located in a subfolder named onnx).

Model info

image-text-to-text transformers.js
transformers.js onnx florence2 image-text-to-text vision text-generation text2text-generation image-to-text base_model:microsoft/Florence-2-base-ft base_model:quantized:microsoft/Florence-2-base-ft license:mit region:us
↓ 9 ♥ 0

Created: 2026-03-15

Updated: 2026-03-15

View on Hugging Face

Files (59)

.gitattributes
README.md
added_tokens.json
config.json
generation_config.json
merges.txt
onnx/decoder_model.onnx ONNX
onnx/decoder_model_bnb4.onnx ONNX
onnx/decoder_model_fp16.onnx ONNX
onnx/decoder_model_int8.onnx ONNX
onnx/decoder_model_merged.onnx ONNX
onnx/decoder_model_merged_bnb4.onnx ONNX
onnx/decoder_model_merged_fp16.onnx ONNX
onnx/decoder_model_merged_int8.onnx ONNX
onnx/decoder_model_merged_q4.onnx ONNX
onnx/decoder_model_merged_q4f16.onnx ONNX
onnx/decoder_model_merged_uint8.onnx ONNX
onnx/decoder_model_q4.onnx ONNX
onnx/decoder_model_q4f16.onnx ONNX
onnx/decoder_model_quantized.onnx ONNX
onnx/decoder_model_uint8.onnx ONNX
onnx/decoder_with_past_model.onnx ONNX
onnx/decoder_with_past_model_bnb4.onnx ONNX
onnx/decoder_with_past_model_fp16.onnx ONNX
onnx/decoder_with_past_model_int8.onnx ONNX
onnx/decoder_with_past_model_q4.onnx ONNX
onnx/decoder_with_past_model_q4f16.onnx ONNX
onnx/decoder_with_past_model_quantized.onnx ONNX
onnx/decoder_with_past_model_uint8.onnx ONNX
onnx/embed_tokens.onnx ONNX
onnx/embed_tokens_bnb4.onnx ONNX
onnx/embed_tokens_fp16.onnx ONNX
onnx/embed_tokens_int8.onnx ONNX
onnx/embed_tokens_q4.onnx ONNX
onnx/embed_tokens_q4f16.onnx ONNX
onnx/embed_tokens_quantized.onnx ONNX
onnx/embed_tokens_uint8.onnx ONNX
onnx/encoder_model.onnx ONNX
onnx/encoder_model_bnb4.onnx ONNX
onnx/encoder_model_fp16.onnx ONNX
onnx/encoder_model_int8.onnx ONNX
onnx/encoder_model_q4.onnx ONNX
onnx/encoder_model_q4f16.onnx ONNX
onnx/encoder_model_quantized.onnx ONNX
onnx/encoder_model_uint8.onnx ONNX
onnx/vision_encoder.onnx ONNX
onnx/vision_encoder_bnb4.onnx ONNX
onnx/vision_encoder_fp16.onnx ONNX
onnx/vision_encoder_int8.onnx ONNX
onnx/vision_encoder_q4.onnx ONNX
onnx/vision_encoder_q4f16.onnx ONNX
onnx/vision_encoder_quantized.onnx ONNX
onnx/vision_encoder_uint8.onnx ONNX
preprocessor_config.json
special_tokens_map.json
tokenizer.json
tokenizer_config.json
vocab.json

Related models