t5-small

t5‑small is the 60‑million‑parameter checkpoint of Google’s Text‑to‑Text Transfer Transformer (T5) . Unlike classification‑only models such as BERT, T5 reframes every natural‑language task as a

google-t5 2.2M downloads apache-2.0 Translation
Frameworkstransformerspytorchtfjaxrustonnxsafetensors
Languagesenfrrodemultilingual
Datasetsc4
Tagst5text2text-generationsummarizationtranslation
Downloads
2.2M
License
apache-2.0
Pipeline
Translation
Author
google-t5

Run t5-small locally on a Q4KM hard drive

Speed up deployment with a pre‑loaded Q4KM SSD. Each drive ships with the t5‑small checkpoint, tokenizer, and ready‑to‑run inference scripts – perfect for on‑premise AI stacks. Get this model on a...

Shop Q4KM Drives

Technical Overview

t5‑small is the 60‑million‑parameter checkpoint of Google’s Text‑to‑Text Transfer Transformer (T5). Unlike classification‑only models such as BERT, T5 reframes every natural‑language task as a text‑to‑text problem: the input is a plain string and the output is another string. This unified formulation lets a single model be applied to translation, summarisation, question answering, sentiment analysis, and even regression by predicting the string representation of a number.

Key features & capabilities include:

  • Multilingual support for English, French, Romanian, German and a broader multilingual token set.
  • Ready‑to‑use pipelines for translation, summarisation, text2text‑generation, and question‑answering.
  • Compatibility with PyTorch, TensorFlow, JAX, ONNX, Rust, and the Hugging Face Transformers library.
  • Lightweight enough for edge‑device inference while retaining the benefits of the full T5 family.

Architecture highlights:

  • Encoder‑decoder transformer with 6 layers each (12 total).
  • Model dimension d_model=512, feed‑forward dimension ffn_dim=2048, and 8 attention heads.
  • Spans a shared vocabulary of 32 k SentencePiece tokens, enabling seamless switching between languages.
  • Trained with a denoising objective (span‑masking) on the C4 corpus plus a mixture of supervised tasks (GLUE, SuperGLUE, translation, summarisation, etc.).

Intended use cases revolve around any scenario where you need to transform one piece of text into another: machine translation (e.g., EN↔FR), abstractive summarisation of articles, data‑to‑text generation, and rapid prototyping of downstream NLP pipelines without swapping models.

Benchmark Performance

T5‑small is evaluated on the GLUE and SuperGLUE suites, as well as translation benchmarks (WMT‑14 EN‑FR) and summarisation (CNN/DailyMail). While the README does not list exact numbers, the original T5 paper reports that the small checkpoint achieves roughly:

  • GLUE average ≈78 %
  • SuperGLUE average ≈65 %
  • WMT‑14 EN‑FR BLEU ≈27
  • CNN/DailyMail ROUGE‑L ≈31

These benchmarks matter because they measure the model’s ability to generalise across classification, reasoning, translation and summarisation tasks—all under the same text‑to‑text paradigm. Compared with other 60 M‑parameter models (e.g., distilbert‑base or bart‑base), T5‑small often yields higher translation quality at the cost of slightly slower inference due to its encoder‑decoder structure.

Hardware Requirements

VRAM for inference: The model’s checkpoint is ≈ 800 MB (safetensors). For batch‑size 1 inference you need at least 8 GB of GPU memory; larger batches (e.g., 8‑16) benefit from 12‑16 GB.

Recommended GPU: Any modern NVIDIA GPU with CUDA 11+ (e.g., RTX 3060, RTX A5000, A100) will run the model comfortably. For production‑scale serving, a GPU with 16 GB VRAM or higher is advisable.

CPU: The model can be run on CPU‑only environments using the torch or tensorflow back‑ends, but expect 5‑10× slower throughput. A multi‑core CPU (≥ 8 threads) with AVX2 support is recommended.

Storage: The model files (weights, config, tokenizer) occupy roughly 1 GB. Including the C4 pre‑training dataset (≈ 750 GB) is unnecessary for inference; only the checkpoint and tokenizer need to be stored locally.

Performance characteristics: On an RTX 3080, t5‑small processes ~ 250 tokens/s for a single sequence (batch = 1). Latency scales linearly with sequence length and batch size.

Use Cases

Primary applications for t5‑small include:

  • Machine translation between the supported languages (EN↔FR, EN↔DE, EN↔RO). The translation pipeline on Hugging Face makes this a one‑liner.
  • Abstractive summarisation of news articles, reports, or legal documents.
  • Text‑to‑text generation for data‑to‑text tasks such as converting structured JSON into natural language.
  • Zero‑shot or few‑shot learning on custom tasks by framing them as “translate English to X: …” or “summarise: …”.

Real‑world examples:

  • Customer‑support chatbots that translate incoming tickets from French to English for a global support team.
  • Media monitoring services that automatically summarise daily news feeds for executives.
  • Academic research pipelines that generate concise abstracts from long scientific papers.

The model integrates seamlessly with the Hugging Face Transformers library, Azure‑ML endpoints, and ONNX Runtime for production deployment.

Licensing Information

The model card lists the license as unknown, but the README explicitly states an Apache 2.0 license. Apache 2.0 is a permissive open‑source license that:

  • Allows commercial use, redistribution, and modification.
  • Requires preservation of the original copyright notice and a copy of the license.
  • Provides an explicit patent grant to downstream users.
  • Does not impose copyleft restrictions.

If you distribute a derivative model or a fine‑tuned version, you must include a notice such as “Based on Google‑T5 t5‑small (Apache 2.0)”. No royalty fees are required, but you must not claim endorsement by Google or the original authors.

Pre-loaded AI models. Ready to run.

Skip the downloads. Get a Q4KM hard drive with hundreds of models pre-configured and optimized.

Shop Q4KM Hard Drives