src/transformers/generation/beam_constraints.py/DisjunctiveConstraint/remaining
class DisjunctiveConstraint:    def remaining(self):
        if self.completed:
            # since this can be completed without reaching max height
            return 0
        else:
            return self.seqlen - len(self.current_seq)