Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: 【澳大利亚】路易斯·汤斯顿 【瑞士】莱安德罗·冯·韦拉 【法】托马斯·沃尔夫

本书涵盖了Transformer在NLP领域的主要应用。首先介绍Transformer模型和Hugging Face生态系统。然后重点介绍情感分析任务以及Trainer API、Transformer的架构,并讲述了在多语言中识别文本内实体的任务,以及Transformer模型生成文本的能力,还介绍了解码策略和度量指标。 接着深入挖掘了文本摘要这个复杂的序列到序列的任务,并介绍了用于此任务的度量指标。之后聚焦于构建基于评论的问答系统,介绍如何基于Haystack进行信息检索,探讨在缺乏大量标注数据的情况下提高模型性能的方法。最后展示如何从头开始构建和训练用于自动填充Python源代码的模型,并总结Transformer面临的挑战以及将这个模型应用于其他领域的一些新研究。

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
【One-Line Pitch】 A hands-on guide for NLP practitioners and developers who want to master Transformer models through the Hugging Face ecosystem, covering everything from sentiment analysis to building custom code-generation models with practical code examples. 【Book Arc】 - **Opening (~0%–10%)**: Introduces the Transformer architecture and the Hugging Face ecosystem, establishing foundational concepts and tooling for readers new to modern NLP. - **Early (~10%–30%)**: Focuses on sentiment analysis as the first practical task, walking through the Trainer API and Transformer architecture details, then expanding to multilingual named entity recognition. - **Middle (~30%–50%)**: Explores text generation capabilities, including decoding strategies and evaluation metrics, before diving into the complex sequence-to-sequence task of text summarization with its specialized metrics. - **Late (~50%–70%)**: Builds a review-based question answering system using Haystack for information retrieval, addressing the challenge of limited labeled data and techniques to improve model performance under such constraints. - **Ending (~70%–100%)**: Demonstrates building and training a model from scratch for auto-completing Python source code, then concludes with challenges facing Transformers and emerging research directions applying these models to other domains. 【Key Takeaways】 - **Hugging Face Transformers is the central toolkit** (Early): The library simplifies access to pretrained models, making state-of-the-art NLP accessible without deep expertise in model internals. - **The Trainer API streamlines fine-tuning** (Early): This high-level interface handles training loops, evaluation, and checkpointing, letting practitioners focus on data and task configuration rather than boilerplate code. - **Sentiment analysis serves as the gateway task** (Early): It introduces the full pipeline—tokenization, model loading, training, and inference—in a straightforward context before tackling harder problems. - **Multilingual models handle entity recognition across languages** (Early): The book demonstrates how a single model can identify entities in multiple languages, showcasing the transfer learning power of Transformers. - **Text generation requires careful decoding strategy selection** (Middle): Greedy decoding, beam search, and sampling methods each trade off quality, diversity, and computational cost, with metrics like perplexity guiding evaluation. - **Summarization is a demanding sequence-to-sequence task** (Middle): It requires specialized metrics such as ROUGE, and the book emphasizes practical considerations for training and evaluating summarization models. - **Haystack enables retrieval-based question answering** (Late): Building QA systems on reviews involves combining information retrieval with generation, and the book addresses the real-world problem of scarce labeled data. - **Custom model training is feasible for specialized tasks** (Ending): The Python code auto-completion example shows how to build and train a Transformer from scratch, demonstrating the full lifecycle from data preparation to deployment. 【Reading Tips】 - **Skim the opening chapters** if you already know Transformer basics; focus instead on the code examples and Hugging Face API usage, which are the book's core value. - **Deep-read the sentiment analysis and Trainer API sections**—they establish patterns reused throughout the book, so mastering them early pays off later. - **Pay special attention to the decoding strategies chapter** in the text generation section; it's conceptually dense but critical for producing quality outputs. - **Treat the summarization and QA chapters as case studies** rather than theory; work through the code to understand how sequence-to-sequence tasks differ from classification. - **The final code-generation chapter is the most advanced**; if you're short on time, read it for architectural insights rather than reproducing every step. 【Coverage Limits】 The excerpts primarily cover the book's table of contents, endorsements, and introductory material; detailed technical content from individual chapters is not included in this guide.
Excerpt 1
书名: Transformer自然语言处理实战-使用Hugging-Face-Transformers库构建NLP应用 (【澳大利亚】路易斯·汤斯顿 【瑞士】莱安德罗·冯·韦拉 【法】托马斯·沃尔夫) (Z-Library) 作者: 【澳大利亚】路易斯·汤斯顿 【瑞士】莱安德罗·冯·韦拉 【法】托马斯·沃尔夫 本...
View in text
Excerpt 2
书名: Bootstrap 5 Foundations (Daniel Charles Foreman)(Z-Library) 作者: Daniel Charles Foreman Bootstrap is a HTML5, CSS and JavaScript framework that enjoys 72%...
View in text
Page 6
念,由浅入深地讲解了 Transformer的实际运用,还包括训练过程和将Transformer应用于生 产等实际问题。在阅读本书时,深入、丰富的内容和清晰的示例将使 你信心倍增,对任何想要学习Transformer的人来说,本书都是首选工 具书。 ——Delip Rao, Natural Language Pr...
View in text
Tags
AI categories
Artificial IntelligencePythonProgramming Language
ISBN: 7111741927
Publish Year: 2023
Language: Chinese
Pages: 547
File Format: PDF
File Size: 25.7 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…