Skip to content

Commit 7594f33

Browse files
committed
update changelog and goMLX to stable version
1 parent d2bb249 commit 7594f33

9 files changed

Lines changed: 133 additions & 131 deletions

File tree

CHANGELOG.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/)
55
and this project adheres to [Semantic Versioning](http://semver.org/).
66

7+
## [0.6.0] 🌲❄️🎄🎁 - 2025-12-18
8+
9+
### Changed
10+
11+
- Integrated [ONNX Runtime GenAI](https://github.com/microsoft/onnxruntime-genai) backend for significantly faster generative inference and broad model support.
12+
- Added ObjectDetection pipeline
13+
- Added WithTPU option to NewXLASession
14+
- FeatureExtractionPipeline now supports image inputs, enabling vision models like CLIP
15+
- Updated Onnx Runtime to 1.23.2, and GoMLX to 0.26.0
16+
17+
### Breaking changes
18+
19+
- ORT Gen AI has strong requirements on the name of the base ORT library. It should not be renamed from the release zip (e.g. libonnxruntime.so)
20+
- WithOnnxLibraryPath should now be the folder contining the ORT library. The library name is now inferred from the current operating system.
21+
- XLA now uses go-xla to manage PJRT dependencies, see our [Dockerfile](./Dockerfile) for details
22+
23+
### Fixed
24+
25+
- Model loading path could potentially duplicate paths (thanks @ajroetker)
26+
727
## [0.5.10] - 2025-12-08
828

929
### Breaking changes
@@ -17,7 +37,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1737
- breaking: GetStatistics now returns a Statistics struct for the pipelines rather than a list of strings
1838
- breaking: pipelineBackends has been renamed to backends
1939

20-
### Changes
40+
### Changed
2141

2242
- update of onnxruntime_go, goMLX, gopjrt
2343

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
ARG GO_VERSION=1.25.5
44
ARG ONNXRUNTIME_VERSION=1.23.2
55
ARG ONNXRUNTIME_GENAI_VERSION=0.11.4
6-
ARG GOPJRT_VERSION=0.83.1
6+
ARG GOPJRT_VERSION=0.83.3
77
ARG BUILD_PLATFORM=linux/amd64
88

99
#--- runtime layer with all hugot dependencies for cpu
@@ -23,6 +23,9 @@ COPY ./scripts/download-onnxruntime-genai.sh /download-onnxruntime-genai.sh
2323
RUN --mount=src=./go.mod,dst=/go.mod \
2424
dnf --allowerasing -y install gcc jq bash tar xz gzip glibc-static libstdc++ wget zip git dirmngr sudo which && \
2525
ln -s /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so && \
26+
curl -LO https://download.fedoraproject.org/pub/fedora/linux/releases/43/Everything/x86_64/os/Packages/g/glibc-2.42-4.fc43.x86_64.rpm && \
27+
rpm -Uvh --nodeps --force glibc-2.42-4.fc43.x86_64.rpm && \
28+
rm glibc-2.42-4.fc43.x86_64.rpm && \
2629
dnf clean all && \
2730
# go
2831
curl -LO https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz && \
@@ -42,7 +45,7 @@ RUN --mount=src=./go.mod,dst=/go.mod \
4245
sed -i 's/\r//g' /download-onnxruntime-genai.sh && chmod +x /download-onnxruntime-genai.sh && \
4346
/download-onnxruntime-genai.sh ${ONNXRUNTIME_GENAI_VERSION} && \
4447
# XLA/goMLX
45-
GOPROXY=direct go run github.com/gomlx/go-xla/cmd/pjrt_installer@latest -plugin=amazonlinux -version=v${GOPJRT_VERSION} -path=/usr/local/lib/go-xla && \
48+
GOPROXY=direct go run github.com/gomlx/go-xla/cmd/pjrt_installer@latest -plugin=linux -version=v${GOPJRT_VERSION} -path=/usr/local/lib/go-xla && \
4649
# NON-PRIVILEGED USER
4750
# create non-privileged testuser with id: 1000
4851
useradd -u 1000 -m testuser && usermod -a -G wheel testuser && \

README.md

Lines changed: 70 additions & 112 deletions
Large diffs are not rendered by default.

cuda.Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
ARG GO_VERSION=1.25.5
44
ARG ONNXRUNTIME_VERSION=1.23.2
55
ARG ONNXRUNTIME_GENAI_VERSION=0.11.4
6-
ARG GOPJRT_VERSION=0.83.1
6+
ARG GOPJRT_VERSION=0.83.3
77
ARG JAX_CUDA_VERSION=0.8.1
88
ARG BUILD_PLATFORM=linux/amd64
99

@@ -28,6 +28,9 @@ RUN --mount=src=./go.mod,dst=/go.mod \
2828
# from rhel
2929
dnf config-manager --add-repo https://developer.download.nvidia.com/compute/cuda/repos/rhel9/x86_64/cuda-rhel9.repo && \
3030
dnf install -y cuda-cudart-12-9 cuda-nvrtc-12-9 libcublas-12-9 libcurand-12-9 libcufft-12-9 libcudnn9-cuda-12 && \
31+
curl -LO https://download.fedoraproject.org/pub/fedora/linux/releases/43/Everything/x86_64/os/Packages/g/glibc-2.42-4.fc43.x86_64.rpm && \
32+
rpm -Uvh --nodeps --force glibc-2.42-4.fc43.x86_64.rpm && \
33+
rm glibc-2.42-4.fc43.x86_64.rpm && \
3134
dnf clean all && \
3235
# go
3336
curl -LO https://golang.org/dl/go${GO_VERSION}.linux-amd64.tar.gz && \
@@ -46,7 +49,7 @@ RUN --mount=src=./go.mod,dst=/go.mod \
4649
sed -i 's/\r//g' /download-onnxruntime-genai.sh && chmod +x /download-onnxruntime-genai.sh && \
4750
/download-onnxruntime-genai.sh ${ONNXRUNTIME_GENAI_VERSION} gpu && \
4851
# XLA/goMLX
49-
GOPROXY=direct go run github.com/gomlx/go-xla/cmd/pjrt_installer@latest -plugin=amazonlinux -version=v${GOPJRT_VERSION} -path=/usr/local/lib/go-xla && \
52+
GOPROXY=direct go run github.com/gomlx/go-xla/cmd/pjrt_installer@latest -plugin=linux -version=v${GOPJRT_VERSION} -path=/usr/local/lib/go-xla && \
5053
GOPROXY=direct go run github.com/gomlx/go-xla/cmd/pjrt_installer@latest -plugin=cuda13 -version=${JAX_CUDA_VERSION} -path=/usr/local/lib/go-xla && \
5154
# NON-PRIVILEGED USER
5255
# create non-privileged testuser with id: 1000

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ require (
66
github.com/daulet/tokenizers v1.24.0
77
github.com/gomlx/exceptions v0.0.3
88
github.com/gomlx/go-huggingface v0.3.1
9-
github.com/gomlx/gomlx v0.26.0-rc2
10-
github.com/gomlx/onnx-gomlx v0.3.4-rc0.0.20251216070438-403f89ce7f75
11-
github.com/knights-analytics/ortgenai v0.0.0-20251217113036-5abc6d6b37b1
9+
github.com/gomlx/gomlx v0.26.0
10+
github.com/gomlx/onnx-gomlx v0.3.4
11+
github.com/knights-analytics/ortgenai v0.0.1
1212
github.com/stretchr/testify v1.11.1
1313
github.com/sugarme/tokenizer v0.3.0
1414
github.com/urfave/cli/v3 v3.6.1
@@ -24,7 +24,7 @@ require (
2424
github.com/go-errors/errors v1.5.1 // indirect
2525
github.com/go-logr/logr v1.4.3 // indirect
2626
github.com/gofrs/flock v0.13.0 // indirect
27-
github.com/gomlx/go-xla v0.1.3 // indirect
27+
github.com/gomlx/go-xla v0.1.4 // indirect
2828
github.com/google/uuid v1.6.0 // indirect
2929
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
3030
github.com/patrickmn/go-cache v2.1.0+incompatible // indirect

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@ github.com/gomlx/exceptions v0.0.3 h1:HKnTgEjj4jlmhr8zVFkTP9qmV1ey7ypYYosQ8GzXWu
2929
github.com/gomlx/exceptions v0.0.3/go.mod h1:uHL0TQwJ0xaV2/snJOJV6hSE4yRmhhfymuYgNredGxU=
3030
github.com/gomlx/go-huggingface v0.3.1 h1:kMXA0ecTKywh4xo3WpklCDqUPmyg4ihsyftgCZNYGaA=
3131
github.com/gomlx/go-huggingface v0.3.1/go.mod h1:j1cd4gD0A2pwdYHZfkPMYfYr1C+KHCc2YA1kTEBWlTo=
32-
github.com/gomlx/go-xla v0.1.3 h1:trHJCXnOGKPMCpP4kfXRIUhYRjdluMQj/5Jpmoiftz4=
33-
github.com/gomlx/go-xla v0.1.3/go.mod h1:6OfAcL+h+es7KHz6q0Ql9Vzi5MTys99MJ7aR3Nhko/o=
34-
github.com/gomlx/gomlx v0.26.0-rc2 h1:6mVpej2E7wMJ3zXmm4HNOrmKaKdU9CpSHOwCx6IlgF4=
35-
github.com/gomlx/gomlx v0.26.0-rc2/go.mod h1:HKSGc4Btb3VntH/BV/UsJYzgTMbLT/Gk69kv95rjruM=
36-
github.com/gomlx/onnx-gomlx v0.3.4-rc0.0.20251216070438-403f89ce7f75 h1:bvUYs0GgkoVZSO4wxiEko3RAG6Qn3eJ2qVfVM5we7KU=
37-
github.com/gomlx/onnx-gomlx v0.3.4-rc0.0.20251216070438-403f89ce7f75/go.mod h1:RjCGoxroeaa4IQc7TN+XeUJRwaVRfZ7TjRm+gtS/Z/U=
32+
github.com/gomlx/go-xla v0.1.4 h1:7u1RcRBuCBZefQcmcQXSrJ9PmpxXMbmszmDT4dubibw=
33+
github.com/gomlx/go-xla v0.1.4/go.mod h1:6OfAcL+h+es7KHz6q0Ql9Vzi5MTys99MJ7aR3Nhko/o=
34+
github.com/gomlx/gomlx v0.26.0 h1:ra0MtgdUh2rgor3aNodcqeGGJqPLrot3yBm0UqG+lbI=
35+
github.com/gomlx/gomlx v0.26.0/go.mod h1:8nkmYYv9PF1xbRbX1xNqaQYm3VcAJLs5q9j5kyyRuBk=
36+
github.com/gomlx/onnx-gomlx v0.3.4 h1:qH3yQNXsbyrKHCGHgcITHkLPS7nWF+LEC9v6Bky7jtc=
37+
github.com/gomlx/onnx-gomlx v0.3.4/go.mod h1:V0xRbk2eozhH6FCx3RmyjNcfi7AujLP+mmaOHOpr65s=
3838
github.com/google/go-cmp v0.7.0 h1:wk8382ETsv4JYUZwIsn6YpYiWiBsYLSJiTsyBybVuN8=
3939
github.com/google/go-cmp v0.7.0/go.mod h1:pXiqmnSA92OHEEa9HXL2W4E7lf9JzCmGVUdgjX3N/iU=
4040
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
4141
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
4242
github.com/janpfeifer/go-benchmarks v0.1.1 h1:gLLy07/JrOKSnMWeUxSnjTdhkglgmrNR2IBDnR4kRqw=
4343
github.com/janpfeifer/go-benchmarks v0.1.1/go.mod h1:5AagXCOUzevvmYFQalcgoa4oWPyH1IkZNckolGWfiSM=
44-
github.com/knights-analytics/ortgenai v0.0.0-20251217113036-5abc6d6b37b1 h1:1CCq4Rux7SyRm+HG5rWydGeluI1NzBRvgbSj91GoFUg=
45-
github.com/knights-analytics/ortgenai v0.0.0-20251217113036-5abc6d6b37b1/go.mod h1:zolhST8PioaCCsnwHBUesIBKU4CW/ZrF169YjFfg7BY=
44+
github.com/knights-analytics/ortgenai v0.0.1 h1:AJdqqjWMtMRfXn9Lf6RQ+fJ6W6f8bBHuf1KXQGUgDAk=
45+
github.com/knights-analytics/ortgenai v0.0.1/go.mod h1:zolhST8PioaCCsnwHBUesIBKU4CW/ZrF169YjFfg7BY=
4646
github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
4747
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
4848
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=

hugot_ort_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,12 @@ func TestObjectDetectionPipelineValidationORT(t *testing.T) {
311311
}
312312

313313
// Text generation
314+
// These currently only run locally due to resource constraints in CI/CD
314315

315316
func TestTextGenerationPipelineORT(t *testing.T) {
317+
if os.Getenv("CI") != "" {
318+
t.SkipNow()
319+
}
316320
session, err := NewORTSession()
317321
checkT(t, err)
318322
defer func(session *Session) {
@@ -338,6 +342,9 @@ func TestTextGenerationPipelineORTCuda(t *testing.T) {
338342
}
339343

340344
func TestTextGenerationPipelineValidationORT(t *testing.T) {
345+
if os.Getenv("CI") != "" {
346+
t.SkipNow()
347+
}
341348
session, err := NewORTSession()
342349
checkT(t, err)
343350
defer func(session *Session) {

hugot_xla_test.go

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,9 @@ func TestCrossEncoderPipelineXLA(t *testing.T) {
195195
}
196196

197197
func TestCrossEncoderPipelineXLACuda(t *testing.T) {
198+
if os.Getenv("CI") != "" {
199+
t.SkipNow()
200+
}
198201
session, err := NewXLASession(options.WithCuda(map[string]string{
199202
"device_id": "0",
200203
}))
@@ -229,6 +232,9 @@ func TestImageClassificationPipelineXLA(t *testing.T) {
229232
}
230233

231234
func TestImageClassificationPipelineXLACuda(t *testing.T) {
235+
if os.Getenv("CI") != "" {
236+
t.SkipNow()
237+
}
232238
session, err := NewXLASession(options.WithCuda(map[string]string{
233239
"device_id": "0",
234240
}))
@@ -264,6 +270,9 @@ func TestObjectDetectionPipelineXLA(t *testing.T) {
264270
}
265271

266272
func TestObjectDetectionPipelineXLACuda(t *testing.T) {
273+
if os.Getenv("CI") != "" {
274+
t.SkipNow()
275+
}
267276
t.Skip("Currently fails due to unsupported constant in XLA backend")
268277
session, err := NewXLASession(options.WithCuda(map[string]string{
269278
"device_id": "0",
@@ -301,6 +310,9 @@ func TestTextGenerationPipelineXLA(t *testing.T) {
301310
}
302311

303312
func TestTextGenerationPipelineXLACuda(t *testing.T) {
313+
if os.Getenv("CI") != "" {
314+
t.SkipNow()
315+
}
304316
t.Skip("Generative models are not supported yet for XLA")
305317
session, err := NewXLASession(options.WithCuda(map[string]string{
306318
"device_id": "0",

options/options.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@ type GoMLXOptions struct {
6666
// WithOption is the interface for all option functions.
6767
type WithOption func(o *Options) error
6868

69-
// WithOnnxLibraryPath (ORT only) Use this function to set the path to the "onnxbackend.so" or "onnxbackend.dll" function.
70-
// By default, it will be set to "onnxbackend.so" on non-Windows systems, and "onnxbackend.dll" on Windows.
69+
// WithOnnxLibraryPath (ORT only) Use this function to set the path to the "libonnxuntime.so", "libonnxuntime.dylib" or "onnxruntime.dll" files.
7170
func WithOnnxLibraryPath(ortLibraryPath string) WithOption {
7271
return func(o *Options) error {
7372
if o.Backend == "ORT" {

0 commit comments

Comments
 (0)