liveBook · Manning

Language modeling

As explained in The Art of AI Product Development

Language modeling is the task of predicting or generating text units from surrounding or preceding textual context.

Language modeling predicts missing or following words from textual context, then generates successive tokens into a complete text that is hopefully coherent and correct. Its raw objective does not necessarily produce a helpful conversational response. section 5.1.2

The objective appears in several forms:

  • Sequence-to-sequence transduction translates one representation into another, supporting machine translation, summarization, and code generation. section 5.1.2
  • Autoregression predicts the next token from preceding tokens, with unidirectionality limiting the available learning signal. section 5.1.2
  • Autoencoding is named as another language-modeling objective, alongside sequence-to-sequence transduction and autoregression. section 5.1.2

Raw continuation versus conversation

Alex receives correct English from Mistral but not a helpful conversational turn, while ChatGPT responds conversationally and completes its sentences. Different training objectives explain the contrast. section 5.1.2

Figure 5.3 The objective of language modeling is to predict words based on their context.
A close-up of a screen

AI-generated content may be incorrect.

Use the context illustration to see language modeling as predicting words from surrounding textual information. section 5.1.2

How The Art of AI Product Development covers it

How deep it goes
Defines context-based prediction and distinguishes three objectives, but does not fully elaborate autoencoding in the supplied treatment.
Examples
Uses Mistral, ChatGPT, machine translation, summarization, code generation, and context-prediction illustrations.
What you can do after
Evaluate language-model outputs by distinguishing raw continuation behavior from conversational behavior shaped by fine-tuning.
How it connects
Connects language modeling to autoregression, autoencoding, sequence-to-sequence transduction, transformers, and fine-tuning.

Also explained in

Compare how 4 books explain language modeling →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Art of AI Product Development. The section links point to the parts of the book it draws on.