1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to LLMs in Python

Connected

Exercise

Using the correct model structure

Question-answering can be either extractive or generative, each requiring a different transformer structure to process input and output correctly.

They use either:

  • Encoder-only models such as "distilbert-base-uncased-distilled-squad"
  • Decoder-only models such as "gpt2"

Use your knowledge of common models for specific tasks to select the appropriate one. pipeline is loaded, as well as text on the Mona Lisa.

Instructions 1/2

undefined XP
  • 1
    • Use an appropriate model for extractive question-answering.
  • 2
    • Use an appropriate model for generative question-answering.