parinitarahi commited on
Commit
4bb1c24
·
verified ·
1 Parent(s): 244ace8

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +52 -0
README.md CHANGED
@@ -0,0 +1,52 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ pipeline_tag: text-generation
4
+ tags:
5
+ - ONNX
6
+ - ONNXRuntime
7
+ license: mit
8
+
9
+ ---
10
+
11
+ ## DeepSeek-R1-Distill-Qwen ONNX models
12
+ This repository hosts the optimized versions of [DeepSeek-R1-Distill-Qwen-1.5B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B/) and [DeepSeek-R1-Distill-Qwen-7B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B/) to accelerate inference with ONNX Runtime.
13
+ Optimized 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.
14
+
15
+ To easily get started with the model, you can use our newly introduced ONNX Runtime Generate() API. See [here](https://aka.ms/generate-tutorial) for instructions on how to run it.
16
+
17
+ ## ONNX Models
18
+ Here are some of the optimized configurations we have added:
19
+
20
+ 1. ONNX model for int4 CPU and Mobile: ONNX model for CPU and mobile using int4 quantization via RTN.
21
+ 2. ONNX model for int4 CUDA GPU using int4 quantization via RTN.
22
+
23
+
24
+ ## Performance
25
+ The ONNX models are tested on:
26
+
27
+ ONNX enables you to run your models on-device across CPU, GPU, NPU. With ONNX you can run your models on any machine across all silica Qualcomm, AMD, Intel, Nvidia. See table below for some key benchmarks for Windows GPU and CPU devices.
28
+ | **Model** | **Precisionl** | **Device Type** | **Execution Provider** | **Device** | **Token Generation Throughput** | **Speed up vs base model**|
29
+ | :------------: | :------------: | :------------: | :------------: | :------------: | :------------: | :------------:|
30
+ |deepseek-ai_DeepSeek-R1-Distill-Qwen-1.5B| ONNX | fp16 | GPU CUDA | RTX 4090 | 197.195 | 4X |
31
+ |deepseek-ai_DeepSeek-R1-Distill-Qwen-1.5B| ONNX | Int4 | GPU CUDA | RTX 4090 | 313.32 | 6.3X |
32
+ |deepseek-ai_DeepSeek-R1-Distill-Qwen-7B| ONNX | fp16 | GPU CUDA | RTX 4090 | 57.316 | 1.3X |
33
+ |deepseek-ai_DeepSeek-R1-Distill-Qwen-7B| ONNX | Int4 | GPU CUDA | RTX 4090 | 161.00 | 3.7X |
34
+ |deepseek-ai_DeepSeek-R1-Distill-Qwen-7B| ONNX | Int4/bfloat16 | CPU | CPU Intel i9 | 3.184 | 20X |
35
+ |deepseek-ai_DeepSeek-R1-Distill-Qwen-1.5B| ONNX | Int4 | CPU | CPU Intel i9 | 11.749 | 1.4x |
36
+
37
+ CUDA BUILD SPECS: Onnxruntime-genai-cuda==0.6.0-dev, transformers==4.46.2, onnxruntime-gpu==1.20.1
38
+ CPU BUILD SPECS: Onnxruntime-genai==0.6.0-dev, transformers==4.46.2, onnxruntime==1.20.01
39
+
40
+
41
+ ## Model Description
42
+
43
+ - **Developed by:** ONNX Runtime
44
+ - **Model type:** ONNX
45
+ - **Language(s) (NLP):** Python, C, C++
46
+ - **License:** MIT
47
+ - **Model Description:** This is a conversion of the Deepseek R1 for ONNX Runtime inference.
48
+ - **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 you scenarios. There may be a slight difference in output from the base model with the optimizations applied. **
49
+
50
+ ## Base Model Information
51
+ See HF links [DeepSeek-R1-Distill-Qwen-1.5B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-1.5B/) and [DeepSeek-R1-Distill-Qwen-7B](https://huggingface.co/deepseek-ai/DeepSeek-R1-Distill-Qwen-7B/) for details.
52
+