Reference 12 stops to get here

Length Penalty

Adjusting generation scores based on output length to avoid bias toward shorter or longer sequences.

Your route here

12 stops · basics first
  1. Natural Language Processing ✓ understood

    The field of AI that lets computers read, interpret, translate and generate human language, from spam filters and search to chatbots.

  2. Token ✓ understood

    The unit of text a language model reads and writes: a word, part of a word, or a character, drawn from the model's fixed vocabulary.

  3. Tokenization ✓ understood

    Splitting text into tokens, usually subword pieces, and mapping each to an integer ID so a language model can process it.

  4. Language Modeling ✓ understood

    Assigning probabilities to sequences of text, in practice by predicting each next token from the ones before it; the objective behind large language models.

  5. Autoregressive Model ✓ understood

    A model that generates output one token at a time, using previously generated tokens as input for the next prediction.

  6. Machine Learning ✓ understood

    Building systems that learn patterns from data instead of following hand-written rules, getting better at a task as they see more examples.

  7. Neural Network ✓ understood

    A model built from layers of simple units, each taking a weighted sum of its inputs and applying a nonlinearity; training adjusts the weights so the whole stack maps inputs to useful outputs.

  8. Activation Function ✓ understood

    A non-linear function applied to neuron outputs that introduces non-linearity, enabling networks to learn complex patterns.

  9. Softmax ✓ understood

    A function that turns a list of scores (logits) into probabilities that are all positive and sum to 1; the standard output of classifiers and language models.

  10. Decoding Strategies ✓ understood

    The rules a language model uses to turn its next-token probabilities into actual text, from always taking the top token to sampling with temperature, top-k or top-p.

  11. Greedy Decoding ✓ understood

    Always selecting the most likely next token during generation, fast but can lead to repetitive or suboptimal outputs.

  12. Beam Search ✓ understood

    A generation algorithm that maintains top-k candidates at each step, balancing quality and diversity.

  13. Length Penalty · you are here ✓ understood

Adjusting generation scores based on output length to avoid bias toward shorter or longer sequences.

This concept is essential for understanding large language models and forms a key part of modern AI systems.

  • Generation
  • Beam Search
  • Decoding

Where it sits

Before this

Beam Search
Length Penalty

Leads to

Nothing yet: a destination in its own right.

Explore nearby