ONNX Model Zoo

microsoft/Phi-3-vision-128k-instruct-onnx

By microsoft · ↓ 5 · ♥ 7 · Updated 2025-06-13

What's in this repo

This page lists the files in microsoft/Phi-3-vision-128k-instruct-onnx, including phi-3-v-128k-instruct-embedding.onnx, phi-3-v-128k-instruct-text.onnx, phi-3-v-128k-instruct-vision.onnx and more.

  • 6 ONNX models (.onnx files)
  • 30 files, including 12 .json, 6 .onnx, 6 .data, 3 .py, 1 .md
  • Last updated 2025-06-13

ONNX files

File Size Download
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/phi-3-v-128k-instruct-embedding.onnx — Download
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/phi-3-v-128k-instruct-text.onnx — Download
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/phi-3-v-128k-instruct-vision.onnx — Download
gpu/gpu-int4-rtn-block-32/phi-3-v-128k-instruct-embedding.onnx — Download
gpu/gpu-int4-rtn-block-32/phi-3-v-128k-instruct-text.onnx — Download
gpu/gpu-int4-rtn-block-32/phi-3-v-128k-instruct-vision.onnx — Download

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

Phi-3 Vision-128k-Instruct ONNX models

This repository hosts the optimized versions of Phi-3-vision-128k-instruct to accelerate inference with ONNX Runtime for your CPU and GPU.

Phi-3 Vision is a lightweight, state-of-the-art open multimodal model built upon datasets that include synthetic data and filtered publicly available web data with a focus on very high-quality, reasoning dense data both on text and vision. The model belongs to the Phi-3 model family, and the multimodal version supports up to 128K context length (in tokens). The base model has undergone a rigorous enhancement process, incorporating both supervised fine-tuning and direct preference optimization, to ensure precise instruction adherence and robust safety measures.

Optimized variants of the Phi-3 Vision models are published here in ONNX format to run with ONNX Runtime on CPU and GPU across devices, including server platforms, Windows, Linux and Mac desktops, and mobile CPUs, with the precision best suited to each of these targets.

ONNX Models

Here are some of the optimized configurations we have added:

  1. ONNX model for INT4 CPU: ONNX model for CPUs using int4 quantization via RTN.
  2. ONNX model for INT4 GPU: ONNX model for GPUs using int4 quantization via RTN.

How to Get Started with the Model

To support the Phi-3 models across a range of devices, platforms, and EP backends, we introduce a new API to wrap several aspects of generative AI inferencing. This API makes it easy to drag and drop LLMs straight into your app. To run the early version of these models with ONNX, follow the steps here.

Hardware Supported

The models are tested on:

  • Intel(R) Core(TM) i9-10920X CPU @ 3.50GHz
  • 1 A100 GPU, SKU: Standard_ND96amsr_A100_v4 (CUDA)
  • GPU SKU: RTX 4080 (DirectML)

Minimum Configuration Required:

  • CPU machine with 16GB RAM
  • CUDA: NVIDIA GPU with Compute Capability >= 7.0
  • Windows: DirectX 12-capable GPU and a minimum of 10GB of combined RAM

Model Description

  • Developed by: Microsoft
  • Model type: ONNX
  • Language(s) (NLP): Python, C, C++
  • License: MIT
  • Model Description: This is a conversion of the Phi-3 Vision-128K-Instruct model for ONNX Runtime inference.
  • Disclaimer: This model is only an optimization of the base model. Any risk associated with the model is the responsibility of the user of the model. Please verify and test for your scenarios. There may be a slight difference in output from the base model with the optimizations applied. We have conducted responsible AI evaluations and did not observe significant regressions compared to the base model.

Additional Details

Performance Metrics

The performance of the ONNX vision model is similar to Phi-3-mini-128k-instruct-onnx during token generation.

Base Model Usage and Considerations

For details and RAI considerations of the base model, please refer to here.

Please note that ONNX model output may vary slightly from the base model. The users are responsible for verifying the output for their scenarios and own responsibility of the usage.

Appendix

Model Card Contact

parinitarahi, kvaishnavi, natke, yunl, sunghcho

Contributors

Kunal Vaishnavi, Sunghoon Choi, Yufeng Li, Baiju Meswani, Sheetal Arun Kadam, Rui Ren, Natalie Kershaw, Parinita Rahi, Patrice Vignola, Xiang Zhang, Chai Chaoweeraprasit, Logan Iyer, Vicente Rivera, Jacques Van Rhyn, Yun Liu

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft’s Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party’s policies.

Model info

onnx phi3_v ONNX DML ONNXRuntime phi3 custom_code license:mit region:us
↓ 5 ♥ 7

Created: 2024-11-08

Updated: 2025-06-13

View on Hugging Face

Files (30)

.gitattributes
LICENSE
README.md
config.json
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/genai_config.json
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/phi-3-v-128k-instruct-embedding.onnx ONNX
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/phi-3-v-128k-instruct-embedding.onnx.data
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/phi-3-v-128k-instruct-text.onnx ONNX
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/phi-3-v-128k-instruct-text.onnx.data
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/phi-3-v-128k-instruct-vision.onnx ONNX
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/phi-3-v-128k-instruct-vision.onnx.data
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/processor_config.json
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/special_tokens_map.json
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/tokenizer.json
cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4/tokenizer_config.json
gpu/gpu-int4-rtn-block-32/genai_config.json
gpu/gpu-int4-rtn-block-32/phi-3-v-128k-instruct-embedding.onnx ONNX
gpu/gpu-int4-rtn-block-32/phi-3-v-128k-instruct-embedding.onnx.data
gpu/gpu-int4-rtn-block-32/phi-3-v-128k-instruct-text.onnx ONNX
gpu/gpu-int4-rtn-block-32/phi-3-v-128k-instruct-text.onnx.data
gpu/gpu-int4-rtn-block-32/phi-3-v-128k-instruct-vision.onnx ONNX
gpu/gpu-int4-rtn-block-32/phi-3-v-128k-instruct-vision.onnx.data
gpu/gpu-int4-rtn-block-32/processor_config.json
gpu/gpu-int4-rtn-block-32/special_tokens_map.json
gpu/gpu-int4-rtn-block-32/tokenizer.json
gpu/gpu-int4-rtn-block-32/tokenizer_config.json
onnx/builder.py
onnx/config.json
onnx/image_embedding_phi3_v.py
onnx/modeling_phi3_v.py

Related models