def _force_token_id_to_be_generated(scores, token_id: int):
        """force one of token_ids to be generated by setting prob of all other tokens to 0 (logprob=-float("inf"))"""
        mask = torch.full_like(scores, 1, dtype=torch.bool)
        mask[:, token_id] = False
        return scores.masked_fill(mask, -float("inf"))
force one of token_ids to be generated by setting prob of all other tokens to 0 (logprob=-float("inf"))
dpkd/transformers/examples/research_projects/onnx/summarization/bart_onnx/generation_onnx.py