Transformers自然語言處理(修訂版,影印版)
出版時間:2023年03月
頁數(shù):383
“transformers相關書籍的杰作 —— 清晰易懂!”
——Jeremy Howard
fast.ai聯(lián)合創(chuàng)始人,昆士蘭大學教授
“清晰精辟的現(xiàn)代自然語言處理指南。推薦!”
——Christopher Manning
斯坦福大學機器學習
Thomas M. Siebel教授
自2017年推出以來,transformers已迅速成為在各種自然語言處理任務中實現(xiàn)最佳結果的主導架構。如果你是一名數(shù)據(jù)科學家或程序員,這本實踐用書將向你展示如何使用Hugging FaceTransformers(基于Python的深度學習庫)訓練和擴展這些大型模型。
transformers已經被用來撰寫真實的新聞故事、改進Google搜索查詢,甚至創(chuàng)建會講老套笑話的聊天機器人。在這本指南中,作者Lewis Tunstall、Leandro von Werra、Thomas Wolf(Hugging Face Transformers的創(chuàng)建者)通過實踐方法來教你如何使用transformers以及如何將它集成到你的應用中。你將快速學習可以由transformers幫助解決的各種任務。
● 為核心NLP任務構建、調試和優(yōu)化transformers模型,例如文本分類、命名實體識別和問答
● 學習如何使用transformers進行跨語言遷移學習
● 在缺乏標記數(shù)據(jù)的實際場景中應用transformers
● 使用提取、修剪和量化等技術高效部署transformers模型
● 從頭開始訓練transformers并學習如何擴展到多個GPU和分布式環(huán)境
- Foreword
- Preface
- 1. Hello Transformers
- The Encoder-Decoder Framework
- Attention Mechanisms
- Transfer Learning in NLP
- Hugging Face Transformers: Bridging the Gap
- A Tour of Transformer Applications
- The Hugging Face Ecosystem
- Main Challenges with Transformers
- Conclusion
- 2. Text Classification
- The Dataset
- From Text to Tokens
- Training a Text Classifier
- Conclusion
- 3. Transformer Anatomy
- The Transformer Architecture
- The Encoder
- The Decoder
- Meet the Transformers
- Conclusion
- 4. Multilingual Named Entity Recognition
- The Dataset
- Multilingual Transformers
- A Closer Look at Tokenization
- Transformers for Named Entity Recognition
- The Anatomy of the Transformers Model Class
- Tokenizing Texts for NER
- Performance Measures
- Fine-Tuning XLM-RoBERTa
- Error Analysis
- Cross-Lingual Transfer
- Interacting with Model Widgets
- Conclusion
- 5. Text Generation
- The Challenge with Generating Coherent Text
- Greedy Search Decoding
- Beam Search Decoding
- Sampling Methods
- Top-k and Nucleus Sampling
- Which Decoding Method Is Best?
- Conclusion
- 6. Summarization
- The CNN/DailyMail Dataset
- Text Summarization Pipelines
- Comparing Different Summaries
- Measuring the Quality of Generated Text
- Evaluating PEGASUS on the CNN/DailyMail Dataset
- Training a Summarization Model
- Conclusion
- 7. Question Answering
- Building a Review-Based QA System
- Improving Our QA Pipeline
- Going Beyond Extractive QA
- Conclusion
- 8. Making Transformers Efficient in Production
- Intent Detection as a Case Study
- Creating a Performance Benchmark
- Making Models Smaller via Knowledge Distillation
- Making Models Faster with Quantization
- Benchmarking Our Quantized Model
- Optimizing Inference with ONNX and the ONNX Runtime
- Making Models Sparser with Weight Pruning
- Conclusion
- 9. Dealing with Few to No Labels
- Building a GitHub Issues Tagger
- Implementing a Naive Bayesline
- Working with No Labeled Data
- Working with a Few Labels
- Leveraging Unlabeled Data
- Conclusion
- 10. Training Transformers from Scratch
- Large Datasets and Where to Find Them
- Building a Tokenizer
- Training a Model from Scratch
- Results and Analysis
- Conclusion
- 11. Future Directions
- Scaling Transformers
- Going Beyond Text
- Multimodal Transformers
- Where to from Here?
- Index
書名:Transformers自然語言處理(修訂版,影印版)
國內出版社:東南大學出版社
出版時間:2023年03月
頁數(shù):383
書號:978-7-5766-0589-1
原版書書名:Natural Language Processing with Transformers
原版書出版商:O'Reilly Media
Lewis Tunstall
Lewis Tunstall是Hugging Face機器學習工程師,致力于為NLP社區(qū)開發(fā)實用工具,并幫助人們更好地使用這些工具。
Leandro von Werra
Leandro von Werra是Hugging Face機器學習工程師,致力于代碼生成模型的研究與社區(qū)推廣工作。
Thomas Wolf
Thomas Wolf是Hugging Face首席科學官兼聯(lián)合創(chuàng)始人,他的團隊肩負著促進AI研究和普及的使命。
The bird on the cover of Natural Language Processing with Transformers is a coconut lorikeet (Trichoglossus haematodus), a relative of parakeets and parrots. It is also known as the green-naped lorikeet and is native to Oceania.
The plumage of coconut lorikeets blends into their colorful tropical and subtropical surroundings; their green nape meets a yellow collar beneath a deep dark blue head, which ends in an orange-red bill. Their eyes are orange and the breast feathers are red. Coconut lorikeets have one of the longest, pointed tails of the seven species of lorikeet, which is green from above and yellow underneath. These birds measure 10 to 12 inches long and weigh 3.8 to 4.8 ounces.
Coconut lorikeets have one monogamous partner and lay two matte white eggs at a time. They build nests over 80 feet high in eucalyptus trees and live 15 to 20 years in the wild. This species suffers from habitat loss and capture for the pet trade.