Building Applications with Large Language Models: Techniques, Implementation, and Applications
معرفی کتاب «Building Applications with Large Language Models: Techniques, Implementation, and Applications» نوشتهٔ Alina Not و Bhawna Singh، منتشرشده توسط نشر Apress L. P. در سال 2024. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.
This book delves into a broad spectrum of topics, covering the foundational aspects of Large Language Models (LLMs) such as PaLM, LLaMA, BERT, and GPT, among others. The book takes you through the complexities involved in creating and deploying applications based on LLMs, providing you with an in-depth understanding of the model architecture. You will explore techniques such as fine-tuning, prompt engineering, and retrieval augmented generation (RAG). The book also addresses different ways to evaluate LLM outputs and discusses the benefits and limitations of large models. The book focuses on the tools, techniques, and methods essential for developing Large Language Models. It includes hands-on examples and tips to guide you in building applications using the latest technology in Natural Language Processing (NLP). It presents a roadmap to assist you in navigating challenges related to constructing and deploying LLM-based applications. By the end of the book, you will understand LLMs and build applications with use cases that align with emerging business needs and address various problems in the realm of language processing. What You Will Learn Be able to answer the question: What are Large Language Models? Understand techniques such as prompt engineering, fine-tuning, RAG, and vector databases Know the best practices for effective implementation Know the metrics and frameworks essential for evaluating the performance of Large Language Models Who This Book Is For An essential resource for AI-ML developers and enthusiasts eager to acquire practical, hands-on experience in this domain; also applies to individuals seeking a technical understanding of Large Language Models (LLMs) and those aiming to build applications using LLMs Table of Contents About the Author About the Technical Reviewer Acknowledgments Introduction Chapter 1: Introduction to Large Language Models Understanding NLP Text Preprocessing Data Transformation History of LLMs Language Model Rule-Based Language Models Statistical Language Models N-gram Model Neural Language Models Word Embeddings RNN and LSTM Transformer Applications of LLMs Conclusion Chapter 2: Understanding Foundation Models Generations of AI Foundation Models Building Foundation Models Benefits of Foundation Models Transformer Architecture Self-Attention Mechanism What Is Self-Attention? How Does Self-Attention Work? Building Self-Attention from Scratch Multi-head Attention Positional Encoding Add and Norm Feed-Forward Network Encoder and Decoder Types of Transformers Conclusion Chapter 3: Adapting with Fine-Tuning Decoding the Fine-Tuning Instruction Tuning or Supervised Fine-Tuning (SFT) Instruction Fine-Tuned Models Understanding GPU for Fine-Tuning What Is a GPU? GPU Usage Alignment Tuning Parameter Efficient Model Tuning (PEFT) Adapter Tuning Soft Prompting Low-Rank Adaptation (LoRA) QLoRA Conclusion Chapter 4: Magic of Prompt Engineering Understanding a Prompt Introduction Key Characteristics of a Prompt Understanding OpenAI API for Chat Completion Required Parameters Optional Parameters Techniques in Prompt Engineering Zero-Shot Prompting Few-Shot Prompting Chain-of-Thought (CoT) Prompting Self-Consistency Tree-of-Thought (ToT) Prompting Generated Knowledge Prompt Chaining Design Principles for Writing the Best Prompts Principle 1: Clarity Principle 2: Style of Writing Principle 3: Ensuring Fair Response Conclusion Chapter 5: Stop Hallucinations with RAG Retrieval Document Understanding Chunking Chunk Transformation and Metadata Embeddings Search Augmentation Generation Conclusion Chapter 6: Evaluation of LLMs Introduction Evaluating the LLM Basic Capability: Language Modeling Advanced Capabilities: Language Translation Benchmark Dataset for Translation Advanced Capabilities: Text Summarization Benchmark Dataset for Summarization Advanced Capabilities: Programming Benchmark Datasets for Programming Advanced Capabilities: Question Answering Based on Pre-training Benchmark Datasets for Question Answering Based on Pre-training Advanced Capabilities: Question Answering Based on Evidence Benchmark Datasets for Question Answering Based on Evidence Advanced Capabilities: Commonsense Reasoning Benchmark Datasets for Commonsense Reasoning Advanced Capabilities: Math Benchmark Datasets for Math LLM-Based Application: Fine-Tuning LLM-Based Application: RAG-Based Application LLM-Based Application: Human Alignment Conclusion Chapter 7: Frameworks for Development Introduction LangChain What Is LangChain? Why Do You Need a Framework like LangChain? How Does LangChain Work? What Are the Key Components of LangChain? What Is the Model Component? What Are Prompts? What Are Indexes? What Are Chains? What Are Agents? What Is Memory? Conclusion Chapter 8: Run in Production Introduction MLOps LLMOps Prompts and the Problems Safety and Privacy Latency Conclusion Chapter 9: The Ethical Dilemma Known Risk Category Bias and Stereotypes Sources of Bias in AI Examples of bias in LLMs Example 1 Example 2 Example 3 Solutions to Manage Bias Security and Privacy User Enablement Security Attacks Privacy Data Leakage Copyright Issues Examples Related to Security and Privacy Issues Misinformation Prompt Injection Data Leakage Copyright Issue Transparency Environmental Impact The EU AI Act Conclusion Chapter 10: The Future of AI Perception of People About GenAI Impact on People Resource Readiness Quality Standards Need of a Regulatory Body Emerging Trends in GenAI Multimodality Longer Context Windows Agentic Capabilities Conclusion Index df-0.png
دانلود کتاب Building Applications with Large Language Models: Techniques, Implementation, and Applications