OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Spago

Spago is a self-contained machine-learning and natural-language-processing library written in Go. It provides a computational graph for training and inference, automatic differentiation, neural-network layers, optimizers and Gob-compatible model serialization.

Independent OpenViST project profile, based on linked sources.

Spago — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Consider Spago when implementing neural models in Go and a self-contained computation graph is useful, especially for prototypes or applications seeking to avoid a Python dependency in production. Review the project's paused status before depending on it for ongoing development.

Who it is for

  • Go developers adding machine-learning or NLP components to applications.
  • Developers exploring neural-network computation graphs or prototyping NLP models in Go.

Documented uses

  • Implement neural computations with automatic differentiation.
  • Build models from feed-forward, recurrent and attention layers.
  • Train models using the listed gradient-descent optimizers.
  • Serialize neural models in Gob-compatible form.
Before you choose

Requirements & limits

The repository identifies the project as open source under the BSD-2-Clause license. The README requires Go 1.21 and documents acquiring the library with go get.

  • Spago uses its own computational graph for both training and inference.
  • The README lists neural layers, optimizers and Gob-compatible serialization as included capabilities.
  • The project author said in January 2024 that development was paused, citing limited maintenance capacity and the work needed to advance GPU computation.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install Spago and calculate a scalar sum with gradients

Add Spago to a Go project and use its documented example to compute a sum and backpropagate a gradient.

Before you start

  • Go 1.21

Steps

  1. Get the library with the command below.

    Documented command
    go get -u github.com/nlpodyssey/spago
  2. In a Go program, import github.com/nlpodyssey/spago/ag and github.com/nlpodyssey/spago/mat.

  3. Create gradient-enabled scalar variables with mat.Scalar, add them with ag.Add, and call c.AccGrad with a scalar gradient.

  4. Call ag.Backward(c) and inspect the result and input gradients with Value() and Grad().

Expected outcome

The README example adds 2 and 5 to produce `[7]` and reports gradients of `[0.5]` for each input when the accumulated output gradient is 0.5.

Guide limitations

  • The documented recipe covers a scalar example, not a complete application or model-training workflow.
  • The README says the project was paused in January 2024.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
14 October 2026
Original website title
nlpodyssey/spago · Official homepage title · retained in its source language

Related options

Cybertron — The Spago README points readers to Cybertron for NLP-related functionalities.

Explore project →