Implementing bad_words_ids does not work with OPT models!
Hey HF,I have been trying to impliment bad_words_ids argument into model.generate but it doesnt seem to work with the OPT models:from transformers import pipeline, set_seed

set_seed(32)

prompt = "I go to the post office"

tokenizer = AutoTokenizer.from_pretrained("facebook/opt-1.3b", use_fast=False, add_prefix_space=True, add_special_tokens=False)

input_ids = tokenizer(prompt, return_tensors="pt").input_ids.cuda()

badwords = ["envelope"]
bad_words_ids = tokenizer(badwords).input_ids

generated_ids = model.generate(input_ids, do_sample=True, max_length=150, bad_words_ids=bad_words_ids, eos_token_id = 2)

tokenizer.batch_decode(generated_ids, skip_special_tokens=True)Am I doing something wrong or does this not work of the OPT models?