Simple Transformers

Simple Transformers

★ 3.8 🔖 1200 saves 💰 Free GitHub

Simple Transformers wraps Hugging Face Transformers in a task-oriented API that reduces training a state-of-the-art NLP model to a handful of lines. Instead of writing training loops, you instantiate a model class for your task — classification, question answering, NER and more — point it at a dataframe and train. The project has about 4,300 stars on GitHub and is still actively maintained in 2026.

Overview

The library organizes everything by task: ClassificationModel, QuestionAnsweringModel, TokenClassificationModel for named-entity recognition, MultiLabelClassificationModel, LanguageModelingModel, ConversationalModel and multi-modal variants, each with sensible defaults and every Hugging Face checkpoint available underneath. It handles tokenization, train/eval splits, metrics, logging to Weights & Biases or TensorBoard, early stopping and ONNX export for deployment. Because it sits directly on Transformers, any pretrained model — BERT, RoBERTa, T5, XLNet, ELECTRA and newer architectures — works out of the box, and advanced users can still drop down to the underlying configuration. Simple Transformers has been a staple of Kaggle solutions, teaching materials and production prototypes since 2019, precisely because it removes boilerplate without hiding the model.

Its staying power comes from covering the long tail of practical NLP work: sequence and token classification, regression, span extraction, summarization, translation, language-model fine-tuning and even image classification through multi-modal models — all behind the same three-step pattern of load data, configure, train. Sensible handling of class imbalance, sliding-window document classification for long texts and span-based QA over long contexts are built in rather than left as exercises, which is why it keeps appearing in both industry prototypes and university courses.

Key Features

  • Task-based classes for classification, QA, NER, summarization and more
  • Train and evaluate transformer models in a few lines of code
  • Any Hugging Face checkpoint usable through one consistent API
  • Built-in metrics, W&B/TensorBoard logging and early stopping
  • Multi-label, multi-modal and conversational tasks supported
  • ONNX export for deploying trained models efficiently

💳 Pricing

Simple Transformers is completely free and open source under the Apache-2.0 license.

Who Is It For

Simple Transformers is for data scientists, students and ML engineers who want to fine-tune transformer models for real tasks without hand-writing PyTorch training code.

🚀 Visit Simple Transformers Official Site

🚩 Report an issue