seqio
SeqIO: Task-based datasets, preprocessing, and evaluation for sequence models.
What it is and what it does
SeqIO is a library for constructing data pipelines for sequence models, built on top of TensorFlow's tf.data.Dataset. It abstracts away the complexity of loading raw data, applying preprocessing steps, tokenizing features with custom vocabularies, and computing evaluation metrics into a unified Task interface. The library was originally extracted from the T5 model's data pipeline and refactored for general use.
The package is designed to work primarily with sequential data—text and audio are naturally supported, and images can be used if represented as sequences. While it uses TensorFlow internally, SeqIO can output datasets as numpy iterators, making it fully compatible with JAX, PyTorch, and other frameworks. You define a Task by specifying a data source (TFDS, text files, TFRecord, or custom functions), preprocessing steps, output feature definitions with vocabularies, and metric functions, then use seqio.get_dataset to obtain a ready-to-use tf.data.Dataset.
Use it for:
- Building machine translation pipelines with preprocessing and BLEU evaluation for sequence-to-sequence models
- Creating text-to-text task datasets with custom tokenization and prompt formatting for transfer learning
- Preprocessing benchmark datasets from TensorFlow Datasets with task-specific metrics for model evaluation
- Combining multiple tasks into a Mixture for multi-task learning with unified data handling
- Converting raw text or audio files into tokenized sequences with vocabulary management for downstream models
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
SeqIO builds scalable data pipelines for sequence models using TensorFlow's tf.data.Dataset, with support for preprocessing, tokenization, and evaluation metrics, while remaining compatible with JAX, PyTorch, and other frameworks.
Yes, if you are building sequence models (NLP, audio, or sequence-based vision) and want a structured, reusable way to manage data pipelines with built-in preprocessing and evaluation. The low install friction and active maintenance support this. However, the 11 runtime dependencies—particularly TensorFlow, JAX, and TensorFlow Text—make it heavy for lightweight use cases; consider it only if you need task-based dataset abstraction and don't already have a simpler pipeline in place.
Install
seqio on PyPI
pip
pip install seqiouv
uv add seqiopoetry
poetry add seqioInstalling seqio
Before you install
Low friction installation with a pure-Python wheel. The package is actively maintained with recent releases and moderate popularity (top_15000 tier), though it carries 11 runtime dependencies including JAX, TensorFlow, and TensorFlow Text, which may add setup complexity in constrained environments.
License in practice
Licensed under Apache 2.0 (permissive), allowing free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install seqio
import seqio
import tensorflow as tf
task = seqio.TaskRegistry.add(
"example_task",
seqio.TfdsDataSource(tfds_name="dataset_name"),
output_features={
'inputs': seqio.Feature(seqio.PassThroughVocabulary(), dtype=tf.int32),
'targets': seqio.Feature(seqio.PassThroughVocabulary(), dtype=tf.int32),
}
)
dataset = seqio.get_dataset("example_task", batch_size=32)
Requires TensorFlow, JAX, and TensorFlow Text as runtime dependencies; compatible with other frameworks via numpy iterator conversion but TensorFlow installation is mandatory.
Verify before relying
- Minimum Python version requirement (requires_python is unspecified in metadata)
- Whether all 11 runtime dependencies are truly required for basic usage or if some are optional
- Performance characteristics and scalability limits for very large datasets
Package facts
| License | Apache 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 11 — absl-py, clu, editdistance, jax, jaxlib, numpy, packaging, pyglove, sentencepiece, tensorflow-text, tensorflow-datasets |
| Maintenance | actively maintained — 351 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 301,423/month — #7,837 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: seqio-0.0.20-py2.py3-none-any.whl
Keywords: sequence, preprocessing, nlp, machinelearning
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
seqio-nightlySeqIO provides task-based data pipelines for…
permissive · top 15,000 on PyPI
tensorflow-datasetsProvides access to many public datasets as…
permissive · top 5,000 on PyPI
tfds-nightlyProvides a library of ready-to-use public…
permissive · top 15,000 on PyPI
tensorflow-textTensorFlow Text provides text preprocessing…
permissive · top 5,000 on PyPI
Keras-PreprocessingProvides data preprocessing and augmentation…
permissive · top 5,000 on PyPI
datasetsLoads and preprocesses datasets from the…
permissive · top 1,000 on PyPI
torchtexttorchtext provides text datasets, preprocessing…
permissive · top 15,000 on PyPI
unitxtUnitxt provides a unified framework for…
permissive · top 15,000 on PyPI
keras-nlpKeras-NLP provides pretrained models and…
permissive · top 15,000 on PyPI
tensorflow-recommendersTensorFlow Recommenders provides a Keras-based…
permissive · top 15,000 on PyPI