Ross ROSS = Recommend OSS · open-source software intelligence for agents

timoschick/pet

This repository contains the code for "Exploiting Cloze Questions for Few-Shot Text Classification and Natural Language Inference" observed · 2026-08-28

github.com/timoschick/pet · homepage · Python · Apache-2.0 (permissive) 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

Full methodology

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

Member repositories

RepositoryRoleHealth v2
timoschick/petmain32

For agents

markdown · JSON · MCP: product_card(name="timoschick/pet")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem