Go ML framework for training, fine-tuning, and modifying models
Top 42.9% on sourcepulse
GoMLX is an accelerated machine learning and math framework for Go, aiming to provide a PyTorch/Jax-like experience for Go developers. It targets researchers and developers who want to build, train, and fine-tune ML models within the Go ecosystem, offering a familiar API with a focus on transparency and extensibility.
How It Works
GoMLX leverages OpenXLA/PJRT as its primary backend, enabling just-in-time compilation for CPU and GPU acceleration, mirroring the performance of Jax and TensorFlow. An experimental, more portable Go-based backend is also available, though it is significantly slower and has limited operator coverage. The framework includes automatic differentiation, context management for ML models, and a comprehensive library of ML layers, optimizers, and loss functions.
Quick Start & Requirements
curl -sSf https://raw.githubusercontent.com/gomlx/gopjrt/main/cmd/install_linux_amd64.sh | bash
. For CUDA support: curl -sSf https://raw.githubusercontent.com/gomlx/gopjrt/main/cmd/install_cuda.sh | bash
. SimpleGo backend requires import _ "github.com/gomlx/gomlx/backends/simplego"
.hdf5-tools
may be needed. macOS support is experimental and lags behind.docker pull janpfeifer/gomlx_jupyterlab:latest
and docker run -it --rm -p 8888:8888 -v "${PWD}":/home/jupyter/work janpfeifer/gomlx_jupyterlab:latest
for an environment with JupyterLab and GoNB.Highlighted Details
SimpleGo
) for portability (Mac/Windows/Wasm).onnx-gomlx
and Hugging Face integration.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The framework is considered experimental, with occasional breaking changes. macOS support is outdated and considered broken for pre-built binaries, requiring manual compilation. Jacobian support is not yet implemented, only gradients.
1 week ago
1 day