Transformers and Large Language Models: A Hands-On Guide to Rag and Agentic AI
暫譯: 變壓器與大型語言模型:RAG 與自主 AI 的實作指南

Gad, Ahmed Fawzy

  • 出版商: Apress
  • 出版日期: 2026-07-01
  • 售價: $2,130
  • 貴賓價: 9.5$2,023
  • 語言: 英文
  • 頁數: 348
  • 裝訂: Quality Paper - also called trade paper
  • ISBN: 9798868827846
  • ISBN-13: 9798868827846
  • 相關分類: Large language model
  • 海外代購書籍(需單獨結帳)

相關主題

商品描述

This book is a hands-on guide to understanding the foundations, architectures, and real-world applications of transformers and large language models in modern AI.

The book begins by laying the foundations of generative AI architectures, tokenization, encoding, and classical modeling techniques. Initial chapters address the evolution from feed-forward networks and recurrent neural networks to long short-term memory (LSTM), setting the stage for the revolutionary transformer architecture. The core of the book focuses on transformers, introducing the encoder-decoder framework, attention mechanisms, positional encodings, and the internal workings of multi-head attention, normalization, and multi-layer perceptrons. Readers gain insight into advanced techniques such as rotary positional embeddings (RoPE), mixture of experts (MoE), and knowledge distillation, alongside practical training strategies like self-supervised learning, fine-tuning, and reinforcement learning with human feedback. Popular models from OpenAI, DeepSeek, and other vendors are examined to highlight the evolution of the LLM landscape. Building on these foundations, the text explores methods for model customization, including parameter-efficient fine-tuning (LoRA, adapters), text generation strategies, prompt engineering, and quantization. Retrieval-Augmented Generation (RAG) is introduced as a critical innovation for grounding LLMs in external knowledge, with detailed evaluation techniques for retrieval and generation. Finally, the book ventures into Agentic AI, demonstrating protocols like Model Context Protocol (MCP) and Agent-to-Agent (A2A) interactions with practical coding examples.

In conclusion, this book serves as both a practical guide, equipping readers with the technical depth and applied strategies needed to design, fine-tune, and deploy cutting-edge transformers and large language models for real-world applications.

What we will learn:

Understand the foundations of AI, ML pipelines, tokenization, encoding, and early neural architectures.

Explore transformers in depth--encoder-decoder design, attention mechanisms, and advanced embedding methods.

Learn modern LLM advancements like RoPE, MoE, SLMs, fine-tuning strategies, and evaluation techniques.

Master practical customization through prompt engineering, PEFT methods, quantization, and text generation.

nWho this book is for:

Data scientists, ML engineers, AI researchers, and developers exploring Transformers and large language models.

商品描述(中文翻譯)

這本書是一本實用指南,旨在幫助讀者理解現代人工智慧中變壓器(transformers)和大型語言模型(large language models)的基礎、架構及其實際應用。書籍首先奠定生成式人工智慧架構、標記化(tokenization)、編碼(encoding)和傳統建模技術的基礎。初始章節探討了從前饋網絡(feed-forward networks)和遞迴神經網絡(recurrent neural networks)到長短期記憶(long short-term memory, LSTM)的演變,為革命性的變壓器架構鋪平道路。書籍的核心集中於變壓器,介紹編碼器-解碼器框架(encoder-decoder framework)、注意力機制(attention mechanisms)、位置編碼(positional encodings)以及多頭注意力(multi-head attention)、正規化(normalization)和多層感知器(multi-layer perceptrons)的內部運作。讀者將深入了解先進技術,如旋轉位置嵌入(rotary positional embeddings, RoPE)、專家混合(mixture of experts, MoE)和知識蒸餾(knowledge distillation),以及實用的訓練策略,如自我監督學習(self-supervised learning)、微調(fine-tuning)和人類反饋的強化學習(reinforcement learning with human feedback)。書中還考察了來自OpenAI、DeepSeek及其他供應商的流行模型,以突顯大型語言模型(LLM)領域的演變。在這些基礎上,文本探討了模型自定義的方法,包括參數高效微調(parameter-efficient fine-tuning, LoRA、適配器)、文本生成策略、提示工程(prompt engineering)和量化(quantization)。檢索增強生成(Retrieval-Augmented Generation, RAG)被介紹為一項關鍵創新,用於將大型語言模型與外部知識相結合,並提供詳細的檢索和生成評估技術。最後,書籍深入探討代理人工智慧(Agentic AI),展示了模型上下文協議(Model Context Protocol, MCP)和代理對代理(Agent-to-Agent, A2A)互動的協議,並提供實用的編碼範例。

總結來說,這本書既是一本實用指南,也為讀者提供了設計、微調和部署尖端變壓器及大型語言模型以應用於實際場景所需的技術深度和應用策略。

我們將學習的內容:
- 理解人工智慧(AI)、機器學習(ML)管道、標記化、編碼和早期神經架構的基礎。
- 深入探索變壓器——編碼器-解碼器設計、注意力機制和先進的嵌入方法。
- 學習現代大型語言模型的進展,如RoPE、MoE、SLMs、微調策略和評估技術。
- 精通通過提示工程、PEFT方法、量化和文本生成進行實用的自定義。

本書的讀者對象:
數據科學家、機器學習工程師、人工智慧研究人員和探索變壓器及大型語言模型的開發者。

作者簡介

Ahmed Fawzy Gad is a senior AI engineer with deep expertise in machine learning and generative AI, spanning both research and industry. He has authored five books on topics including machine learning, computer vision, and Python programming, and is the creator of PyGAD, a widely used open-source library for solving optimization problems with genetic algorithms. Renowned for simplifying complex technical concepts into clear, step-by-step guidance, Ahmed brings together practical experience and a passion for teaching to make advanced AI accessible to learners of all levels. He is based in Canada.

作者簡介(中文翻譯)

艾哈邁德·法茲·賈德(Ahmed Fawzy Gad)是一位資深的人工智慧工程師,擁有深厚的機器學習和生成式人工智慧專業知識,涵蓋研究和產業領域。他著作了五本書,主題包括機器學習、計算機視覺和Python程式設計,並且是PyGAD的創作者,這是一個廣泛使用的開源庫,用於利用遺傳演算法解決優化問題。艾哈邁德以將複雜的技術概念簡化為清晰的逐步指導而聞名,結合了實踐經驗和對教學的熱情,使高級人工智慧對各級學習者都能夠輕鬆接觸。他目前居住在加拿大。