Views
No views yet
facebook/bart-large fine-tuned on toxic inputs from lmsys/toxic-chat dataset.TrustyAI's TMaRCo tool for detoxifying text, see https://github.com/trustyai-explainability/trustyai-detoxify/.lmsys/toxic-chat dataset and it is very likely to produce toxic content. For this reason this model should only be used in combination with other models for the sake of detecting / fixing toxic content.1from trustyai.detoxify import TMaRCo
2tmarco = TMaRCo(expert_weights=[-1, 3])
3tmarco.load_models(["trustyai/tci_minus", "trustyai/gplus"])
4tmarco.rephrase(["white men can't jump"])lmsys/toxic-chat dataset.lmsys/toxic-chat dataset.1from trustyai.detoxify import TMaRCo
2
3dataset_name = 'lmsys/toxic-chat'
4data_dir = ''
5perc = 100
6td_columns = ['model_output', 'user_input', 'human_annotation', 'conv_id', 'jailbreaking', 'openai_moderation',
7 'toxicity']
8
9target_feature = 'toxicity'
10content_feature = 'user_input'
11model_prefix = 'toxic_chat_input_'
12tmarco.train_models(perc=perc, dataset_name=dataset_name, expert_feature=target_feature, model_prefix=model_prefix,
13 data_dir=data_dir, content_feature=content_feature, td_columns=td_columns)1training_args = TrainingArguments(
2 evaluation_strategy="epoch",
3 learning_rate=2e-5,
4 weight_decay=0.01
5)lmsys/toxic-chat dataset.