JminJ commited on
Commit
51a4437
1 Parent(s): fb1e399

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -45
README.md CHANGED
@@ -22,7 +22,7 @@ NOTE)
22
  **Korean Unsmile Dataset에 clean으로 labeling 되어있던 데이터 중 몇개의 데이터를 0 (bad sentence)으로 수정하였습니다.**
23
  * "~노"가 포함된 문장 중, "이기", "노무"가 포함된 데이터는 0 (bad sentence)으로 수정
24
  * "좆", "봊" 등 성 관련 뉘앙스가 포함된 데이터는 0 (bad sentence)으로 수정
25
- </br></br>
26
 
27
  ## Model Training
28
  * huggingface transformers의 ElectraForSequenceClassification를 사용해 finetuning을 수행하였습니다.
@@ -32,54 +32,13 @@ NOTE)
32
  * [monologg/koELECTRA](https://github.com/monologg/KoELECTRA)
33
  * [tunib/electra-ko-base](https://huggingface.co/tunib/electra-ko-base)
34
 
35
- ### how to train?
36
- ```BASH
37
- python codes/model_source/train_torch_sch.py \
38
- --learning_rate=3e-06 \
39
- --use_float_16=True \
40
- --weight-decay=0.001 \
41
- --base_save_ckpt_path=BASE_SAVE_CHPT_PATH \
42
- --epochs=10 \
43
- --batch_size=128 \
44
- --model_type=MODEL_TYPE
45
- ```
46
- ### parameters
47
- | parameter | type | description | default |
48
- | ---------- | ---------- | ---------- | --------- |
49
- | learning_rate | float | decise learning rate for train | 5e-05 |
50
- | use_float_16 | bool | decise to apply float 16 or not | False |
51
- | weight_decay | float | define weight decay lambda | None |
52
- | base_ckpt_save_path | str | base path that will be saved trained checkpoints | None |
53
- | epochs | int | full train epochs | 5 |
54
- | batch_size | int | batch size using in train time | 64 |
55
- | model_type | int | used to choose what electra model using for training | 0 |
56
- ```
57
- NOTE) train dataset, valid dataset은 train_torch_sch.py 내의 config 부분에서 지정하실 수 있습니다
58
- ```
59
- </br>
60
-
61
  ## How to use model?
62
  ```PYTHON
63
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
64
 
65
- model = AutoModelForSequenceClassification.from_pretrained('JminJ/kcElectra_base_Bad_Sentence_Classifier')
66
- tokenizer = AutoTokenizer.from_pretrained('JminJ/kcElectra_base_Bad_Sentence_Classifier')
67
- ```
68
- </br>
69
-
70
- ## Predict model
71
- 사용자가 테스트 해보고 싶은 문장을 넣어 predict를 수행해 볼 수 있습니다.
72
- ```BASH
73
- python codes/model_source/utils/predict.py \
74
- --input_text=INPUT_TEXT \
75
- --base_ckpt=BASE_CKPT
76
  ```
77
- ### parameters
78
- | parameter | type | description | default |
79
- | ---------- | ---------- | ---------- | --------- |
80
- | input_text | str | user input text | "반갑습니다. JminJ입니다!" |
81
- | base_ckpt | str | base path that saved trained checkpoints | False |
82
- </br>
83
 
84
  ## Model Valid Accuracy
85
  | mdoel | accuracy |
@@ -91,7 +50,6 @@ python codes/model_source/utils/predict.py \
91
  Note)
92
  모든 모델은 동일한 seed, learning_rate(3e-06), weight_decay lambda(0.001), batch_size(128)로 학습되었습니다.
93
  ```
94
- </br>
95
 
96
  ## Contact
97
  * jminju254@gmail.com
 
22
  **Korean Unsmile Dataset에 clean으로 labeling 되어있던 데이터 중 몇개의 데이터를 0 (bad sentence)으로 수정하였습니다.**
23
  * "~노"가 포함된 문장 중, "이기", "노무"가 포함된 데이터는 0 (bad sentence)으로 수정
24
  * "좆", "봊" 등 성 관련 뉘앙스가 포함된 데이터는 0 (bad sentence)으로 수정
25
+ </br>
26
 
27
  ## Model Training
28
  * huggingface transformers의 ElectraForSequenceClassification를 사용해 finetuning을 수행하였습니다.
 
32
  * [monologg/koELECTRA](https://github.com/monologg/KoELECTRA)
33
  * [tunib/electra-ko-base](https://huggingface.co/tunib/electra-ko-base)
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  ## How to use model?
36
  ```PYTHON
37
  from transformers import AutoModelForSequenceClassification, AutoTokenizer
38
 
39
+ model = AutoModelForSequenceClassification.from_pretrained('JminJ/koElectra_base_Bad_Sentence_Classifier')
40
+ tokenizer = AutoTokenizer.from_pretrained('JminJ/koElectra_base_Bad_Sentence_Classifier')
 
 
 
 
 
 
 
 
 
41
  ```
 
 
 
 
 
 
42
 
43
  ## Model Valid Accuracy
44
  | mdoel | accuracy |
 
50
  Note)
51
  모든 모델은 동일한 seed, learning_rate(3e-06), weight_decay lambda(0.001), batch_size(128)로 학습되었습니다.
52
  ```
 
53
 
54
  ## Contact
55
  * jminju254@gmail.com