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 repository contains optimized versions of the gemma-2b-it model, designed to accelerate inference using ONNX Runtime. These optimizations are specifically tailored for CPU and DirectML. DirectML is a high-performance, hardware-accelerated DirectX 12 library for machine learning, offering GPU acceleration across a wide range of supported hardware and drivers, including those from AMD, Intel, NVIDIA, and Qualcomm.
Here are some of the optimized configurations we have added:
To use the Gemma-2B-Instruct-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/gemma-2b-it-onnx --include="onnx/directml/*" --local-dir .\gemma-2b-it-onnx
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 .\gemma-2b-it-onnx
Minimum Configuration:
Tested Configurations: