kvaishnavi
commited on
Commit
·
d6d12c0
1
Parent(s):
8a6e50e
Update README.md
Browse files
README.md
CHANGED
@@ -0,0 +1,87 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
tags:
|
4 |
+
- ONNX
|
5 |
+
- DML
|
6 |
+
- ONNXRuntime
|
7 |
+
- phi3
|
8 |
+
- custom_code
|
9 |
+
---
|
10 |
+
|
11 |
+
# Phi-3 Vision-128k-Instruct ONNX models
|
12 |
+
|
13 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
14 |
+
This repository hosts the optimized versions of [Phi-3-vision-128k-instruct](https://aka.ms/phi3-vision-128k-instruct) to accelerate inference with ONNX Runtime for your CPU and GPU.
|
15 |
+
|
16 |
+
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.
|
17 |
+
|
18 |
+
Optimized variants of the Phi-3 Vision models are published here in [ONNX](https://onnx.ai) format to run with [ONNX Runtime](https://onnxruntime.ai/) 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.
|
19 |
+
|
20 |
+
## ONNX Models
|
21 |
+
|
22 |
+
Here are some of the optimized configurations we have added:
|
23 |
+
|
24 |
+
1. ONNX model for INT4 CPU: ONNX model for CPUs using int4 quantization via RTN.
|
25 |
+
2. ONNX model for INT4 GPU: ONNX model for GPUs using int4 quantization via RTN.
|
26 |
+
|
27 |
+
## How to Get Started with the Model
|
28 |
+
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](https://aka.ms/run-phi3-v-onnx).
|
29 |
+
|
30 |
+
## Hardware Supported
|
31 |
+
|
32 |
+
The models are tested on:
|
33 |
+
- Intel(R) Core(TM) i9-10920X CPU @ 3.50GHz
|
34 |
+
- 1 A100 GPU, SKU: Standard_ND96amsr_A100_v4 (CUDA)
|
35 |
+
- GPU SKU: RTX 4080 (DirectML)
|
36 |
+
|
37 |
+
Minimum Configuration Required:
|
38 |
+
- CPU machine with 16GB RAM
|
39 |
+
- CUDA: NVIDIA GPU with [Compute Capability](https://developer.nvidia.com/cuda-gpus) >= 7.0
|
40 |
+
- Windows: DirectX 12-capable GPU and a minimum of 10GB of combined RAM
|
41 |
+
|
42 |
+
### Model Description
|
43 |
+
|
44 |
+
- **Developed by:** Microsoft
|
45 |
+
- **Model type:** ONNX
|
46 |
+
- **Language(s) (NLP):** Python, C, C++
|
47 |
+
- **License:** MIT
|
48 |
+
- **Model Description:** This is a conversion of the Phi-3 Vision-128K-Instruct model for ONNX Runtime inference.
|
49 |
+
|
50 |
+
## Additional Details
|
51 |
+
- [**Phi-3 Small, Medium, and Vision Blog**](https://aka.ms/phi3_ONNXBuild24) and [**Phi-3 Mini Blog**](https://aka.ms/phi3-optimizations)
|
52 |
+
- [**Phi-3 Model Blog Link**](https://aka.ms/phi3blog-april)
|
53 |
+
- [**Phi-3 Model Card**](https://aka.ms/phi3-vision-128k-instruct)
|
54 |
+
- [**Phi-3 Technical Report**](https://aka.ms/phi3-tech-report)
|
55 |
+
- [**Phi-3 on Azure AI Studio**](https://aka.ms/phi3-azure-ai)
|
56 |
+
|
57 |
+
## Performance Metrics
|
58 |
+
The performance of the ONNX vision model is similar to [Phi-3-mini-128k-instruct-onnx](https://huggingface.co/microsoft/Phi-3-mini-128k-instruct-onnx) during token generation.
|
59 |
+
|
60 |
+
## Base Model Usage and Considerations
|
61 |
+
**Primary use cases**
|
62 |
+
|
63 |
+
The model is intended for broad commercial and research use in English. The model provides uses for general purpose AI systems and applications with visual and text input capabilities which require
|
64 |
+
|
65 |
+
1) memory/compute constrained environments;
|
66 |
+
2) latency bound scenarios;
|
67 |
+
3) general image understanding;
|
68 |
+
4) OCR;
|
69 |
+
5) chart and table understanding.
|
70 |
+
|
71 |
+
Our model is designed to accelerate research on efficient language and multimodal models, for use as a building block for generative AI powered features.
|
72 |
+
|
73 |
+
**Use case considerations**
|
74 |
+
|
75 |
+
Our models are not specifically designed or evaluated for all downstream purposes. Developers should consider common limitations of language models as they select use cases, and evaluate and mitigate for accuracy, safety, and fairness before using within a specific downstream use case, particularly for high-risk scenarios.
|
76 |
+
|
77 |
+
Developers should be aware of and adhere to applicable laws or regulations (including privacy, trade compliance laws, etc.) that are relevant to their use case.
|
78 |
+
|
79 |
+
Nothing contained in this Model Card should be interpreted as or deemed a restriction or modification to the license the model is released under.
|
80 |
+
|
81 |
+
## Appendix
|
82 |
+
|
83 |
+
## Model Card Contact
|
84 |
+
parinitarahi, kvaishnavi, natke
|
85 |
+
|
86 |
+
## Contributors
|
87 |
+
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
|