Hi,
I am loading my Peft model from the hugging face hub and trying to do TRL. When I am trying to load a toxicity model and pass it through a pipeline. It shows an error.
Here is my code,
toxicity_model_name = âfacebook/roberta-hate-speech-dynabench-r4-targetâ
toxicity_tokenizer = AutoTokenizer.from_pretrained(toxicity_model_name, device_map=âautoâ)
toxicity_model = AutoModelForSequenceClassification.from_pretrained(toxicity_model_name, device_map=âautoâ)
print(toxicity_model.config.id2label)
sentiment_pipe = pipeline(âsentiment-analysisâ,
model=toxicity_model_name,
device=device)
error-
Failed to import transformers.models.roberta.modeling_tf_roberta because of the following error (look up to see its traceback):
No module named âkeras.engineâ
I am using google colab to run the code.
It is in view mode.