Skip to content

Implementation of greedy and beam search, as well as top-p and top-k. Analyze how varying specific parameters of decoding and sampling algorithms can qualitatively affect the generation and interpretation of NLG evaluation metrics.

Notifications You must be signed in to change notification settings

MathieuDesponds/Decoder-in-Natural-Language-Generation

Repository files navigation

Review Assignment Due Date

Assignment Description

  • In this assignment, you will be looking at natural language generation (NLG), precisely the task of summarization. You will be exploring ways to generate text and how fine-grained decisions of decoding parameters can affect the generations.

  • You will not need to train any models in this assignment. A pretrained one is provided for you by Huggingface.

  • In Part 1, you will implement two decoding algorithms (greedy and beam search), as well as two sampling algorithms (top-p and top-k) to replicate (to some extent) what one would get when using Huggingface's generate function that you've played with during the Week 7's exercise session.

  • For Part 2, you will analyze how varying specific parameters of decoding and sampling algorithms can qualitatively affect the generation.

  • For Part 3, you will answer some questions on interpreting automatic NLG evaluation metrics.

Table of Contents

Deliverables

To give us the deliverables you will have to commit the following files if your github classroom repository:

  • ✅ The python files:

    • a3_decoding.py
    • a3_sampling.py
    • a3_utils.py, if you added any helper functions
  • ✅ This jupyter notebook a3_notebook.py with

    • the answers to Part 2 questions written out in their corresponding cells.
      • Answers to (2.1) questions
      • Answers to (2.2) questions
      • Answers to (2.3) questions
      • Answers to (2.4) questions
    • the answers to Part 3 questions written out in its corresponding cell.

Expected Workload

We expect the first part of the assignment, notably Beam search, to take the most out of the complete assignment. You can plan your workload according to that. Keep in mind that this is just our expectation, not a guarantee.

About

Implementation of greedy and beam search, as well as top-p and top-k. Analyze how varying specific parameters of decoding and sampling algorithms can qualitatively affect the generation and interpretation of NLG evaluation metrics.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published