#7070th of 75 in ML frameworks and libraries
sonnet
Module-based neural network library on top of TensorFlow 2
Documentation ↗
(opens in a new tab)Website ↗
(opens in a new tab)Repository on GitHub ↗
(opens in a new tab)
- Stars
- 10k
- License
- Apache-2.0
- Last commit
- Oct 2026
- Last release
- Jan 2024
- Language
- Python
9,872 on 31 Mar 20269,977 on 20 Oct 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
Sonnet is a DeepMind library that provides a single abstraction, snt.Module, for building neural networks in TensorFlow 2. It ships predefined modules such as Linear, Conv2D, BatchNorm and nets.MLP, and deliberately includes no training framework. Serialization goes through TensorFlow checkpoints and SavedModel, and distributed training uses TensorFlow distribution strategies.
Who it is for: ML researchers building custom neural networks in TensorFlow 2
Strengths
- Small API centered on one concept, snt.Module, with parameters created on first call
- Modules work with tf.train.Checkpoint and tf.saved_model without extra glue
- Behaves identically under distribution strategies; gradient reduction is left to the user
- Colab examples for MNIST MLP, GAN and multi-GPU CIFAR-10
Weaknesses
- Requires TensorFlow 2; no other backend is mentioned in the README
- No built-in training loop, so users write their own optimizer and training code
- Last release was 2024-01-02, despite recent commits
- Distributed training needs manual gradient all-reduce or distribution-aware modules
What it needs
- GPU optional
- Needs tensorflow, tensorflow-probability
- Models: TensorFlow checkpoints, TensorFlow SavedModel, pickle
Also in ML frameworks and libraries
See all 75| Rank | Project | Score |
|---|---|---|
| 1 | transformersPython library defining open models for text, vision, audio and multimodal tasks | 94 out of 100 |
| 2 | pytorchPython tensor library with GPU support and tape-based autograd for deep learning | 94 out of 100 |
| 3 | ultralyticsPython library and CLI for training and running YOLO vision models | 92 out of 100 |
| #4 | pytorch-image-modelsPyTorch library of image models, pretrained weights and reference training scripts | 91 out of 100 |
| #5 | supervisionPython toolkit for loading, annotating and counting computer vision detections | 90 out of 100 |