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 the ONNX-optimized version of openchat/openchat-3.6-8b-20240522, 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.
The following optimized configurations are available:
To use the EmbeddedLLM/openchat-3.6-8b-20240522-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/openchat-3.6-8b-20240522-onnx --include="onnx/directml/*" --local-dir .\openchat-3.6-8b-20240522-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 .\openchat-3.6-8b-20240522-onnx
Minimum Configuration:
Tested Configurations:
@article{wang2023openchat,
title={OpenChat: Advancing Open-source Language Models with Mixed-Quality Data},
author={Wang, Guan and Cheng, Sijie and Zhan, Xianyuan and Li, Xiangang and Song, Sen and Liu, Yang},
journal={arXiv preprint arXiv:2309.11235},
year={2023}
}
Base model
meta-llama/Meta-Llama-3-8B