1-Transformer_models-8-Summary
中英文对照学习,效果更佳!
原课程链接:https://huggingface.co/course/chapter1/9?fw=pt
Summary
摘要
问一个问题
In this chapter, you saw how to approach different NLP tasks using the high-level pipeline() function from 🤗 Transformers. You also saw how to search for and use models in the Hub, as well as how to use the Inference API to test the models directly in your browser.
在本章中,您了解了如何使用🤗Transformers中的高级Pipeline()函数处理不同的NLP任务。您还了解了如何在Hub中搜索和使用模型,以及如何使用推理API直接在浏览器中测试模型。
We discussed how Transformer models work at a high level, and talked about the importance of transfer learning and fine-tuning. A key aspect is that you can use the full architecture or only the encoder or decoder, depending on what kind of task you aim to solve. The following table summarizes this:
我们讨论了Transformer模型如何在高级别上工作,并讨论了迁移学习和微调的重要性。一个关键方面是,您可以使用完整的体系结构,也可以仅使用编码器或解码器,具体取决于您要解决的任务类型。下表总结了这一点:
| Model 型号 | Examples 实例 | Tasks 任务 |
|---|---|---|
| Encoder 编码器 | ALBERT, BERT, DistilBERT, ELECTRA, RoBERTa 阿尔伯特,伯特,DistilBERT,伊莱克特拉,罗伯塔 | Sentence classification, named entity recognition, extractive question answering 句子分类、命名实体识别、抽取问答 |
| Decoder 译码器 | CTRL, GPT, GPT-2, Transformer XL Ctrl、GPT、GPT-2、TransformerXL | Text generation 文本生成 |
| Encoder-decoder 编解码器 | BART, T5, Marian, mBART 巴特,T5,玛丽安,mBART | Summarization, translation, generative question answering 摘要、翻译、生成性问答 |
