โš ๏ธ๐Ÿšง This site is currently under construction. Documentation is actively being written and expected to be released along with the next GoMLX release v0.28.0. ๐Ÿšงโš ๏ธ

What is GoMLX?

GoMLX, an Accelerated ML and Math Framework

GoDev GitHub Go Report Card Linux/amd64 Tests Linux/arm64 Tests Darwin/arm64 Tests Windows/amd64 Tests Coverage Slack Sponsor gomlx

๐Ÿ“– About GoMLX

GoMLX Gopher

GoMLX is an easy-to-use set of Machine Learning and generic math libraries and tools. It can be seen as a PyTorch/Jax/TensorFlow for Go.

It can be used to train, fine-tune, modify, and combine machine learning models. It provides all the tools to make that work easy: from a complete set of differentiable operators, all the way to UItools to plot metrics while training in a notebook.

It runs almost everywhere Go runs, using a pure Go backend. It runs even in the browser with WASM (see demo created with GoMLX). Likely, it will work in embedded devices as well (see Tamago).

It also supports a very optimized backend engine based on OpenXLA that uses just-in-time compilation to CPU, GPUs (Nvidia, and likely AMD ROCm, Intel, Macs) and Google’s TPUs. It also supports modern distributed execution (new, still being actively improved) for multi-TPU or multi-GPU using XLA Shardy, an evolution of the GSPMD distribution).

It’s the same engine that powers Google’s Jax, TensorFlow and Pytorch/XLA, and it has the same speed in many cases. Use this backend to train large models or with large datasets.

[!Tip]

It was developed to be a full-featured ML platform for Go, productionizable and easily to experiment with ML ideas โ€”see Long-Term Goals below.

It strives to be simple to read and reason about, leading the user to a correct and transparent mental model of what is going on (no surprises)โ€”aligned with Go philosophy. At the cost of more typing (more verbose) at times.

It is also incredibly flexible and easy to extend and try non-conventional ideas: use it to experiment with new optimizer ideas, complex regularizers, funky multitasking, etc.

Documentation is kept up to date (if it is not well-documented, it is as if the code is not there), and error messages are useful (always with a stack-trace) and try to make it easy to solve issues.

๐Ÿ”ฎ Upcoming Features & Plans ๐Ÿ”ฎ

Large API and package re-organization coming soon in v0.28 release:

  • backends moved to github.com/gomlx/compute repository!
    • Packages backends, dtypes, shapes and distributed moved to github.com/gomlx/compute.
    • The “go” backend is now implemented in github.com/gomlx/compute/gobackend (it’s been greatly improved as well).
    • The “xla” backend is now implemented in github.com/gomlx/go-xla/compute/xla.
  • Removed pkg/ prefix from the the top level packages (no need with internal/ special handling).
  • The context.Context variable container redesigned (and simplified) into model.Store (the container) the model.Scope (a pointer to a Store with the current scope).

See more details in the our CHANGELOG, including how to use cmd/convert_v0.28, a tool that facilitates the changes needed to move to the new API – details in the CHANGELOG.

Upcoming features for the upcoming v0.28.0 release:

  • Dynamic shapes support for GoMLX: alpha/experimental, only for the Go backend (XLA only supports static shapes). But it will allow more efficient and padding-free (sometimes) models with Go. It also opens up better support for ONNXRuntime backend (a goal for after the v0.28 release).
  • Improvements and some SIMD support for the Go backend (now in repo github.com/gomlx/compute/gobackend).

๐Ÿ—บ๏ธ Overview

GoMLX is a full-featured ML framework, supporting various well-known ML components
from the bottom to the top of the stack. But it is still only a slice of what a major ML library/framework should provide (like TensorFlow, Jax, or PyTorch).

Examples developed using GoMLX

Backends

This page is excerpted from the full README. For complete documentation, browse the sections in the sidebar.

Last updated June 2, 2026