yyw/phi2-lora-text-classification
Browse files- README.md +99 -0
- adapter_config.json +26 -0
- adapter_model.safetensors +3 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,99 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: other
|
3 |
+
library_name: peft
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
metrics:
|
7 |
+
- precision
|
8 |
+
- recall
|
9 |
+
- accuracy
|
10 |
+
base_model: microsoft/phi-2
|
11 |
+
model-index:
|
12 |
+
- name: Phi2-Seq-classification-LoRa
|
13 |
+
results: []
|
14 |
+
---
|
15 |
+
|
16 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
17 |
+
should probably proofread and complete it, then remove this comment. -->
|
18 |
+
|
19 |
+
# Phi2-Seq-classification-LoRa
|
20 |
+
|
21 |
+
This model is a fine-tuned version of [microsoft/phi-2](https://huggingface.co/microsoft/phi-2) on the None dataset.
|
22 |
+
It achieves the following results on the evaluation set:
|
23 |
+
- Loss: 2.5015
|
24 |
+
- Precision: 0.9783
|
25 |
+
- Recall: 0.8182
|
26 |
+
- F1-score: 0.8911
|
27 |
+
- Accuracy: 0.9236
|
28 |
+
|
29 |
+
## Model description
|
30 |
+
|
31 |
+
More information needed
|
32 |
+
|
33 |
+
## Intended uses & limitations
|
34 |
+
|
35 |
+
More information needed
|
36 |
+
|
37 |
+
## Training and evaluation data
|
38 |
+
|
39 |
+
More information needed
|
40 |
+
|
41 |
+
## Training procedure
|
42 |
+
|
43 |
+
### Training hyperparameters
|
44 |
+
|
45 |
+
The following hyperparameters were used during training:
|
46 |
+
- learning_rate: 0.0002
|
47 |
+
- train_batch_size: 1
|
48 |
+
- eval_batch_size: 8
|
49 |
+
- seed: 42
|
50 |
+
- gradient_accumulation_steps: 4
|
51 |
+
- total_train_batch_size: 4
|
52 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
53 |
+
- lr_scheduler_type: constant
|
54 |
+
- lr_scheduler_warmup_ratio: 0.03
|
55 |
+
- training_steps: 3000
|
56 |
+
|
57 |
+
### Training results
|
58 |
+
|
59 |
+
| Training Loss | Epoch | Step | Validation Loss | Precision | Recall | F1-score | Accuracy |
|
60 |
+
|:-------------:|:-----:|:----:|:---------------:|:---------:|:------:|:--------:|:--------:|
|
61 |
+
| 0.3914 | 0.7 | 100 | 0.5650 | 0.8571 | 0.6545 | 0.7423 | 0.8264 |
|
62 |
+
| 0.0065 | 1.39 | 200 | 0.8945 | 0.9375 | 0.8182 | 0.8738 | 0.9097 |
|
63 |
+
| 0.2111 | 2.09 | 300 | 0.6418 | 0.9388 | 0.8364 | 0.8846 | 0.9167 |
|
64 |
+
| 0.1823 | 2.78 | 400 | 0.5655 | 0.9773 | 0.7818 | 0.8687 | 0.9097 |
|
65 |
+
| 0.145 | 3.48 | 500 | 0.9232 | 0.9545 | 0.7636 | 0.8485 | 0.8958 |
|
66 |
+
| 0.1095 | 4.17 | 600 | 0.8011 | 0.9583 | 0.8364 | 0.8932 | 0.9236 |
|
67 |
+
| 0.0 | 4.87 | 700 | 0.9774 | 0.9796 | 0.8727 | 0.9231 | 0.9444 |
|
68 |
+
| 0.4204 | 5.57 | 800 | 0.6787 | 0.96 | 0.8727 | 0.9143 | 0.9375 |
|
69 |
+
| 0.0068 | 6.26 | 900 | 1.1916 | 0.9783 | 0.8182 | 0.8911 | 0.9236 |
|
70 |
+
| 0.0004 | 6.96 | 1000 | 0.9468 | 0.9783 | 0.8182 | 0.8911 | 0.9236 |
|
71 |
+
| 0.0 | 7.65 | 1100 | 1.2818 | 0.9787 | 0.8364 | 0.9020 | 0.9306 |
|
72 |
+
| 0.0 | 8.35 | 1200 | 1.2332 | 0.9787 | 0.8364 | 0.9020 | 0.9306 |
|
73 |
+
| 0.0 | 9.04 | 1300 | 1.3078 | 0.9583 | 0.8364 | 0.8932 | 0.9236 |
|
74 |
+
| 0.0 | 9.74 | 1400 | 1.9713 | 0.9773 | 0.7818 | 0.8687 | 0.9097 |
|
75 |
+
| 0.0001 | 10.43 | 1500 | 1.5254 | 0.9773 | 0.7818 | 0.8687 | 0.9097 |
|
76 |
+
| 0.0 | 11.13 | 1600 | 1.8045 | 0.9592 | 0.8545 | 0.9038 | 0.9306 |
|
77 |
+
| 0.0011 | 11.83 | 1700 | 2.7594 | 0.9574 | 0.8182 | 0.8824 | 0.9167 |
|
78 |
+
| 0.0 | 12.52 | 1800 | 1.9378 | 0.9592 | 0.8545 | 0.9038 | 0.9306 |
|
79 |
+
| 0.0 | 13.22 | 1900 | 1.8710 | 0.9592 | 0.8545 | 0.9038 | 0.9306 |
|
80 |
+
| 0.0 | 13.91 | 2000 | 1.8685 | 0.9592 | 0.8545 | 0.9038 | 0.9306 |
|
81 |
+
| 0.0 | 14.61 | 2100 | 1.8683 | 0.9592 | 0.8545 | 0.9038 | 0.9306 |
|
82 |
+
| 0.0384 | 15.3 | 2200 | 2.3028 | 0.9592 | 0.8545 | 0.9038 | 0.9306 |
|
83 |
+
| 0.001 | 16.0 | 2300 | 1.7787 | 0.9216 | 0.8545 | 0.8868 | 0.9167 |
|
84 |
+
| 0.0 | 16.7 | 2400 | 1.8615 | 0.9787 | 0.8364 | 0.9020 | 0.9306 |
|
85 |
+
| 0.8746 | 17.39 | 2500 | 2.6710 | 0.9756 | 0.7273 | 0.8333 | 0.8889 |
|
86 |
+
| 0.0 | 18.09 | 2600 | 1.0475 | 0.9412 | 0.8727 | 0.9057 | 0.9306 |
|
87 |
+
| 0.0 | 18.78 | 2700 | 2.3325 | 0.9778 | 0.8 | 0.8800 | 0.9167 |
|
88 |
+
| 0.0001 | 19.48 | 2800 | 1.3658 | 0.94 | 0.8545 | 0.8952 | 0.9236 |
|
89 |
+
| 0.0 | 20.17 | 2900 | 2.4668 | 0.9783 | 0.8182 | 0.8911 | 0.9236 |
|
90 |
+
| 0.0 | 20.87 | 3000 | 2.5015 | 0.9783 | 0.8182 | 0.8911 | 0.9236 |
|
91 |
+
|
92 |
+
|
93 |
+
### Framework versions
|
94 |
+
|
95 |
+
- PEFT 0.7.1
|
96 |
+
- Transformers 4.36.2
|
97 |
+
- Pytorch 2.1.0+cu121
|
98 |
+
- Datasets 2.16.1
|
99 |
+
- Tokenizers 0.15.0
|
adapter_config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
"layers_pattern": null,
|
10 |
+
"layers_to_transform": null,
|
11 |
+
"loftq_config": {},
|
12 |
+
"lora_alpha": 16,
|
13 |
+
"lora_dropout": 0.05,
|
14 |
+
"megatron_config": null,
|
15 |
+
"megatron_core": "megatron.core",
|
16 |
+
"modules_to_save": null,
|
17 |
+
"peft_type": "LORA",
|
18 |
+
"r": 32,
|
19 |
+
"rank_pattern": {},
|
20 |
+
"revision": null,
|
21 |
+
"target_modules": [
|
22 |
+
"out_proj",
|
23 |
+
"Wqkv"
|
24 |
+
],
|
25 |
+
"task_type": "SEQ_CLS"
|
26 |
+
}
|
adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:32c522b2c7fc5d5bc98dabe2ea4b4e4c18ac4837f120514cfc25ba62f2c58b75
|
3 |
+
size 62951224
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f3a7a40230f7334d628486c406b369b4678ff8a3e8797811bf530c050c2a3f7a
|
3 |
+
size 4728
|