timoschick/pet
This repository contains the code for "Exploiting Cloze Questions for Few-Shot Text Classification and Natural Language Inference" observed · 2026-08-28
Health v2 · maintenance only
32/100
- Activity 0
- Release rhythm 35
- Longevity 100
Flags: no_releases
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: n/a
- age_days: 2339
- days_rel: n/a
- days_push: 1178
- n_releases_24m: 0
Adoption not part of the score
1622 stars · 281 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Official implementation of Pattern-Exploiting Training (PET), a semi-supervised method that reformulates text classification and natural language inference tasks as cloze-style prompts for pretrained language models. It includes the iterative iPET variant and supports training with very few or even zero labeled examples.
Use cases
- few-shot text classification with pretrained language models
- natural language inference with limited labeled data
- train a classifier with zero labeled examples using iPET
- reproduce GPT-3-level few-shot results with small models
- apply prompt-based semi-supervised training to custom NLP tasks
When to choose
- you have very few labeled examples for a classification or NLI task
- you want to use small language models instead of massive few-shot models
- you need the reference implementation of the PET/iPET research papers
When to avoid
- you need modern prompt-tuning support or recent transformer versions
- you want actively maintained tooling rather than research code
- your task is not text classification or natural language inference
Facets
library · maturity maintenance
machine-learning nlp llm-training cli machine-learning large-language-models python cli few-shot-learning prompt-based-training cloze-questions semi-supervised text-classification natural-language-inference ipet research-code natural-language-processing
6 sources
- readme: https://github.com/timoschick/pet · fetched 2026-08-28 · f7ae0e86b5b2
- homepage: https://arxiv.org/abs/2001.07676 · fetched 2026-08-29 · 48effc2d8e6e
- site_page: https://info.arxiv.org/about/donate.html · fetched 2026-08-29 · cca9c3a11c56
- site_page: https://info.arxiv.org/about/ourmembers.html · fetched 2026-08-29 · 47cbc55ff1de
- site_page: https://info.arxiv.org/about · fetched 2026-08-29 · a1f16f915a9a
- site_page: https://info.arxiv.org/labs/index.html · fetched 2026-08-29 · b14a8d05a0ec
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| timoschick/pet | main | 32 |
For agents
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem