1. Home
  2. Explore
  3. Computer Science
  4. Transformers and Large Language Models

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Transformers and Large Language Models

  • 86Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: NLP Task Types
Natural Language Processing is the field concerned with computationally manipulating and working with
.

86 questions

  1. 1
    Natural Language Processing is the field concerned with computationally manipulating and working with
    _____
    .
    Hint

    Think of the kind of information NLP systems process.

    Answer

    text

  2. 2
    In an NLP classification task, a model uses an input text to predict
    _____
    .
    Hint

    A sentiment classifier, for example, assigns a category to a review.

    Answer

    a label

  3. 3
    Predicting whether a movie review expresses positive, negative, or neutral sentiment is an example of
    _____
    .
    Hint

    The model assigns a category to the entire review.

    Answer

    classification

  4. 4
    Identifying that a request such as “I want to create an alarm for tomorrow” expresses the goal of creating an alarm is called
    _____
    .
    Hint

    The task identifies what the person wants to do.

    Answer

    intent detection

  5. 5
    Determining whether a text is written in French or another language is a
    _____
    task.
    Hint

    The model identifies which language the input uses.

    Answer

    language detection

  6. 6
    A task that assigns labels to multiple specific words in a sentence, such as identifying locations and times, is
    _____
    .
    Hint

    The task identifies and categorizes named items in text.

    Answer

    Named Entity Recognition

  7. 7
    Identifying whether each word is a noun, verb, or another grammatical category is called
    _____
    .
    Hint

    The task assigns grammatical categories to individual words.

    Answer

    part of speech tagging

  8. 8
    Dependency parsing and constituency parsing are examples of
    _____
    tasks.
    Hint

    These tasks analyze the grammatical structure of sentences.

    Answer

    parsing-related

  9. 9
    A task that takes text as input and produces text of potentially unknown length as output belongs to the
    _____
    category.
    Hint

    Translation and summarization are examples.

    Answer

    generation

  10. 10
    Translating a text from a source language into a target language is called
    _____
    .
    Hint

    The task converts text between languages.

    Answer

    machine translation

  11. 11
    Producing an answer in response to a user's question is an example of
    _____
    .
    Hint

    Conversational assistants commonly perform this task.

    Answer

    question answering

  12. 12
    Reducing an article to a shorter version that preserves its main ideas is the task of
    _____
    .
    Hint

    The output is a condensed version of the input.

    Answer

    summarization

  13. 13
    The percentage of observations that a classifier predicts correctly is its
    _____
    .
    Hint

    This metric counts correct predictions across all observations.

    Answer

    accuracy

  14. 14
    Among all positive predictions made by a model, the fraction that are correct is its
    _____
    .
    Hint

    This metric focuses on the reliability of positive predictions.

    Answer

    precision

  15. 15
    Among all examples that truly have a positive label, the fraction correctly identified is the model's
    _____
    .
    Hint

    This metric measures how many true positive cases the model finds.

    Answer

    recall

  16. 16
    The metric that combines precision and recall using their harmonic mean is the
    _____
    .
    Hint

    It summarizes the balance between precision and recall in one value.

    Answer

    F1 score

  17. 17
    When one class dominates a dataset, a classifier that always predicts that majority class can make
    _____
    appear misleadingly high.
    Hint

    The model can get many examples right while failing on the minority class.

    Answer

    accuracy

  18. 18
    For Named Entity Recognition, classification metrics can be computed at the token level or at the
    _____
    level.
    Hint

    The second approach aggregates performance for categories such as location.

    Answer

    entity-type

  19. 19
    Machine translation evaluation often uses paired source and target sequences from datasets such as
    _____
    .
    Hint

    Its name stands for Workshop on Machine Translation.

    Answer

    WMT

  20. 20
    A translation metric that compares a model's output with a reference text and is commonly used for machine translation is
    _____
    .
    Hint

    It is one of the reference-based metrics discussed alongside ROUGE.

    Answer

    BLEU

  21. 21
    The suite of reference-based metrics used to evaluate generated text in a different way from BLEU is
    _____
    .
    Hint

    It is another metric family that compares output with reference text.

    Answer

    ROUGE

  22. 22
    Unlike reference-based metrics,
    _____
    evaluates a language model using the probabilities it assigns and reflects how surprised it is by text.
    Hint

    A lower value is considered better for this metric.

    Answer

    perplexity

  23. 23
    BLEU and ROUGE generally improve as their scores get higher, whereas perplexity generally improves as its score gets
    _____
    .
    Hint

    Perplexity measures how surprised the model is by the text.

    Answer

    lower

  24. 24
    Dividing text into units that a model processes is called
    _____
    , and each resulting unit is a token.
    Hint

    The name of the process comes from the name of the resulting text units.

    Answer

    tokenization

  25. 25
    A tokenizer that treats each complete word as a separate unit uses
    _____
    tokenization.
    Hint

    Each word, such as “bear” or “bears,” is treated as its own token.

    Answer

    word-level

  26. 26
    A limitation of word-level tokenization is that related forms such as “bear” and “bears” are treated as
    _____
    tokens.
    Hint

    The tokenizer does not automatically share a representation between the singular and plural forms.

    Answer

    different

  27. 27
    A word that appears at inference time but was not present in the training vocabulary is an
    _____
    word.
    Hint

    The abbreviation for this term is OOV.

    Answer

    out-of-vocabulary

  28. 28
    A tokenizer that breaks words into reusable word parts and can represent shared roots is a
    _____
    tokenizer.
    Hint

    It offers a compromise between whole-word and character-level tokenization.

    Answer

    subword

  29. 29
    Compared with word-level tokenization, subword tokenization lowers the risk of
    _____
    because it can compose familiar word parts.
    Hint

    This is the problem that occurs when a token was not encountered during training.

    Answer

    out-of-vocabulary tokens

  30. 30
    A trade-off of subword tokenization is that breaking words into parts can make the token
    _____
    longer.
    Hint

    More units must be processed when a word is divided into several pieces.

    Answer

    sequence

  31. 31
    A tokenizer that represents text one character at a time uses
    _____
    -level tokenization.
    Hint

    Its units are individual letters or other characters.

    Answer

    character

  32. 32
    Because it processes individual characters, character-level tokenization can be robust to misspellings and
    _____
    errors.
    Hint

    These errors involve uppercase and lowercase forms.

    Answer

    casing

  33. 33
    The main computational disadvantage of character-level tokenization is that it creates very long sequences, making processing
    _____
    .
    Hint

    The model has more individual units to process.

    Answer

    slower

  34. 34
    A multilingual tokenizer may use a vocabulary on the order of hundreds of thousands, while an English-focused vocabulary is often on the order of
    _____
    .
    Hint

    The English-focused scale is one order of magnitude smaller in the example described.

    Answer

    tens of thousands

  35. 35
    Assigning each vocabulary token a vector with one position set to one and all others set to zero is called
    _____
    .
    Hint

    The representation is abbreviated OHE.

    Answer

    One-Hot Encoding

  36. 36
    Because distinct one-hot vectors have no shared active positions, they are
    _____
    to one another.
    Hint

    Their directions form right angles in the vector space.

    Answer

    orthogonal

  37. 37
    A common measure of similarity that compares the angle between two vectors is
    _____
    .
    Hint

    It focuses on whether vectors point in similar directions.

    Answer

    cosine similarity

  38. 38
    A useful token representation should give semantically similar tokens a high similarity while leaving unrelated tokens more nearly
    _____
    .
    Hint

    This describes vectors pointing in substantially different directions.

    Answer

    orthogonal

  39. 39
    The model family introduced in 2013 that popularized interpretable word embeddings through relationships such as “Paris is to France as Berlin is to Germany” is
    _____
    .
    Hint

    It learns word representations from text using proxy prediction tasks.

    Answer

    Word2vec

  40. 40
    In Word2vec, the training objective used to learn useful word representations is a
    _____
    task because it supports the goal rather than being the final goal itself.
    Hint

    The model predicts something in the text as a means to learn representations.

    Answer

    proxy

  41. 41
    In continuous bag of words, the model uses surrounding words to predict the
    _____
    word.
    Hint

    This method uses context as input and predicts the word at its center.

    Answer

    target

  42. 42
    In skip gram, the model uses a target word to predict the words in its
    _____
    .
    Hint

    This reverses the prediction direction used by continuous bag of words.

    Answer

    context

  43. 43
    In a simple neural network for learning embeddings, the one-hot input has vocabulary size, while the hidden representation typically has a much smaller
    _____
    .
    Hint

    The hidden vector can have a size such as 768, compared with a much larger vocabulary.

    Answer

    dimension

  44. 44
    When a next-word prediction model compares its predicted distribution with the true next token, a commonly used loss is
    _____
    .
    Hint

    This loss measures the discrepancy between predicted probabilities and the target distribution.

    Answer

    cross-entropy

  45. 45
    After a prediction loss is computed,
    _____
    updates the model weights so future predictions can better match the target.
    Hint

    The method sends information about prediction error through the network.

    Answer

    backpropagation

  46. 46
    After training a neural network for a proxy task, the learned token embedding can be obtained by applying the input token's one-hot vector to the learned
    _____
    .
    Hint

    The hidden representation results from the input being multiplied by learned parameters.

    Answer

    weights

  47. 47
    The best embedding dimension depends partly on downstream task complexity and partly on the trade-off between representation capacity and
    _____
    .
    Hint

    Larger vectors can increase inference expense and latency.

    Answer

    computation

  48. 48
    The neural network model family introduced in the 1980s that processes a sequence one token at a time while carrying forward a hidden representation is an
    _____
    .
    Hint

    Its name describes a neural network that repeats a computation across sequence steps.

    Answer

    RNN

  49. 49
    In an RNN, the hidden state represents the
    _____
    processed so far.
    Hint

    It summarizes the input history available at the current step.

    Answer

    sequence

  50. 50
    Unlike a representation that simply averages token embeddings, an RNN uses sequential processing so that
    _____
    matters.
    Hint

    The order in which tokens appear affects the hidden state.

    Answer

    word order

  51. 51
    For sentence-level classification with an RNN, the hidden state of the
    _____
    token can be used as the sentence representation.
    Hint

    This state summarizes the sequence after all tokens have been processed.

    Answer

    last

  52. 52
    For token-level tasks such as Named Entity Recognition, an RNN can use the representation of the
    _____
    of interest.
    Hint

    The model makes a prediction for each relevant word or unit.

    Answer

    token

  53. 53
    An RNN used for generation can process the source text and use its final hidden state as a
    _____
    for decoding.
    Hint

    This is another name for the final representation of the processed input.

    Answer

    context vector

  54. 54
    The RNN extension that adds a cell state to help keep track of important information is the
    _____
    .
    Hint

    Its name expands to Long Short-Term Memory.

    Answer

    LSTM

  55. 55
    The difficulty RNN-based models have with retaining information across long sequences is known as the problem of
    _____
    .
    Hint

    The challenge concerns remembering information from far earlier in the sequence.

    Answer

    long-range dependencies

  56. 56
    When repeated gradient factors smaller than one shrink toward zero during backpropagation through time, the problem is called the
    _____
    .
    Hint

    The gradient becomes too small for effective weight updates.

    Answer

    vanishing gradient

  57. 57
    A further drawback of RNNs is that processing a long sequence is slow because each step depends on hidden states computed at earlier
    _____
    .
    Hint

    The computations cannot all be performed independently at once.

    Answer

    steps

  58. 58
    The mechanism introduced in 2014 to create more direct links between a prediction and relevant earlier parts of an input is
    _____
    .
    Hint

    It was designed to help address long-range dependency problems.

    Answer

    attention

  59. 59
    In self-attention, a token's representation is computed using information from
    _____
    in the sequence.
    Hint

    The representation becomes dependent on the token's context.

    Answer

    other tokens

  60. 60
    Self-attention can give the same word different representations in different sentences because its representation depends on
    _____
    .
    Hint

    For example, the word “bank” can have different meanings in different sentences.

    Answer

    context

  61. 61
    In attention, the
    _____
    is the representation used to compare against keys to determine which elements are relevant.
    Hint

    It represents what the model is currently looking for.

    Answer

    query

  62. 62
    In attention, a
    _____
    is compared with a query to measure how relevant its associated element is.
    Hint

    It helps the model determine whether an element matches what the query seeks.

    Answer

    key

  63. 63
    In attention, the information combined using relevance weights is carried by the
    _____
    .
    Hint

    It is the content retrieved after comparing queries with keys.

    Answer

    value

  64. 64
    The query, key, and value representations are produced using learned
    _____
    rather than being fixed in advance.
    Hint

    They map token embeddings into the spaces used by attention.

    Answer

    projections

  65. 65
    Attention weights are commonly obtained by applying
    _____
    to query-key compatibility scores.
    Hint

    This operation turns scores into normalized weights.

    Answer

    softmax

  66. 66
    Computing attention for many tokens together using matrix operations is efficient in part because
    _____
    are well suited to matrix computations.
    Hint

    These processors are commonly used for neural network computation.

    Answer

    GPUs

  67. 67
    The 2017 paper that introduced the Transformer architecture was titled “
    _____
    .”
    Hint

    The title emphasizes the mechanism at the center of the architecture.

    Answer

    Attention Is All You Need

  68. 68
    The original Transformer for translation is organized into an
    _____
    that processes the source text and a decoder that generates the target text.
    Hint

    It creates representations of the input sequence.

    Answer

    encoder

  69. 69
    The Transformer encoder's self-attention layer lets each input token attend to
    _____
    in the input sequence.
    Hint

    Unlike an RNN, the model can form direct connections across the sequence.

    Answer

    all tokens

  70. 70
    The position of a token is added to its token embedding using
    _____
    so the Transformer can represent sequence order.
    Hint

    Self-attention alone does not inherently specify token order.

    Answer

    position encoding

  71. 71
    In the original Transformer, sinusoidal position information is combined with token embeddings by
    _____
    addition.
    Hint

    Corresponding vector components are added to one another.

    Answer

    element-wise

  72. 72
    The encoder's feedforward neural network provides an additional learned
    _____
    of the token representations.
    Hint

    It gives the model another way to transform features after attention.

    Answer

    projection

  73. 73
    In decoder cross-attention, the decoder supplies the query, while the encoder representations supply the
    _____
    and values.
    Hint

    These come from the input sequence and are compared with the decoder's query.

    Answer

    keys

  74. 74
    Decoder masked self-attention can use the current output token and tokens generated
    _____
    it.
    Hint

    The model must not use future tokens that have not yet been generated.

    Answer

    before

  75. 75
    In Transformer translation, the decoder begins generating the target sequence with a
    _____
    token.
    Hint

    Its name means beginning of sequence.

    Answer

    BOS

  76. 76
    The final Transformer decoder representation is passed through a linear projection and
    _____
    to produce probabilities over the vocabulary.
    Hint

    This operation converts output scores into a probability distribution.

    Answer

    softmax

  77. 77
    In a multi-head attention layer, each head uses its own learned projections so the model can capture different
    _____
    between tokens.
    Hint

    Different heads can learn different ways for tokens to relate.

    Answer

    associations

  78. 78
    After the outputs of multiple attention heads are concatenated, a learned output projection maps them back to the original embedding
    _____
    .
    Hint

    The projection makes the combined output compatible with the model's representation size.

    Answer

    dimension

  79. 79
    In the Transformer attention formula, query-key scores are divided by the square root of the key dimension to prevent their magnitudes from growing too
    _____
    .
    Hint

    The dot product tends to grow as the vector dimension increases.

    Answer

    large

  80. 80
    The original Transformer uses a stack of multiple encoder modules and multiple
    _____
    modules.
    Hint

    These modules generate the output sequence.

    Answer

    decoder

  81. 81
    The encoder's final representations are passed to each decoder layer as input to its
    _____
    attention.
    Hint

    This attention connects the generated sequence to the source sequence.

    Answer

    cross

  82. 82
    Label smoothing replaces a perfectly certain one-hot target with a distribution that assigns a small amount of probability to
    _____
    tokens.
    Hint

    The target no longer assigns all probability to a single correct token.

    Answer

    other

  83. 83
    The purpose of label smoothing is to make the model's target distribution less
    _____
    about the designated next token.
    Hint

    The smoothed target allows for the possibility of alternative valid continuations.

    Answer

    certain

  84. 84
    In the described Transformer translation experiments, label smoothing was reported to improve a metric such as
    _____
    .
    Hint

    This reference-based metric is used to evaluate machine translation.

    Answer

    BLEU

  85. 85
    During autoregressive decoding, the model feeds a generated token back into the decoder to predict the
    _____
    token.
    Hint

    Generation proceeds one output unit at a time.

    Answer

    next

  86. 86
    A generated sequence typically stops when the model emits the
    _____
    token.
    Hint

    Its name means end of sequence.

    Answer

    EOS

1 of 86
Question 1 of 86

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent