50 ML Projects To Understand LLMs: Investigate transformer mechanisms through data analysis, visualization, and experimentation
暫譯: 50 個機器學習專案以理解大型語言模型:透過數據分析、視覺化和實驗探究變壓器機制
Cohen, Mike X.
- 出版商: Packt Publishing
- 出版日期: 2026-05-29
- 售價: $1,870
- 貴賓價: 9.5 折 $1,776
- 語言: 英文
- 頁數: 566
- 裝訂: Quality Paper - also called trade paper
- ISBN: 1808082559
- ISBN-13: 9781808082559
-
相關分類:
Large language model
海外代購書籍(需單獨結帳)
商品描述
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
商品描述(中文翻譯)
大多數書籍教你如何從零開始構建大型語言模型(LLMs)或通過 API 部署它們。本書則使用引導式機器學習專案來教你如何理解、視覺化和研究 LLM,包括 GPT 和 BERT。
主要特色:
- 每個專案圍繞三個學習目標構建:機器學習技術、LLM 機制和使用 Python 進行數據視覺化的編碼。
- 這不是一本密集的理論教科書;它是實踐性強、以專案為導向的。
- 你將學會如何直接測量、視覺化和操作 LLM 的內部組件。
書籍描述:
通過 50 個以 Python 解決的實踐引導專案,你將通過將 LLM 的隱藏狀態、注意力模式和嵌入視為數據進行分析,來研究大型語言模型的內部機制。與其接受 LLM 作為黑箱,你將打開它們,檢查裡面的內容,並進行實驗以了解它們為何以特定方式運作。所有專案均基於 Python(使用 NumPy、PyTorch、statsmodels、scikit-learn、Matplotlib、Pandas 和 Seaborn 等庫),並附有完整解決方案和部分解決方案的筆記本文件,讓你可以練習並提升在數據科學、深度學習、數據視覺化以及科學和統計編碼方面的技能。
你將學到的內容:
- 令牌化方案及其統計特性
- 嵌入空間:餘弦相似度、語義軸和類比向量
- 輸出 logits、softmax 分佈、困惑度和語言偏見
- 層級變壓器動態和維度
- 注意力機制:QKV 權重、注意力分數、頭部消融和激活修補
- MLP 子模塊:神經元調整、互信息、子空間分析和基於統計的因果操作
- Logit 鏡頭、間接物體識別和因果追蹤
本書適合誰:
本書適合希望超越 LLM 表面理解的數據科學家、機器學習工程師和研究人員。需要具備 Python 的基礎經驗。對機器學習或深度學習的熟悉程度有幫助,但不是必需的——技術會在專案中隨著出現而介紹。
目錄
- 介紹
- 令牌化
- 嵌入
- 輸出 logits
- 變壓器輸出
- 注意力
- MLP