parinitarahi commited on
Commit
3ac63b4
·
verified ·
1 Parent(s): 9eef866

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +45 -1
README.md CHANGED
@@ -1 +1,45 @@
1
- # Phi-4-Mini-Instruct ONNX models
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - ONNX
4
+ - ONNX Runtime
5
+ - code
6
+ - nlp
7
+ - phi4
8
+ - phi4 mini
9
+ license: mit
10
+ language:
11
+ - multilingual
12
+ ---
13
+ # microsoft/Phi-4-mini-instruct-onnx
14
+
15
+ ## Introduction
16
+ This repository hosts the optimized versions of Phi4 mini models to accelerate inference with ONNX Runtime CUDA.
17
+ Optimized 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.
18
+ Here are some of the optimized configurations we have added:
19
+ 1. ONNX model for int4 CPU and Mobile: ONNX model for CPU and mobile using int4 quantization via RTN.
20
+ 2. ONNX model for int4 CUDA and DML GPU devices using int4 quantization via RTN.
21
+
22
+ You can see how to run examples with ORT GenAI at [https://github.com/microsoft/onnxruntime-genai/blob/main/examples/python/phi-3-tutorial.md]
23
+
24
+ ## Model Description
25
+ - Developed by: Microsoft
26
+ - Model type: ONNX
27
+ - License: MIT
28
+ - Model Description: This is a conversion of Phi4 mini model for ONNX Runtime inference.
29
+
30
+ **Disclaimer:** 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.
31
+
32
+ ## Base Model
33
+ Phi-4-Mini is a lightweight open model built upon synthetic data and filtered publicly available websites - with a focus on high-quality, reasoning dense data. The model belongs to the Phi-4 model family and supports 128K token context length. The model underwent an enhancement process, incorporating both supervised fine-tuning and direct preference optimization to support precise instruction adherence and robust safety measures.
34
+ See details at [https://huggingface.co/microsoft/Phi-4-mini-instruct/blob/main/README.md](https://huggingface.co/microsoft/Phi-4-mini-instruct/blob/main/README.md)
35
+
36
+ ## Performance Comparison
37
+ |Hardware | ONNX | PyTorch | speedup |
38
+ |-------|----------|------|---------|
39
+ | A100 GPU | fp16 = 136.359 tokens/sec int4-awq = 233.036 tokens/sec | fp16: 34.200 tokens/sec fp32: 37.899 tokens/sec | 4X (fp16), 6X(int4-rwq) |
40
+ | RTX 4090 GPU | int4: 260.045 tokens/sec fp16: 97.463 tokens/se fp32: 19.320 tokens/sec | fp16: 43.957 tokens/sec | 5x(fp16) |
41
+ | Intel Xeon Platinum 8272CL CPU | int4: 16.89 tokens/sec | fp32: 1.636 tokens/sec | 10x |
42
+ | Intel Xeon Platinum 8573B CPU | int4: 23.978 tokens/sec | fp32: 4.479 tokens/sec | 5.35X |
43
+ | AMD EPYC 7763v CPU | int4: 19.884 tokens/sec | fp32: 1.599 tokens/sec | 12.4x |
44
+ | Intel Core Ultra 7 165H Laptop CPU | int4: 4.863 tokens/sec | fp32: 1.699 tokens/sec | 2.8x |
45
+ | Intel i7 processor | int4: 3.474 tokens/sec fp32: 1.800 tokens/sec | fp32: 0.702 tokens/sec |