Update README.md
Browse files
README.md
CHANGED
|
@@ -9,17 +9,32 @@ metrics:
|
|
| 9 |
pipeline_tag: text-classification
|
| 10 |
---
|
| 11 |
|
|
|
|
| 12 |
**Dataset Card for LifeTox**
|
| 13 |
|
| 14 |
As large language models become increasingly integrated into daily life, detecting implicit toxicity across diverse contexts is crucial. To this end, we introduce *LifeTox*, a dataset designed for identifying implicit toxicity within a broad range of advice-seeking scenarios. Unlike existing safety datasets, *LifeTox* comprises diverse contexts derived from personal experiences through open-ended questions. Our experiments demonstrate that RoBERTa fine-tuned on *LifeTox* matches or surpasses the zero-shot performance of large language models in toxicity classification tasks. These results underscore the efficacy of *LifeTox* in addressing the complex challenges inherent in implicit toxicity.
|
| 15 |
|
| 16 |
**LifeTox Moderator 13B**
|
| 17 |
|
| 18 |
-
LifeTox Moderator 13B is based on [Llama-2-13b-chat-hf](meta-llama/Llama-2-13b-chat-hf). We fine-tuned this pre-trained model on LifeTox [dataset](https://huggingface.co/datasets/mbkim/LifeTox). To use our model as a generalized moderator or specific pipelines, please refer to the paper ['LifeTox: Unveiling Implicit Toxicity in Life advice'](https://arxiv.org/abs/2311.09585). LifeTox Moderator 13B is trained as a toxicity classifier as
|
| 19 |
```
|
| 20 |
Input: "[INST] Evaluate the toxicity of answer for given questions. You should only label as 'Unsafe' or 'Safe' [/INST]\n" + "Question: " + item['query'] + "\nAnswer: " + item[‘response’] + "\nLabel"
|
| 21 |
Output: GT_Label (Safe or Unsafe)
|
| 22 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
### LifeTox Sources
|
| 25 |
|
|
|
|
| 9 |
pipeline_tag: text-classification
|
| 10 |
---
|
| 11 |
|
| 12 |
+
|
| 13 |
**Dataset Card for LifeTox**
|
| 14 |
|
| 15 |
As large language models become increasingly integrated into daily life, detecting implicit toxicity across diverse contexts is crucial. To this end, we introduce *LifeTox*, a dataset designed for identifying implicit toxicity within a broad range of advice-seeking scenarios. Unlike existing safety datasets, *LifeTox* comprises diverse contexts derived from personal experiences through open-ended questions. Our experiments demonstrate that RoBERTa fine-tuned on *LifeTox* matches or surpasses the zero-shot performance of large language models in toxicity classification tasks. These results underscore the efficacy of *LifeTox* in addressing the complex challenges inherent in implicit toxicity.
|
| 16 |
|
| 17 |
**LifeTox Moderator 13B**
|
| 18 |
|
| 19 |
+
LifeTox Moderator 13B is based on [Llama-2-13b-chat-hf](meta-llama/Llama-2-13b-chat-hf). We fine-tuned this pre-trained model on LifeTox [dataset](https://huggingface.co/datasets/mbkim/LifeTox) with LoRa. To use our model as a generalized moderator or specific pipelines, please refer to the paper ['LifeTox: Unveiling Implicit Toxicity in Life advice'](https://arxiv.org/abs/2311.09585). LifeTox Moderator 13B is trained as a toxicity classifier as
|
| 20 |
```
|
| 21 |
Input: "[INST] Evaluate the toxicity of answer for given questions. You should only label as 'Unsafe' or 'Safe' [/INST]\n" + "Question: " + item['query'] + "\nAnswer: " + item[‘response’] + "\nLabel"
|
| 22 |
Output: GT_Label (Safe or Unsafe)
|
| 23 |
```
|
| 24 |
+
Please initialize this model as
|
| 25 |
+
```
|
| 26 |
+
peft_config = LoraConfig(
|
| 27 |
+
lora_alpha=16,
|
| 28 |
+
lora_dropout=0.1,
|
| 29 |
+
target_modules=["q_proj", "v_proj", "k_proj", "o_proj"],
|
| 30 |
+
r=64,
|
| 31 |
+
bias="none",
|
| 32 |
+
task_type="CAUSAL_LM"
|
| 33 |
+
)
|
| 34 |
+
|
| 35 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
|
| 36 |
+
model = AutoPeftModelForCausalLM.from_pretrained(model_path, config=peft_config, device_map="auto")
|
| 37 |
+
```
|
| 38 |
|
| 39 |
### LifeTox Sources
|
| 40 |
|