Transformers in Action
eBook - ePub

Transformers in Action

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

Transformers in Action

About this book

Understand the architecture that underpins today’s most powerful AI models.

Transformers are the superpower behind large language models (LLMs) like ChatGPT, Gemini, and Claude. Transformers in Action gives you the insights, practical techniques, and extensive code samples you need to adapt pretrained transformer models to new and exciting tasks.

Inside Transformers in Action you’ll learn:

• How transformers and LLMs work
• Modeling families and architecture variants
• Efficient and specialized large language models
• Adapt HuggingFace models to new tasks
• Automate hyperparameter search with Ray Tune and Optuna
• Optimize LLM model performance
• Advanced prompting and zero/few-shot learning
• Text generation with reinforcement learning
• Responsible LLMs

Transformers in Action takes you from the origins of transformers all the way to fine-tuning an LLM for your own projects. Author Nicole Koenigstein demonstrates the vital mathematical and theoretical background of the transformer architecture practically through executable Jupyter notebooks. You’ll discover advice on prompt engineering, as well as proven-and-tested methods for optimizing and tuning large language models. Plus, you’ll find unique coverage of AI ethics, specialized smaller models, and the decoder encoder architecture.

Foreword by Luis Serrano.

About the technology

Transformers are the beating heart of large language models (LLMs) and other generative AI tools. These powerful neural networks use a mechanism called self-attention, which enables them to dynamically evaluate the relevance of each input element in context. Transformer-based models can understand and generate natural language, translate between languages, summarize text, and even write code—all with impressive fluency and coherence.

About the book

Transformers in Action introduces you to transformers and large language models with careful attention to their design and mathematical underpinnings. You’ll learn why architecture matters for speed, scale, and retrieval as you explore applications including RAG and multi-modal models. Along the way, you’ll discover how to optimize training and performance using advanced sampling and decoding techniques, use reinforcement learning to align models with human preferences, and more. The hands-on Jupyter notebooks and real-world examples ensure you’ll see transformers in action as you go.

What's inside

• Optimizing LLM model performance
• Adapting HuggingFace models to new tasks
• How transformers and LLMs work under the hood
• Mitigating bias and responsible ethics in LLMs

About the reader

For data scientists and machine learning engineers.

About the author

Nicole Koenigstein is the Co-Founder and Chief AI Officer at the fintech company Quantmate.

Table of Contents

Part 1
1 The need for transformers
2 A deeper look into transformers
Part 2
3 Model families and architecture variants
4 Text generation strategies and prompting techniques
5 Preference alignment and retrieval-augmented generation
Part 3
6 Multimodal models
7 Efficient and specialized small language models
8 Training and evaluating large language models
9 Optimizing and scaling large language models
10 Ethical and responsible large language models

Trusted by 375,005 students

Access to over 1.5 million titles for a fair monthly price.

Study more efficiently using our study tools.

Information

Publisher
Manning
Year
2025
eBook ISBN
9781638358015

Table of contents

  1. Transformers in Action
  2. copyright
  3. contents
  4. foreword
  5. preface
  6. acknowledgments
  7. about this book
  8. about the author
  9. about the cover illustration
  10. Part 1 Foundations of modern transformer models
  11. 1 The need for transformers
  12. 2 A deeper look into transformers
  13. Part 2 Generative transformers
  14. 3 Model families and architecture variants
  15. 4 Text generation strategies and prompting techniques
  16. 5 Preference alignment and retrieval-augmented generation
  17. Part 3 Specialized models
  18. 6 Multimodal models
  19. 7 Efficient and specialized small language models
  20. 8 Training and evaluating large language models
  21. 9 Optimizing and scaling large language models
  22. 10 Ethical and responsible large language models
  23. references

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn how to download books offline
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.5M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1.5 million books across 990+ topics, we’ve got you covered! Learn about our mission
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more about Read Aloud
Yes! You can use the Perlego app on both iOS and Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app
Yes, you can access Transformers in Action by Nicole Koenigstein in PDF and/or ePUB format, as well as other popular books in Computer Science & Data Processing. We have over 1.5 million books available in our catalogue for you to explore.