Match a job Paths Subjects Questions Quizzes Pricing
Intermediate Open Pro

Choose a Decoding Strategy for Five Different Products

Your company ships five features, each using an autoregressive model. For each, choose the decoding strategy (greedy, beam search with a beam size and length penalty, or sampling with temperature, top-k and/or top-p), justify it, and name the main failure mode you would guard against.

  1. Machine translation of product descriptions.
  2. Extraction of invoice fields into JSON.
  3. A chat assistant for customers.
  4. Marketing-slogan generation, where the user wants 10 different options.
  5. Speech-recognition transcription of call recordings (offline).

Then answer two follow-ups. (a) The logits at one step are (2.0, 1.0, 0.5, -1.0): compute the probabilities at temperature 1 and 0.5, and the token set and renormalized probabilities for top-p = 0.9. (b) Why do raw beam-search scores favour short outputs, and what are two fixes?

Share this question

← Back to Sequence Models: From RNNs to Attention practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.