gomlx  by gomlx

Go ML framework for training, fine-tuning, and modifying models

created 2 years ago
851 stars

Top 42.9% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

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

  • Installation: For XLA backend (Linux recommended): 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".
  • Prerequisites: Linux for XLA backend. CUDA Toolkit for GPU support. hdf5-tools may be needed. macOS support is experimental and lags behind.
  • Docker: 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.
  • Resources: Docker image is ~5GB.
  • Docs: Tutorial, Godoc, Blog Post.

Highlighted Details

  • OpenXLA/PJRT backend for high-performance CPU/GPU acceleration.
  • Experimental pure Go backend (SimpleGo) for portability (Mac/Windows/Wasm).
  • Support for converting ONNX models via onnx-gomlx and Hugging Face integration.
  • Includes a GoNB kernel for Jupyter notebooks, facilitating interactive development.

Maintenance & Community

  • Actively developed by Jan Pfeifer.
  • Community support via GitHub Issues and Discussions.

Licensing & Compatibility

  • Apache License Version 2.0. Permissive for commercial use and closed-source linking.

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.

Health Check
Last commit

1 week ago

Responsiveness

1 day

Pull Requests (30d)
3
Issues (30d)
0
Star History
114 stars in the last 90 days

Explore Similar Projects

Starred by Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), Stas Bekman Stas Bekman(Author of Machine Learning Engineering Open Book; Research Engineer at Snowflake), and
2 more.

gpustack by gpustack

1.6%
3k
GPU cluster manager for AI model deployment
created 1 year ago
updated 3 days ago
Starred by Jeff Hammerbacher Jeff Hammerbacher(Cofounder of Cloudera), Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), and
2 more.

serve by pytorch

0.1%
4k
Serve, optimize, and scale PyTorch models in production
created 5 years ago
updated 3 weeks ago
Starred by Max Howell Max Howell(Author of Homebrew) and Patrick von Platen Patrick von Platen(Core Contributor to Hugging Face Transformers and Diffusers).

kohya_ss by bmaltais

0.2%
11k
GUI for Stable Diffusion training scripts
created 2 years ago
updated 1 week ago
Starred by Andrej Karpathy Andrej Karpathy(Founder of Eureka Labs; Formerly at Tesla, OpenAI; Author of CS 231n), Nat Friedman Nat Friedman(Former CEO of GitHub), and
32 more.

llama.cpp by ggml-org

0.4%
84k
C/C++ library for local LLM inference
created 2 years ago
updated 23 hours ago
Feedback? Help us improve.