Loading tutorials
nn.Linear, softmax, cross-entropy) and that you have seen how a question and context are encoded as one sentence pair. Here we open the last layer of a question-answering model. We look at what it computes, how it is trained, and why decoding n6 min readpipeline helper and reads its output closely. It assumes you know basic Python, have a general idea of what a pretrained language model is, and understand tokenization at a high level. You don't need to kno6 min readpipeline and decode start and end logits by hand with offset mappings, as in the earlier chapters. You should also know what max_length and truncation do in a tokenizer.6 min readsequence_ids are.5 min readquestion-answering pipeline and know that predictions are text spans cut from a contex6 min readdatasets, Trainer, and PyTorch tensors. Here you put those pieces together and train a model that answers questions about passa4 min read