liveBook · Manning

BART

As explained in Causal AI

BART is a denoising sequence-to-sequence transformer language model developed for generating text from input text.

BART is a Transformer sequence-to-sequence model that maps an input text sequence to a corresponding output, supporting tasks such as translation, summarization, and vignette generation. Its encoder-decoder structure makes it suitable for representing conditional text distributions rather than only completing text from an empty prompt. section 13.3.2

In a causal language model, fine-tuning aligns pretrained language generation with a causal Markov kernel. A BART model can generate a Prince’s action from a King’s action, generate a Kingdom’s fate from both actions, or infer a King’s action from a Prince’s action. Hugging Face Transformers supplies tokenization, pretrained weights, and sequence-to-sequence training utilities. section 13.3.2

Conditional story generation

Fine-tune separate BART models on paired King–Prince and action–fate vignettes, then generate a full story by passing each generated sequence to the next model. PyTorch and Seq2SeqTrainer support tokenization, validation splits, training, generation, and log-probability calculations. section 13.3.2

Figure 13.6 A BART sequence-to-sequence model is fine-tuned to represent the Prince’s action given the King’s action.
figure

Shows BART mapping the King’s action vignette to the Prince’s action. section 13.3.2

How Causal AI covers it

How deep it goes
Explains sequence mapping, fine-tuning, tokenization, training, generation, and log probabilities, but does not derive Transformer internals.
Examples
Uses King, Prince, and Kingdom action vignettes as paired inputs, targets, and generated story components.
What it assumes
Assumes familiarity with pretrained models, tokenization, paired datasets, and causal graphs while demonstrating the training workflow.
What you can do after
Builds and fine-tunes BART sequence-to-sequence models with Hugging Face Transformers for conditional text generation.
How it connects
Connects BART with sequence-to-sequence learning, causal Markov kernels, tokenization, PyTorch, Hugging Face Transformers, and Pyro.

Also explained in

Compare how 2 books explain BART →

Related concepts

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