7-Main_NLP_tasks-0-Introduction
中英文对照学习,效果更佳!
原课程链接:https://huggingface.co/course/chapter7/1?fw=pt
Introduction
引言
问一个问题
In [Chapter 3], you saw how to fine-tune a model for text classification. In this chapter, we will tackle the following common NLP tasks:
在第3章中,您了解了如何为文本分类微调模型。在本章中,我们将介绍以下常见的NLP任务:
- Token classification
- Masked language modeling (like BERT)
- Summarization
- Translation
- Causal language modeling pretraining (like GPT-2)
- Question answering
To do this, you’ll need to leverage everything you learned about the Trainer API and the 🤗 Accelerate library in [Chapter 3], the 🤗 Datasets library in [Chapter 5], and the 🤗 Tokenizers library in [Chapter 6]. We’ll also upload our results to the Model Hub, like we did in [Chapter 4], so this is really the chapter where everything comes together!
令牌分类掩码语言建模(如BERT)摘要翻译因果语言建模预训(如GPT-2)问答为此,您将需要利用您在第3章中所学到的`™‘API和🤗Accelerate库、第5章中的🤗数据集库和第6章中的🤗令牌化器库。我们™还会将我们的结果上载到Model Hub,就像我们在第4章中所做的那样,所以这一章实际上是所有东西都在一起的一章!
Each section can be read independently and will show you how to train a model with the Trainer API or with your own training loop, using 🤗 Accelerate. Feel free to skip either part and focus on the one that interests you the most: the Trainer API is great for fine-tuning or training your model without worrying about what’s going on behind the scenes, while the training loop with Accelerate will let you customize any part you want more easily.
每一节都可以独立阅读,并将向您展示如何使用Traine接口或您自己的训练循环(使用🤗Accelerate)训练模型。你可以随意跳过任何一个部分,专注于你最感兴趣的部分:Traine接口非常适合微调或训练你的模型,而不用担心?™在幕后发生了什么,而`Accelerate‘的训练循环将让你更容易地定制任何你想要的部分。
If you read the sections in sequence, you will notice that they have quite a bit of code and prose in common. The repetition is intentional, to allow you to dip in (or come back later) to any task that interests you and find a complete working example.
如果您按顺序阅读这些部分,您会注意到它们有相当多的代码和散文是相同的。这种重复是有意的,允许您深入(或稍后再来)任何您感兴趣的任务,并找到一个完整的工作示例。
