liveBook · Manning

Transformers

As explained in Transformers in Action

Transformers is an open-source software library for using pretrained transformer models across machine-learning tasks.

Transformers is Hugging Face’s open-source library for applying pretrained models to language tasks such as translation, text generation, classification, and sentiment analysis. section 1.2 section 1.3

Pretrained models learn language patterns from extensive datasets, letting practitioners adapt existing knowledge to a specific task instead of training from scratch. This reduces time and computational cost. section 1.2

The library supports practical transformer workflows:

  • Fine-tune a pretrained model with a labeled dataset, such as sentence pairs marked neutral, negative, or positive for sentiment analysis. section 1.2 section 1.3
  • Use zero-shot learning for tasks absent from specific training, or few-shot learning when only a small task-specific dataset is available. section 1.3
  • Run computationally intensive training and inference with GPUs, including cloud GPU access through Google Colab. section 1.2

Sentiment analysis

Given sentence-and-label pairs for neutral, negative, and positive sentiment, adapt a pretrained transformer rather than building and training a model from scratch. section 1.2 section 1.3

How Transformers in Action covers it

How deep it goes
Explains pretrained-model use, fine-tuning, learning modes, and GPU requirements without detailing model internals or implementation code.
Examples
Uses translation, text generation, text classification, sentiment analysis, labeled sentence pairs, Google Colab, and GPU computation as examples.
What you can do after
Apply it via Hugging Face to adapt pretrained models for specific tasks while reducing training time and computational resources.
How it connects
Connects pretrained models with fine-tuning, sentiment analysis, LSTM-based architectures, zero-shot learning, few-shot learning, GPUs, and NLP.

Also explained in

Compare how 6 books explain transformers →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Transformers in Action. The section links point to the parts of the book it draws on.