part two

Part 2 Generative transformers

 

Large language models excel at processing and understanding natural language, enabling them to produce remarkable text outputs. This includes generating creative prompts for poems, crafting factual prompts with clarity, and effectively summarizing given texts in an organized and logical way.

In part 1, we examined the architecture and inner workings of Transformer models, revealing their unique design decisions and mechanisms. In this second part of the book, we will expand upon this knowledge. We will begin by exploring the major architectural variants that have evolved from the original Transformer, including decoder-only, encoder-only, and Mixture of Experts (MoE) models, and how to select the right one for a specific task. We’ll then dive into the art and science of text generation, investigating the decoding and sampling strategies that control an LLM’s creativity, fluency, and coherence.

We will also take a deep dive into prompt engineering, a powerful form of in-context learning that allows you to control a model’s output without altering its underlying algorithms. This section will cover effective prompting techniques.