ONNX GenAI
Collection
A collection of models that are able to be run using onnxruntime-genai and can be served through embeddedllm library.
•
13 items
•
Updated
•
2
This model is an ONNX-optimized version of Mistral-7B-Instruct-v0.3, designed to provide accelerated inference on a variety of hardware using ONNX Runtime(CPU and DirectML). DirectML is a high-performance, hardware-accelerated DirectX 12 library for machine learning, providing GPU acceleration for a wide range of supported hardware and drivers, including AMD, Intel, NVIDIA, and Qualcomm GPUs.
Here are some of the optimized configurations we have added:
To use the Mistral-7B-Instruct-v0.3 ONNX model on Windows with DirectML, follow these steps:
conda create -n onnx python=3.10
conda activate onnx
winget install -e --id GitHub.GitLFS
pip install huggingface-hub[cli]
huggingface-cli download EmbeddedLLM/mistral-7b-instruct-v0.3-onnx --include="onnx/directml/*" --local-dir .\mistral-7b-instruct-v0.3
pip install numpy==1.26.4
pip install onnxruntime-directml
pip install --pre onnxruntime-genai-directml
conda install conda-forge::vs2015_runtime
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/microsoft/onnxruntime-genai/main/examples/python/phi3-qa.py" -OutFile "phi3-qa.py"
python phi3-qa.py -m .\mistral-7b-instruct-v0.3
Minimum Configuration:
Tested Configurations: