You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run generative AI models with ONNX Runtime. This API gives you an easy, flexible and performant way of running LLMs on device. It implements the generative AI loop for ONNX models, including pre and post processing, inference with ONNX Runtime, logits processing, search and sampling, and KV cache management.
11
+
Run generative AI models with ONNX Runtime. This API gives you an easy, flexible and performant way of running LLMs on device. It implements the generative AI loop for ONNX models, including pre and post processing, inference with ONNX Runtime, logits processing, search and sampling, KV cache management, and grammar specification for tool calling.
12
+
13
+
ONNX Runtime GenAI powers Foundry Local, Windows ML, and the Visual Studio Code AI Toolkit.
36
14
37
15
See documentation at the [ONNX Runtime website](https://onnxruntime.ai/docs/genai) for more details.
38
16
39
-
|Support matrix|Supported now|Under development|On the roadmap|
17
+
|Support matrix|Supported now|Under development|On the roadmap|
\~ Windows builds available, requires build from source for other platforms
26
+
^ Requires build from source
49
27
50
28
## Installation
51
29
@@ -60,7 +38,7 @@ See [installation instructions](https://onnxruntime.ai/docs/genai/howto/install)
60
38
```
61
39
62
40
2. Install the API
63
-
41
+
64
42
```shell
65
43
pip install numpy
66
44
pip install --pre onnxruntime-genai
@@ -113,30 +91,86 @@ See [installation instructions](https://onnxruntime.ai/docs/genai/howto/install)
113
91
del generator
114
92
```
115
93
116
-
### Choosing the Right Examples: Release vs. Main Branch
94
+
### Choose the correct version of the examples
117
95
118
-
Due to the evolving nature of this project and ongoing feature additions, examples in the `main` branch may not always align with the latest stable release. This section outlines how to ensure compatibility between the examples and the corresponding version. The majority of the steps would remain same. Just the package installation and the model example file would change.
96
+
Due to the evolving nature of this project and ongoing feature additions, examples in the `main` branch may not always align with the latest stable release. This section outlines how to ensure compatibility between the examples and the corresponding version.
119
97
120
98
### Stable version
121
-
Install the package according to the [installation instructions](https://onnxruntime.ai/docs/genai/howto/install). Let's say you installed the 0.10.1 version of ONNX Runtime GenAI, so the instructions would look like this:
99
+
100
+
Install the package according to the [installation instructions](https://onnxruntime.ai/docs/genai/howto/install). For example, install the Python package.
101
+
102
+
```bash
103
+
pip install onnxruntime-genai
104
+
```
105
+
106
+
Get the version of the package
107
+
108
+
Linux/Mac:
109
+
```bash
110
+
pip list | grep onnxruntime-genai
111
+
```
112
+
113
+
Windows:
114
+
```bash
115
+
pip list | findstr "onnxruntime-genai"
116
+
```
117
+
118
+
Checkout the version of the examples that correspond to that release.
# Checkout the branch for the version you are using
127
-
git checkout v0.10.1
124
+
git checkout v0.11.4
128
125
cd examples
129
126
```
130
127
131
-
### Nightly version (Main Branch)
132
-
Build the package from source using these [instructions](https://onnxruntime.ai/docs/genai/howto/build-from-source.html). Now just go to the folder location where all the examples are present.
0 commit comments