NohTow/PPL-MCTS

Repository for the code of the "PPL-MCTS: Constrained Textual Generation Through Discriminator-Guided Decoding" paper, NAACL'22

38
/ 100
Emerging

Implements Monte Carlo Tree Search decoding that combines any Hugging Face language model with a discriminator to enforce constraints during generation, using configurable exploration parameters (c_puct, temperature, repetition penalty) and rollout-based value estimation. The approach supports plug-and-play discriminators from custom PyTorch classifiers to vanilla transformers, with optimizations for unidirectional attention models to enable cached hidden state reuse and significant speedup gains.

No commits in the last 6 months.

Stale 6m No Package No Dependents
Maintenance 0 / 25
Adoption 8 / 25
Maturity 16 / 25
Community 14 / 25

How are scores calculated?

Stars

66

Forks

9

Language

Python

License

Last pushed

Oct 25, 2022

Commits (30d)

0

Get this data via API

curl "https://pt-edge.onrender.com/api/v1/quality/transformers/NohTow/PPL-MCTS"

Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.