Most books teach you how to build LLMs from scratch or deploy them via APIs. This book does uses guided machine learning projects to teach you how to understand, visualize, and investigate LLMs including GPT and BERT.
Key Features:
- Each project is built around three learning goals: machine learning techniques, LLM mechanisms, and Python coding with data visualization.
- This is not a dense theoretical textbook; it's hands-on, practical, and project-oriented.
- You will learn how to measure, visualize, and manipulate the internal components of LLMs directly.
Book Description:
Through 50 hands-on, guided projects solved in Python, you will investigate the internal mechanisms of large language models by treating their hidden states, attention patterns, and embeddings as data to analyze. Rather than accepting LLMs as black boxes, you will open them up, examine what's inside, and run experiments to understand why they behave the way they do. All projects are based on Python (using libraries such as NumPy, PyTorch, statsmodels, scikit-learn, Matplotlib, Pandas, and Seaborn) and come with full solutions and partial solution notebook files, so you can practice and improve your skills in data science, deep learning, data visualization, and scientific and statistical coding.
What You Will Learn:
- Tokenization schemes and their statistical properties
- Embedding spaces: cosine similarity, semantic axes, and analogy vectors
- Output logits, softmax distributions, perplexity, and language biases
- Layer-by-layer transformer dynamics and dimensionality
- Attention mechanisms: QKV weights, attention scores, head ablation, and activation patching
- MLP subblocks: neuron tuning, mutual information, subspace analysis, and statistics-based causal manipulations
- Logit lens, indirect object identification, and causal tracing
Who this book is for:
This book is for data scientists, ML engineers, and researchers who want to go beyond surface-level understanding of LLMs. Prior Python experience is required. Familiarity with machine learning or deep learning is helpful but not required - techniques are introduced as they arise throughout the projects.
Table of Contents
- Introductions
- Tokenization
- Embeddings
- Output logits
- Transformer outputs
- Attention
- MLP
外文書商品之書封,為出版社提供之樣本。實際出貨商品,以出版社所提供之現有版本為主。部份書籍,因出版社供應狀況特殊,匯率將依實際狀況做調整。
無庫存之商品,在您完成訂單程序之後,將以空運的方式為你下單調貨。為了縮短等待的時間,建議您將外文書與其他商品分開下單,以獲得最快的取貨速度,平均調貨時間為1~2個月。
為了保護您的權益,「三民網路書店」提供會員七日商品鑑賞期(收到商品為起始日)。
若要辦理退貨,請在商品鑑賞期內寄回,且商品必須是全新狀態與完整包裝(商品、附件、發票、隨貨贈品等)否則恕不接受退貨。