Applies a boolean constraint mask to log-probabilities.
Invalid tokens (mask == false) are set to f64::NEG_INFINITY.
Input / output shape: [B][M][|V|].
Runs the full decode loop using a static flat logit vector (same logits
repeated for every batch entry, beam, and step). Useful for unit tests
where the model is not available.