Spaces:
Running
Running
def patch_tokenizer(tokenizer: "PreTrainedTokenizer") -> None: | |
if "PreTrainedTokenizerBase" not in str(tokenizer._pad.__func__): | |
tokenizer._pad = MethodType(PreTrainedTokenizerBase._pad, tokenizer) |