Coming soon · Book Profile
Natural Language Processing with Transformers Building Language Applications with Hugging Face
A hands-on guide for data scientists and machine learning engineers to build, train, and optimize state-of-the-art language applications using transformer models with the Hugging Face ecosystem.
A profile of this book is on the way.
What it’s about
For any data scientist or ML engineer who wants to leverage the revolutionary power of transformer models but feels overwhelmed by their complexity, 'Natural Language Processing with Transformers' provides a clear, practical, and hands-on path to mastery. Written by core contributors at Hugging Face, this book demystifies architectures like BERT and GPT, guiding you through the entire lifecycle of an NLP project. You'll learn to use the Hugging Face ecosystem—Transformers, Datasets, Tokenizers, and Accelerate—to tackle real-world tasks like text classification, named entity recognition, question answering, and text generation. More than just fine-tuning, the book dives into critical production concerns, teaching you how to make models smaller and faster with distillation and quantization, how to handle multilingual data or scenarios with few labels, and even how to train a large language model from scratch on a custom dataset. This is the definitive guide to building production-ready language applications with the coolest technology around.
The through-line
- Who it’s for
- A data scientist or machine learning engineer who is proficient in Python and deep learning fundamentals. They have seen the impressive results of transformer models like BERT and GPT, but find it daunting to bridge the gap from research papers to applying these complex, state-of-the-art models to their own specific NLP problems and business use cases. They want to build powerful and efficient language applications without spending months reinventing the wheel.
- The problem
- Building production-ready NLP applications with state-of-the-art transformer models is hard. It requires implementing complex architectures, managing massive datasets, dealing with a fragmented ecosystem of incompatible tools, and optimizing models to meet strict performance and efficiency constraints. They feel overwhelmed by the rapid pace of NLP research and intimidated by the perceived complexity of transformers. They worry they are falling behind and lack a clear, practical path to leverage these powerful technologies in their work.
- The plan
- Get started quickly by learning the core concepts of transformers and using the high-level `pipelines` from the Hugging Face ecosystem.
- Follow hands-on, task-oriented chapters to master fine-tuning transformers for core NLP applications like text classification, named entity recognition, summarization, and question answering.
- Learn critical techniques to optimize your models for production, including knowledge distillation, quantization, and graph optimization with ONNX.
- Tackle advanced, real-world scenarios like working with few labels, handling multilingual data, and training a large-scale transformer from scratch.
- The payoff
- Confidently building, training, and deploying sophisticated NLP applications using transformer models. · Solving complex language-based problems at work, from sentiment analysis to review-based QA and code autocompletion. · Becoming proficient in optimizing models for real-world production environments, balancing performance with efficiency.
See our guide
Related profiles we’ve built
- Time Series Forecasting Using Foundation Models →
- Understanding Deep Learning →
- The AI Marketing Canvas: A Five-Step AI Plan for Marketers →
- Artificial Intelligence →
- Artificial Intelligence - A Very Short Introduction →
- Effective Data Science Infrastructure →
- Human + Machine →
- Big Data_ A Very Short Introduction (Very Short Introductions) →
Additional reading
- OpenAI Prompt Engineering Guide · OpenAI
Official documentation from the model provider on how to craft effective prompts, recommended by the author.
- Anthropic's Prompt Engineering Guide · Anthropic
Official guide from another major LLM provider, offering best practices for prompt design.
- dair-ai/Prompt-Engineering-Guide · DAIR.AI Community
A comprehensive, community-maintained GitHub repository covering a wide range of prompt engineering techniques.
- GPT Researcher · assafelovic
An open-source project that inspired the book's research summarization engine, recommended for further exploration of building production-grade LLM applications.
- Building Effective AI Agents · Anthropic
An article recommended by the author for a deeper understanding of the distinction between agentic workflows and autonomous agents.
- Model Context Protocol (MCP) Official Website · Anthropic and Community
The primary source for the MCP specification, tutorials, and ecosystem resources, essential for building or consuming MCP servers.
- FastMCP 2 Documentation · jlowin and community
The official documentation for the recommended Python SDK for building MCP servers, used in the book's example.
- Knowledge Graph Enhanced RAG · Tomaž Bratanič and Oskar Hane
Recommended by the author for readers interested in diving deeper into combining knowledge graphs with RAG.
- Database Management Systems · Gehrke and Ramakrishnan
Referenced in Chapter 2 as a resource for readers unfamiliar with the basics of SQL and Relational Database Management Systems (RDBMSs), which are foundational for the structured data analysis chapters.
- Survey of Hallucination in Natural Language Generation · Ji, Z., Lee, N., Frieske, R., et al.
Cited in Chapter 2 to explain the concept of 'hallucinations' in LLMs and to underscore the importance of verifying information provided by models.