Character prefix conditioning implementation Author: Devin Shah
We want to sample a sequence of tokens
subject to the constraint that s starts with a character prefix P, i.e., P is a prefix of repr(t₁) + repr(t₂) + ... + repr(tₙ), where + means string concatenation and repr maps a token to the characters it represents.
We define
Full problem described here.