tensorflow/lingvo
A modular TensorFlow framework for sequence-model research and distributed training
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Lingvo is a Python framework for building and training TensorFlow models, with an emphasis on sequence modeling. Task-specific parameter modules under lingvo/tasks/ expose named model configurations selected through --model. The pip entry point is python3 -m lingvo.trainer; a source build produces bazel-bin/lingvo/trainer. In the MNIST workflow, lingvo.tools.keras2ckpt prepares the input data, the trainer runs synchronously on CPU, and a separate --job=evaler_test process uses the same log directory to evaluate saved checkpoints.
The log layout separates run inspection from checkpoint state. control/ holds params.txt, per-layer size analysis in model_analysis.txt, the training TensorFlow GraphDef in train.pbtxt, and TensorBoard events. train/ holds the checkpoint metadata and ckpt-* files. Users can develop new model configurations on top of the pip package; changing framework internals or implementing new custom ops is better done from source.
Key Capabilities & Differentiators
Lingvo's value is in training configurations tied to specific research models. It includes LibriSpeech 960-hour grapheme and wordpiece ASR configurations; WMT14 English–German Transformer, RNMT, and XEnDec configurations; and a word-level language model using sampled softmax. The task library also includes LeNet5 for image classification, StarNet configurations for KITTI and Waymo, and Waymo DeepFusion for lidar–camera 3D detection.
The examples span local CPU training, larger machine translation runs on a GPU cluster, and training on Cloud TPU. The published GShard-related configuration lm.synthetic_packed_input.DenseLm1T16x16 targets a one-trillion-parameter language model on Cloud TPU v3-512 with 512-way model parallelism. That is a specific training configuration with synthetic packed input, not an inference throughput benchmark or evidence that arbitrary models can use the same topology.
Trade-offs & Limitations
Lingvo is most compelling when an existing research configuration saves more work than adopting its training conventions costs. For a new TensorFlow model without a Lingvo dependency, Keras is a more direct starting point. For an already-trained LLM that needs an online endpoint, a dedicated inference server is the better comparison: the Lingvo workflows here center on training, checkpointing, and evaluation rather than a request-serving API or serving performance targets.
The pip path keeps the framework fixed and is convenient for model-level customization. A Bazel build provides control over framework code and custom ops, but adds TensorFlow, compiler, and accelerator compatibility work. Backward compatibility is not guaranteed: the release history records changes to beam-search arguments and outputs, as well as layer variable initialization rules. Pin the environment and budget for migration tests rather than assuming a framework upgrade is a drop-in change.
Hardware & Deployment Guide
Start with the pip package or the image defined by docker/lib.dockerfile to run the local MNIST workflow. For framework or custom-op changes, use Bazel and docker/dev.Dockerfile as the build-environment reference. The source setup lists TensorFlow 2.7 and g++ 7.3 as the officially supported compiler; the CPU build is bazel build -c opt //lingvo:trainer, and the GPU build adds --config=cuda. These are self-managed execution paths; the larger examples require provisioning the relevant GPU cluster or Cloud TPU resources.
Do not apply the source setup's TensorFlow version to every wheel. Release 0.11.0 required TensorFlow 2.7; 0.12.0 required 2.9 and supported up to TensorFlow 2.10 and Python 3.10. Version 0.14.0 added Python 3.11+ support, raised the minimum to Python 3.9, and dropped 3.8. Pin a known-working version and validate import, training, checkpoint restore, and evaluation on the target stack before committing to a larger run.
--model selects a task parameter class; the LeNet5 example uses mnist.LeNet5 with pip and image.mnist.LeNet5 with Bazel.--run_locally=cpu --mode=sync runs the local training example; --job=evaler_test selects test evaluation, normally in a separate process.logdir/control contains parameters, layer-size analysis, a training GraphDef, and TensorBoard events; logdir/train holds checkpoint files and their index of saved checkpoints.DenseLm1T16x16 is a trillion-parameter language-model configuration with synthetic packed input, targeting 512-way model parallelism on Cloud TPU v3-512.Research teams reproducing Lingvo-based speech, translation, or language-model experiments, or extending existing task configurations on controlled TensorFlow environments.
Your primary need is a production LLM inference endpoint, or you have no Lingvo code to reuse and want a simpler TensorFlow training stack.
Quick Start & Installation
cd /tmp/mnist curl -O https://raw.githubusercontent.com/tensorflow/lingvo/master/lingvo/tasks/image/params/mnist.py python3 -m lingvo.trainer --run_locally=cpu --mode=sync --model=mnist.LeNet5 --logdir=/tmp/mnist/log
Comparison vs. Top LLMs & Inference Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| lingvo ★ | 2.9k | — | Python | Apache-2.0 | A modular TensorFlow framework for sequence-model research and distributed train |
| transformers | 169.6k | +337 | Python | Apache-2.0 | A PyTorch model-definition SDK for unified inference and training across modalit |
| tokenizers | 11.4k | +62 | Rust | Apache-2.0 | Embeddable Rust tokenization for model-compatible text encoding and decoding |
| tensorflow | 201.7k | +4 | C++ | Apache-2.0 | C++-backed ML framework for building models and embedding inference |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/tensorflow/lingvo.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about lingvo
How do I integrate a custom model, and when do I need a source build?
--model, train into a --logdir, and run --job=evaler_test against the same directory. If you need to change framework internals or add a custom TensorFlow op, use the Bazel source build.Can I start on CPU, and how should I size a GPU run?
Can we self-host Lingvo commercially or redistribute it in a product?
When should I choose Lingvo over Keras or a dedicated LLM inference server?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy