Skip to Content
Hands-On Large Language Models
book

Hands-On Large Language Models

by Jay Alammar, Maarten Grootendorst
September 2024
Beginner to intermediate
428 pages
10h 29m
English
O'Reilly Media, Inc.
Book available
Content preview from Hands-On Large Language Models

Chapter 4. Text Classification

A common task in natural language processing is classification. The goal of the task is to train a model to assign a label or class to some input text (see Figure 4-1). Classifying text is used across the world for a wide range of applications, from sentiment analysis and intent detection to extracting entities and detecting language. The impact of language models, both representative and generative, on classification cannot be understated.

Figure 4-1. Using a language model to classify text.

In this chapter, we will discuss several ways to use language models for classifying text. It will serve as an accessible introduction to using language models that already have been trained. Due to the broad field of text classification, we will discuss several techniques and use them to explore the field of language models:

In this chapter, we will focus on leveraging pretrained language models, models that already have been trained on large amounts of data ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Build a Large Language Model (From Scratch)

Build a Large Language Model (From Scratch)

Sebastian Raschka

Publisher Resources

ISBN: 9781098150952Errata PageSupplemental Content