optimum icon indicating copy to clipboard operation
optimum copied to clipboard

Support for exporting apple/FastVLM-0.5B to ONNX

Open ccLemonTree opened this issue 1 year ago • 0 comments

System Info

x86 CPU
ubuntu22.04
python3.13
pip install "optimum-onnx[onnxruntime]"

Who can help?

Hello,

I'm trying to export the FastVLM-0.5B model (a vision-language model based on llava_qwen2) to ONNX format using the optimum-cli, but I'm encountering an error: ValueError: Unrecognized configuration classes ('AutoModelForVision2Seq', 'AutoModel') do not match with the model type llava_qwen2 and task image-to-text.

Information

  • [ ] The official example scripts
  • [ ] My own modified scripts

Tasks

  • [ ] An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • [ ] My own task or dataset (give details below)

Reproduction (minimal, reproducible, runnable)

optimum-cli export onnx
--model apple/FastVLM-0.5B
--task image-text-to-text
--trust-remote-code
--output ./onnx_fastvlm

Expected behavior

I expect the optimum-cli export onnx command to successfully export the FastVLM-0.5B model (with model_type: llava_qwen2) to ONNX format, as it is a valid image-to-text model that loads and runs correctly using AutoModelForVision2Seq with trust_remote_code=True. Optimum should recognize and support ONNX export for this vision-language architecture.

ccLemonTree avatar Oct 24 '25 12:10 ccLemonTree