HatePhi-2
Browse files- README.md +91 -0
- adapter_config.json +34 -0
- adapter_model.safetensors +3 -0
- training_args.bin +3 -0
README.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
library_name: peft
|
| 4 |
+
tags:
|
| 5 |
+
- generated_from_trainer
|
| 6 |
+
base_model: microsoft/phi-2
|
| 7 |
+
model-index:
|
| 8 |
+
- name: hate-phi
|
| 9 |
+
results: []
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
| 13 |
+
should probably proofread and complete it, then remove this comment. -->
|
| 14 |
+
|
| 15 |
+
# hate-phi
|
| 16 |
+
|
| 17 |
+
This model is a fine-tuned version of [microsoft/phi-2](https://huggingface.co/microsoft/phi-2) on an unknown dataset.
|
| 18 |
+
It achieves the following results on the evaluation set:
|
| 19 |
+
- Loss: 0.2799
|
| 20 |
+
- Classification Report: precision recall f1-score support
|
| 21 |
+
|
| 22 |
+
0 0.50 0.23 0.32 422
|
| 23 |
+
1 0.92 0.96 0.94 5753
|
| 24 |
+
2 0.84 0.85 0.85 1260
|
| 25 |
+
|
| 26 |
+
accuracy 0.90 7435
|
| 27 |
+
macro avg 0.75 0.68 0.70 7435
|
| 28 |
+
weighted avg 0.89 0.90 0.89 7435
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
## Model description
|
| 32 |
+
|
| 33 |
+
More information needed
|
| 34 |
+
|
| 35 |
+
## Intended uses & limitations
|
| 36 |
+
|
| 37 |
+
More information needed
|
| 38 |
+
|
| 39 |
+
## Training and evaluation data
|
| 40 |
+
|
| 41 |
+
More information needed
|
| 42 |
+
|
| 43 |
+
## Training procedure
|
| 44 |
+
|
| 45 |
+
### Training hyperparameters
|
| 46 |
+
|
| 47 |
+
The following hyperparameters were used during training:
|
| 48 |
+
- learning_rate: 0.0002
|
| 49 |
+
- train_batch_size: 64
|
| 50 |
+
- eval_batch_size: 16
|
| 51 |
+
- seed: 42
|
| 52 |
+
- gradient_accumulation_steps: 4
|
| 53 |
+
- total_train_batch_size: 256
|
| 54 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
| 55 |
+
- lr_scheduler_type: linear
|
| 56 |
+
- lr_scheduler_warmup_steps: 1
|
| 57 |
+
- num_epochs: 1
|
| 58 |
+
|
| 59 |
+
### Training results
|
| 60 |
+
|
| 61 |
+
| Training Loss | Epoch | Step | Validation Loss | Classification Report |
|
| 62 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
|
| 63 |
+
| 0.6124 | 0.37 | 25 | 0.3696 | precision recall f1-score support
|
| 64 |
+
|
| 65 |
+
0 0.44 0.03 0.05 422
|
| 66 |
+
1 0.90 0.95 0.93 5753
|
| 67 |
+
2 0.74 0.79 0.76 1260
|
| 68 |
+
|
| 69 |
+
accuracy 0.87 7435
|
| 70 |
+
macro avg 0.70 0.59 0.58 7435
|
| 71 |
+
weighted avg 0.85 0.87 0.85 7435
|
| 72 |
+
|
|
| 73 |
+
| 0.3268 | 0.74 | 50 | 0.2900 | precision recall f1-score support
|
| 74 |
+
|
| 75 |
+
0 0.50 0.16 0.25 422
|
| 76 |
+
1 0.92 0.96 0.94 5753
|
| 77 |
+
2 0.82 0.85 0.84 1260
|
| 78 |
+
|
| 79 |
+
accuracy 0.89 7435
|
| 80 |
+
macro avg 0.75 0.66 0.67 7435
|
| 81 |
+
weighted avg 0.88 0.89 0.88 7435
|
| 82 |
+
|
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
### Framework versions
|
| 86 |
+
|
| 87 |
+
- PEFT 0.11.1
|
| 88 |
+
- Transformers 4.39.3
|
| 89 |
+
- Pytorch 2.1.2
|
| 90 |
+
- Datasets 2.18.0
|
| 91 |
+
- Tokenizers 0.15.2
|
adapter_config.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"alpha_pattern": {},
|
| 3 |
+
"auto_mapping": null,
|
| 4 |
+
"base_model_name_or_path": "microsoft/phi-2",
|
| 5 |
+
"bias": "none",
|
| 6 |
+
"fan_in_fan_out": false,
|
| 7 |
+
"inference_mode": true,
|
| 8 |
+
"init_lora_weights": true,
|
| 9 |
+
"layer_replication": null,
|
| 10 |
+
"layers_pattern": null,
|
| 11 |
+
"layers_to_transform": null,
|
| 12 |
+
"loftq_config": {},
|
| 13 |
+
"lora_alpha": 32,
|
| 14 |
+
"lora_dropout": 0.05,
|
| 15 |
+
"megatron_config": null,
|
| 16 |
+
"megatron_core": "megatron.core",
|
| 17 |
+
"modules_to_save": [
|
| 18 |
+
"classifier",
|
| 19 |
+
"score"
|
| 20 |
+
],
|
| 21 |
+
"peft_type": "LORA",
|
| 22 |
+
"r": 1,
|
| 23 |
+
"rank_pattern": {},
|
| 24 |
+
"revision": null,
|
| 25 |
+
"target_modules": [
|
| 26 |
+
"q_proj",
|
| 27 |
+
"k_proj",
|
| 28 |
+
"v_proj",
|
| 29 |
+
"dense"
|
| 30 |
+
],
|
| 31 |
+
"task_type": "SEQ_CLS",
|
| 32 |
+
"use_dora": false,
|
| 33 |
+
"use_rslora": false
|
| 34 |
+
}
|
adapter_model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ccf6c03f8d38720ddd510193289fda367ae521b296d349a80ef51bd8c70dbec1
|
| 3 |
+
size 2685728
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:04a95f4c0554d02f48c1eba55025c6e50787e0892864c74e4d9570d3aac742a8
|
| 3 |
+
size 4856
|