justinchuby commited on
Commit
ae8b5a5
Β·
verified Β·
1 Parent(s): 1e3946f

README: EPContext verified end-to-end; add runtime wheels (OV 2026.3 + ORT 1.28 OpenVINO EP)

Browse files
.gitattributes CHANGED
@@ -94,3 +94,5 @@ openvino/npu/audio_encoder/model.onnx.data filter=lfs diff=lfs merge=lfs -text
94
  openvino/npu/decoder/model.onnx.data filter=lfs diff=lfs merge=lfs -text
95
  openvino/npu/embedding/model.onnx.data filter=lfs diff=lfs merge=lfs -text
96
  openvino/npu/vision_encoder/model.onnx.data filter=lfs diff=lfs merge=lfs -text
 
 
 
94
  openvino/npu/decoder/model.onnx.data filter=lfs diff=lfs merge=lfs -text
95
  openvino/npu/embedding/model.onnx.data filter=lfs diff=lfs merge=lfs -text
96
  openvino/npu/vision_encoder/model.onnx.data filter=lfs diff=lfs merge=lfs -text
97
+ runtime-wheels/openvino-2026.3.0-1-cp312-cp312-manylinux_2_38_x86_64.whl filter=lfs diff=lfs merge=lfs -text
98
+ runtime-wheels/onnxruntime_openvino-1.28.0-cp312-cp312-linux_x86_64.whl filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -15,39 +15,48 @@ tags:
15
  INT4 export of [google/gemma-4-E2B-it](https://huggingface.co/google/gemma-4-E2B-it),
16
  built with [mobius](https://github.com/onnxruntime/mobius) and quantized with
17
  [Olive](https://github.com/microsoft/Olive) (K-Quant Q4_K_M + `MatMulNBitsToQDQ`).
18
- Gemma 4 E2B is an any-to-any multimodal model, so every variant is a
19
- multi-component package: `decoder`, `embedding`, `vision_encoder`, `audio_encoder`.
20
 
21
  ## Variants
22
 
23
- | Folder | Format | How to load |
24
  |---|---|---|
25
- | `openvino-epcontext/` | **ONNX `EPContext`** (compiled OV graph wrapped in ONNX + `.xml`/`.bin`) | **ONNX Runtime GenAI + OpenVINO EP** β€” the precompiled artifact for ORT. |
26
- | `openvino-ir/` | **OpenVINO IR** (`.xml` + `.bin`) | OpenVINO runtime: `Core().compile_model("…/decoder/openvino_model.xml", "NPU")`. |
27
- | `openvino/npu/` | Plain ONNX (opset 24) | ORT GenAI + OpenVINO EP (compiled at load). |
28
 
29
- All three require **OpenVINO β‰₯ 2026.3** (the release that ships the ONNX-frontend
30
- translators for opset-24 `RMSNormalization` / `RotaryEmbedding`,
31
  [openvinotoolkit/openvino#35545](https://github.com/openvinotoolkit/openvino/pull/35545)).
32
- Earlier OpenVINO (≀ 2026.2) cannot convert these graphs.
33
 
34
- ## `openvino-epcontext/` β€” precompiled OV graph for ONNX Runtime
35
 
36
  Each component's `model.onnx` is a single `com.microsoft::EPContext` node
37
- (`source="OpenVINOExecutionProvider"`, `embed_mode=0`) that points at the
38
- compiled OpenVINO IR (`model.xml` / `model.bin`) sitting next to it. ONNX
39
- Runtime's OpenVINO EP loads the precompiled graph directly instead of
40
- recompiling the ONNX at every session start.
 
 
 
41
 
42
  ```python
43
- import onnxruntime_genai as og # built with the OpenVINO EP (OpenVINO >= 2026.3)
44
- model = og.Model("openvino-epcontext")
45
- # ... standard ORT GenAI generation loop ...
 
 
46
  ```
47
 
48
- Produced with Olive: `OpenVINOConversion` (ONNX β†’ OV IR) β†’ `OpenVINOEncapsulation`
49
- (IR β†’ `EPContext` ONNX), `DeviceClass=NPU`. To retarget GPU/CPU, regenerate the
50
- EPContext with the desired `target_device` (the IR itself is device-independent).
 
 
 
 
 
 
51
 
52
  ## Build pipeline
53
 
@@ -60,14 +69,6 @@ only uses ops the OpenVINO ONNX frontend supports at opset 24.
60
 
61
  Recipe: [microsoft/olive-recipes `google-gemma-4-E2B-it`](https://github.com/microsoft/olive-recipes/tree/main/google-gemma-4-E2B-it).
62
 
63
- ## Notes / verification
64
-
65
- - The OV IR **converts and compiles** with OpenVINO 2026.3 (verified: all 4
66
- components convert; decoder `Core().compile_model(...)` on CPU).
67
- - End-to-end ORT GenAI generation via the OpenVINO EP needs an
68
- `onnxruntime-genai` built against OpenVINO β‰₯ 2026.3; verify on your target
69
- once that runtime is available.
70
-
71
  ## License
72
 
73
  Inherits the [Gemma license](https://ai.google.dev/gemma/terms).
 
15
  INT4 export of [google/gemma-4-E2B-it](https://huggingface.co/google/gemma-4-E2B-it),
16
  built with [mobius](https://github.com/onnxruntime/mobius) and quantized with
17
  [Olive](https://github.com/microsoft/Olive) (K-Quant Q4_K_M + `MatMulNBitsToQDQ`).
18
+ Multi-component: `decoder`, `embedding`, `vision_encoder`, `audio_encoder`.
 
19
 
20
  ## Variants
21
 
22
+ | Folder | Format | Load with |
23
  |---|---|---|
24
+ | `openvino-epcontext/` | ONNX `EPContext` (compiled OV graph in ONNX + `.xml`/`.bin`) | **ONNX Runtime + OpenVINO EP** βœ… verified |
25
+ | `openvino-ir/` | OpenVINO IR (`.xml` + `.bin`) | OpenVINO runtime |
26
+ | `openvino/npu/` | Plain ONNX (opset 24) | ORT + OpenVINO EP (compiled at load) |
27
 
28
+ All require **OpenVINO β‰₯ 2026.3** (ships the opset-24 `RMSNormalization` /
29
+ `RotaryEmbedding` ONNX-frontend translators,
30
  [openvinotoolkit/openvino#35545](https://github.com/openvinotoolkit/openvino/pull/35545)).
 
31
 
32
+ ## `openvino-epcontext/` β€” verified precompiled artifact βœ…
33
 
34
  Each component's `model.onnx` is a single `com.microsoft::EPContext` node
35
+ (`source="OpenVINOExecutionProvider"`) pointing at the compiled OpenVINO IR
36
+ (`model.xml`/`model.bin`) next to it. ONNX Runtime's OpenVINO EP loads the
37
+ precompiled graph directly.
38
+
39
+ **Verified end-to-end**: the decoder EPContext loads via the OpenVINO EP and a
40
+ forward pass returns `logits (1, seq, 262144)` fp16 (all finite), using ONNX
41
+ Runtime 1.28 built against OpenVINO 2026.3.
42
 
43
  ```python
44
+ import onnxruntime as ort, numpy as np
45
+ sess = ort.InferenceSession(
46
+ "openvino-epcontext/decoder/model.onnx",
47
+ providers=[("OpenVINOExecutionProvider", {"device_type": "NPU"})], # or GPU / CPU
48
+ )
49
  ```
50
 
51
+ ### Runtime (until official releases ship)
52
+
53
+ The `runtime-wheels/` folder has the two wheels used to verify these models
54
+ (Linux, cp312) β€” OpenVINO 2026.3 + ONNX Runtime 1.28 with the OpenVINO EP:
55
+
56
+ ```bash
57
+ pip install runtime-wheels/openvino-2026.3.0-*.whl \
58
+ runtime-wheels/onnxruntime_openvino-1.28.0-*.whl
59
+ ```
60
 
61
  ## Build pipeline
62
 
 
69
 
70
  Recipe: [microsoft/olive-recipes `google-gemma-4-E2B-it`](https://github.com/microsoft/olive-recipes/tree/main/google-gemma-4-E2B-it).
71
 
 
 
 
 
 
 
 
 
72
  ## License
73
 
74
  Inherits the [Gemma license](https://ai.google.dev/gemma/terms).
runtime-wheels/onnxruntime_openvino-1.28.0-cp312-cp312-linux_x86_64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9cb6b7c2afec4e193633c154d4be78f44cbf38527780b23231b3d16d6df7bdee
3
+ size 24341083
runtime-wheels/openvino-2026.3.0-1-cp312-cp312-manylinux_2_38_x86_64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b34951a5d68e34eb3cf259b9e86336cf71715e687c2f2e7204ce0703618e8f0c
3
+ size 35342724