Language Understanding and Generation
Jay Alammar, Maarten Grootendorst

#Large_Language_Models
#LLM
💻 هوش مصنوعی در همین چند سال گذشته به قابلیتهای زبانی شگفتانگیزی دست پیدا کرده است. سیستمهای هوش مصنوعی زبانی که با پیشرفتهای سریع در یادگیری عمیق هدایت میشن، میتونند متن رو بهتر از هر زمان دیگری بنویسند و درک کنند. این ترند در حال فعالسازی قابلیتها، محصولات و کل صنایع جدید است. از طریق ماهیت آموزشی و بصری این کتاب، خوانندگان ابزارها و مفاهیم کاربردی رو که برای استفاده از این قابلیتها در امروز نیاز دارند، یاد میگیرند.
شما خواهید فهمید که چطور از مدلهای زبانی بزرگ پیشآموزشدیده برای یوزکیسهایی مثل کپیرایتینگ و خلاصهسازی استفاده کنید؛ سیستمهای سرچ معنایی (Semantic Search) بسازید که فراتر از مطابقت کلمات کلیدی عمل میکنند؛ و از کتابخانههای موجود و مدلهای پیشآموزشدیده برای طبقهبندی متن، سرچ و خوشهبندی استفاده کنید.
📚 این کتاب همچنین به شما کمک میکنه تا:
📐 معماری مدلهای زبانی ترنسفورمر رو که در تولید و نمایش متن عالی هستند، درک کنید
⚙️ پایپلاینهای پیشرفته LLM رو برای خوشهبندی اسناد متنی و کاوش در موضوعاتی که پوشش میدن بسازید
🔍 موتورهای سرچ معنایی بسازید که با استفاده از روشهایی مانند بازیابی متراکم (Dense Retrieval) و ریرنکرها (Rerankers)، فراتر از سرچ کلمات کلیدی میروند
🚀 نحوه استفاده از مدلهای مولد رو، از پرامپت انجینیرینگ گرفته تا RAG (بازیابی افزوده شده با تولید)، کاوش کنید
📊 با استفاده از فاینتیونینگ مدلهای مولد، فاینتیونینگ مقابلهای (Contrastive Fine-Tuning) و یادگیری درونکانتکستی (In-Context Learning)، درک عمیقتری از نحوه آموزش LLMها و بهینهسازی اونها برای اپلیکیشنهای خاص به دست آورید
🗂️ فهرست مطالب
بخش I. درک مدلهای زبانی
فصل 1. مقدمهای بر مدلهای زبانی بزرگ
فصل 2. توکنها و امبدینگها
فصل 3. نگاهی به داخل مدلهای زبانی بزرگ
بخش II. استفاده از مدلهای زبانی پیشآموزشدیده
فصل 4. طبقهبندی متن
فصل 5. خوشهبندی متن و مدلسازی موضوعی
فصل 6. پرامپت انجینیرینگ
فصل 7. تکنیکها و ابزارهای پیشرفته تولید متن
فصل 8. سرچ معنایی و RAG
فصل 9. مدلهای زبانی بزرگ مالتیمودال
بخش III. آموزش و فاینتیونینگ مدلهای زبانی
فصل 10. ساخت مدلهای امبدینگ متن
فصل 11. فاینتیونینگ مدلهای نمایش برای طبقهبندی
فصل 12. فاینتیونینگ مدلهای تولید متن
💬 نظرات برجسته درباره کتاب
«جی و مارتن سنت خود رو در ارائه توصیفات به زیبایی تصویرسازیشده و عمیق از مباحث پیچیده در کتاب جدیدشون ادامه دادهاند. کتاب اونها که با کدهای عملی، تایملاینها و ارجاعات به مقالات کلیدی تقویت شده، یک منبع ارزشمند برای هر کسی است که به دنبال درک تکنیکهای اصلی پشت نحوه ساخت مدلهای زبانی بزرگ است.»
— اندرو ان جی، بنیانگذار DeepLearning AI
«من نمیتونم کتاب دیگهای رو تصور کنم که خوندنش در حال حاضر مهمتر از این باشه. در تکتک صفحات، من چیزی یاد گرفتم که برای موفقیت در این عصر از مدلهای زبانی حیاتی است.»
— جاش استارمر، StatQuest
«این یک راهنمای استثنایی برای دنیای مدلهای زبانی و کاربردهای عملی اونها در صنعت است. پوشش به شدت بصری این کتاب از کاربردهای مولد، نمایشی و بازیابی مدلهای زبانی، خوانندگان رو توانمند میکنه تا به سرعت LLMها رو درک کنند، به کار بگیرند و اصلاح کنند. شدیداً توصیه میشه!»
— نیلز رایمرز، مدیر یادگیری ماشین در Cohere | خالق sentence-transformers
«اگر به دنبال بهروزرسانی اطلاعات خود در همه زمینههای مربوط به LLMها هستید، جای دیگری نگردید! در این کتاب فوقالعاده، جی و مارتن شما رو از صفر تا صدِ تاریخچه و جدیدترین پیشرفتها در مدلهای زبانی بزرگ پیش میبرند. با توضیحات بصری، مثالهای عالی از زندگی واقعی، تصویرسازیهای واضح و کدهای جامع، این کتاب پرده رو از پیچیدگیهای مدلهای ترنسفورمر، توکنایزرها، سرچ معنایی، RAG و بسیاری از تکنیکهای پیشرو دیگر برمیداره. خوندنش برای هر کسی که به آخرین تکنولوژی هوش مصنوعی علاقهمنده واجبه!»
— لوئیس سرانو، دکترا، بنیانگذار و مدیرعامل Serrano Academy
«این کتاب برای هر کسی که به حوزه سریعاً در حال تکامل هوش مصنوعی مولد علاقهمنده، یک مطالعه ضروری است. با تمرکز بر هر دو نوع امبدینگ متنی و بصری، این اثر ترکیب عالی از تکامل الگوریتمی، دقت تئوری و راهنمای کاربردی است. چه دانشجو باشید، چه پژوهشگر یا متخصص صنعت، این کتاب شما رو به یوزکیسها و راهکارهای مورد نیاز برای ارتقای دانش خود در هوش مصنوعی مولد مجهز میکنه. دست مریزاد!»
— کریس فرگلی، معمار ارشد راهکارها، هوش مصنوعی مولد در AWS
✒️ درباره نویسندگان
جی آلامار مدیر و انجینیرینگ فلو در شرکت کوهیر (Cohere) است (ارائهدهنده پیشگام مدلهای زبانی بزرگ به عنوان ایپیآی). او در این نقش، به شرکتها و جامعه توسعهدهندگان درباره استفاده از مدلهای زبانی برای یوزکیسهای کاربردی مشاوره و آموزش میده. جی از طریق وبلاگ محبوب خود در زمینه هوش مصنوعی و یادگیری ماشین، به میلیونها پژوهشگر و مهندس کمک کرده تا ابزارها و مفاهیم یادگیری ماشین رو به صورت بصری درک کنند؛ از مباحث پایه (که در نهایت سر از مستندات پکیجهایی مثل نامپای و پانداز درآوردند) تا مباحث پیشرو (ترنسفورمرها، BERT ،GPT-3 و استیبل دیفیوژن). جی همچنین از خالقان دورههای محبوب یادگیری ماشین و پردازش زبان طبیعی در Deeplearning.ai و یوداسیتی است.
مارتن گروتندورست دانشمند دادههای بالینی ارشد در IKNL (سازمان جامع سرطان هلند) است. او دارای مدرک کارشناسی ارشد در روانشناسی سازمانی، روانشناسی بالینی و دیتا ساینس است که از اونها برای انتقال مفاهیم پیچیده یادگیری ماشین به مخاطبان گسترده بهره میبره. او با وبلاگهای محبوبش، با توضیح اصول پایهای هوش مصنوعی (اغلب از دیدگاه روانشناختی) به میلیونها خواننده رسیده است. او نویسنده و توسعهدهنده چندین پکیج متنباز است که به قدرت مدلهای زبانی بزرگ متکی هستند، مانند BERTopic ،PolyFuzz و KeyBERT. پکیجهای او میلیونها بار دانلود شدهاند و توسط متخصصان داده و سازمانها در سراسر جهان استفاده میشن.
AI has acquired startling new language capabilities in just the past few years. Driven by rapid advances in deep learning, language AI systems are able to write and understand text better than ever before. This trend is enabling new features, products, and entire industries. Through this book's visually educational nature, readers will learn practical tools and concepts they need to use these capabilities today.
You'll understand how to use pretrained large language models for use cases like copywriting and summarization; create semantic search systems that go beyond keyword matching; and use existing libraries and pretrained models for text classification, search, and clusterings.
This book also helps you:
Table of Contents
Part I. Understanding Language Models
Chapter 1. An Introduction to Large Language Models
Chapter 2. Tokens and Embeddings
Chapter 3. Looking Inside Large Language Models
Part II. Using Pretrained Language Models
Chapter 4. Text Classification
Chapter 5. Text Clustering and Topic Modeling
Chapter 6. Prompt Engineering
Chapter 7. Advanced Text Generation Techniques and Tools
Chapter 8. Semantic Search and Retrieval-Augmented Generation
Chapter 9. Multimodal Large Language Models
Part Ill. Training and Fine-Tuning Language Models
Chapter 10. Creating Text Embedding Models
Chapter 11. Fine-Tuning Representation Models for Classification
Chapter 12. Fine-Tuning Generation Models
"Jay and Maarten have continued their tradition of providing beautifully illustrated and insightful descriptions of complex topics in their new book. Bolstered with working code, timelines, and references to key papers, their book is a valuable resource for anyone looking to understand the main techniques behind how large language models are built."
- Andrew Ng, Founder of DeepLearning AI
"I can't think of another book that is more important to read right now. On every single page, I learned something that is critical to success in this era of language models."
-Josh Starmer, StatQuest
"This is an exceptional guide to the world of language models and their practical applications in industry. Its highly-visual coverage of generative, representational, and retrieval applications of language models empowers readers to quickly understand, use, and refine LLMs. Highly recommended!"
-Nils Reimers, Director of Machine Learning at Cohere | creator sentence-transformers
"If you're looking to get up to speed in everything regarding LLMs, look no further! In this wonderful book, Jay and Maarten will take you from zero to expert in the history and latest advances in large language models. With intuitive explanations, great real-life examples, clear illustrations, and comprehensive code labs, this book lifts the curtain on the complexities of transformer models, tokenizers, semantic search, RAG, and many other cutting-edge technologies. A must read for anyone interested in the latest AI technology!"
- Luis Serrano, PhD, Founder and CEO - Serrano Academy
"This book is a must-read for anyone interested in the rapidly-evolving field of generative AI. With a focus on both text and visual embeddings, it's a great blend of algorithmic evolution, theoretical rigor, and practical guidance. Whether you are a student, researcher, or industry professional, this book will equip you with the use cases and solutions needed to level-up your knowledge of generative AI. Well done!"
- Chris Fregly, Principal Solution Architect, Generative AI at AWS
Jay Alammar is Director and Engineering Fellow at Cohere (pioneering provider of large language models as an API). In this role, he advises and educates enterprises and the developer community on using language models for practical use cases). Through his popular AI/ML blog, Jay has helped millions of researchers and engineers visually understand machine learning tools and concepts from the basic (ending up in the documentation of packages like NumPy and pandas) to the cutting-edge (Transformers, BERT, GPT-3, Stable Diffusion). Jay is also a co-creator of popular machine learning and natural language processing courses on Deeplearning.ai and Udacity.
Maarten Grootendorst is a Senior Clinical Data Scientist at IKNL (Netherlands Comprehensive Cancer Organization). He holds master's degrees in organizational psychology, clinical psychology, and data science which he leverages to communicate complex Machine Learning concepts to a wide audience. With his popular blogs, he has reached millions of readers by explaining the fundamentals of Artificial Intelligence--often from a psychological point of view. He is the author and maintainer of several open-source packages that rely on the strength of Large Language Models, such as BERTopic, PolyFuzz, and KeyBERT. His packages are downloaded millions of times and used by data professionals and organizations worldwide.









