Open SallyBean opened 1 year ago
@SallyBean could you please provide a minimal reproducible example of the issue, e.g. a code snippet?
@m13uz Sure, sorry about that! Thanks for your help in advance. :)
!pip install detoxify from detoxify import Detoxify
input_text=["I hate women", "Men are idiots"]
results = Detoxify('unbiased').predict(input_text)
model = Detoxify('unbiased', device='cuda')
import pandas as pd
pd.DataFrame(results, index=input_text).round(5))
output (without the expected identity labels):
This is by design - the detoxify wrapper only returns the toxicity-related classes, since identity outputs are more intended for de-biasing during training. If you want them you could load the model checkpoint directly.
This is by design - the detoxify wrapper only returns the toxicity-related classes, since identity outputs are more intended for de-biasing during training. If you want them you could load the model checkpoint directly.
Hello, how can I download and load the model checkpoint that returns identity labels? They would be very useful for my projects, thank you!
Hello, is there any update over here? I couldn't find the checkpoints either Thank you!!
Hello, that would be the unbiased
model checkpoint, one way to get it to return the identity labels is to:
class_names
in the config that's saved inside the checkpoint with all the class names from here (combined as one list in the same order) and save the checkpoint with the updated class names
Thanks for the great repo!
I'm running the 'Quick prediction' code using the unbiased model, but there are no identity labels being returned - even with severe toxicity. I only get the toxicity labels.
Am I missing something?
Thanks again!