#715 · Primary category: Education & Research

pet

machine-learning nlp python

This repository contains the code for "Exploiting Cloze Questions for Few-Shot Text Classification and Natural Language Inference"

Project last updated:06/12/23

GitHub Stars

1.6K

Forks

281

Contributors

3

License

Apache-2.0

Why we included this project

PET is the reference implementation for pattern-exploiting training, the approach that reformulates each example as a cloze question so a masked language model predicts the label token. That trick became a building block of the few-shot NLP boom, and this repo lets you reproduce both papers, benchmark your own approaches against PET and iPET, and see how verbalizer-style prompting led into modern in-context learning. The code has a CLI and Python API, supports PET, iterative iPET, and plain supervised training across 13 tasks including SuperGLUE, and offers zero-shot inference via priming. It is research software, not a maintained production library, so expect to adapt it for new datasets; the documented reproduction results are the main deliverable.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category