Spago

Spago

โ˜… 3.8 ๐Ÿ”– 1200 saves ๐Ÿ’ฐ Free GitHub

Spago is a self-contained machine learning and natural language processing library written entirely in Go. It provides automatic differentiation, neural network building blocks and ready-made transformer-era models โ€” including BERT-style encoders โ€” so Go services can train and serve NLP models without a Python runtime. It is an open-source project on GitHub with around 1,900 stars, maintained into 2025.

Overview

Go shops that need NLP usually shell out to Python microservices. Spago removes that split: it implements a computation-graph engine with reverse-mode autodiff, common layers and optimizers, and a model zoo covering tasks such as named entity recognition, question answering and text classification, plus BART and BERT architectures. Models can be trained in Go or loaded from converted weights, and everything compiles into a single static binary, which simplifies deployment for APIs and command-line tools that need embedded language intelligence.

Key Features

  • Pure-Go ML framework with automatic differentiation
  • Neural network layers, optimizers and training utilities
  • Pretrained-style models for NER, QA and classification
  • BERT and BART transformer implementations in Go
  • No Python runtime; deploys as a single static binary
  • BSD-2-Clause licensed and dependency-light

๐Ÿ’ณ Pricing

Free. Spago is open source under the BSD-2-Clause license.

Under the hood, Spago is organized around a dense tensor package with broadcasting and GPU-free CPU execution, tokenizers for preparing text, and utilities to convert and load model weights produced by other ecosystems. Example applications in the repository show complete training and inference loops, and the project emphasizes readable, hackable code โ€” it is as much a learning resource for how frameworks work as it is a production library.

Who Is It For

Go developers and platform teams who want NLP and small-model inference inside their Go services, and ML engineers curious about framework internals implemented from scratch.

๐Ÿš€ Visit Spago Official Site

๐Ÿšฉ Report an issue