Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
pipeline_tag: text-generation
|
4 |
+
tags:
|
5 |
+
- ONNX
|
6 |
+
- DML
|
7 |
+
- DirectML
|
8 |
+
- ONNXRuntime
|
9 |
+
- mistral
|
10 |
+
- conversational
|
11 |
+
- custom_code
|
12 |
+
inference: false
|
13 |
+
---
|
14 |
+
|
15 |
+
# Mistral-7B-Instruct-v0.3 ONNX models for DirectML
|
16 |
+
This repository hosts the optimized versions of [Mistral-7B-Instruct-v0.3](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.3) to accelerate inference with ONNX Runtime for DirectML.
|
17 |
+
|
18 |
+
## Usage on Windows (Intel / AMD / Nvidia / Qualcomm)
|
19 |
+
```powershell
|
20 |
+
conda create -n onnx python=3.10
|
21 |
+
conda activate onnx
|
22 |
+
winget install -e --id GitHub.GitLFS
|
23 |
+
pip install huggingface-hub[cli]
|
24 |
+
huggingface-cli download EmbeddedLLM/mistral-7b-instruct-v0.3-int4-onnx-directml --local-dir .\mistral-7b-instruct-v0.3
|
25 |
+
pip install numpy
|
26 |
+
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/microsoft/onnxruntime-genai/main/examples/python/phi3-qa.py" -OutFile "phi3-qa.py"
|
27 |
+
pip install onnxruntime-directml
|
28 |
+
pip install --pre onnxruntime-genai-directml
|
29 |
+
conda install conda-forge::vs2015_runtime
|
30 |
+
python phi3-qa.py -m .\mistral-7b-instruct-v0.3
|
31 |
+
```
|
32 |
+
|
33 |
+
## What is DirectML
|
34 |
+
DirectML is a high-performance, hardware-accelerated DirectX 12 library for machine learning. DirectML provides GPU acceleration for common machine learning tasks across a broad range of supported hardware and drivers, including all DirectX 12-capable GPUs from vendors such as AMD, Intel, NVIDIA, and Qualcomm.
|