microsoft / microsoft/onnxruntime

[Feature Request] Support for Florence-2 model family

Open
#21,118 6 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request model:transformer
Dominant language
C++
Stars
21.9k
Forks
4.2k
Avg merge
4d 11h
Merged PRs (30d)
184

Description

### Describe the feature request

As per https://huggingface.co/microsoft/Florence-2-large-ft/discussions/7, it seems like the model type is not yet supported by the converter:

> Can we get an Onnx version of this model for use on Windows .NET using the onnxruntime?
>
> I tried to convert it but it failed.
> optimum-cli export onnx --trust-remote-code --model microsoft/Florence-2-large-ft ./models/Florence-2-large-ft_onnx/
>
> ValueError: Unrecognized configuration class for this kind of AutoModel: AutoModelForVision2Seq.
> Model type should be one of BlipConfig, Blip2Config, GitConfig, Idefics2Config, InstructBlipConfig, Kosmos2Config, LlavaConfig, LlavaNextConfig, PaliGemmaConfig, Pix2StructConfig, VideoLlavaConfig, VipLlavaConfig, VisionEncoderDecoderConfig.

### Describe scenario use case

New Florence-2 model family should be supported by onnxruntime

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the shown optimum-cli export onnx command for microsoft/Florence-2-large-ft and inspect how the converter handles AutoModelForVision2Seq configurations. Done means the Florence-2 model family is recognized and can be exported to ONNX for ONNX Runtime use.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.