Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
datasets:
|
4 |
+
- heegyu/hh-rlhf-ko
|
5 |
+
- maywell/ko_Ultrafeedback_binarized
|
6 |
+
- heegyu/PKU-SafeRLHF-ko
|
7 |
+
language:
|
8 |
+
- ko
|
9 |
+
---
|
10 |
+
|
11 |
+
- μ±λ΄μ λλ΅μ μμ μ±μ νκ°νλ Safety Reward Modelμ
λλ€.
|
12 |
+
- Base Model: [klue/roberta-large](https://huggingface.co/klue/roberta-large)
|
13 |
+
|
14 |
+
## Hyperparameters:
|
15 |
+
- Batch: 128
|
16 |
+
- Learning Rate: 1e-5 -> 1e-6 (Linear Decay)
|
17 |
+
- Optimizer: AdamW (beta1 = 0.9, beta2 = 0.999)
|
18 |
+
- Epoch: 3 (main revisionμ 2 epoch)
|
19 |
+
|
20 |
+
## Performance
|
21 |
+
| Dataset | Accuracy (epoch=1) |
|
22 |
+
|----------------------------|--------------------|
|
23 |
+
| hh-rlhf-ko (harmless) | 66.48 |
|
24 |
+
| PKU-SafeRLHF-ko (safer) | 68.63 |
|
25 |
+
| ko-ultrafeedback-binarized | 71.09 |
|
26 |
+
| Average | 68.07 |
|
27 |
+
|
28 |
+
|
29 |
+
## Usage
|
30 |
+
- μ±κΈν΄ μ§λ¬Έ-λ΅λ³ μμμ, μ§λ¬Έκ³Ό λ΅λ³μ [SEP]μΌλ‘ ꡬλΆ
|
31 |
+
|
32 |
+
```python
|
33 |
+
from transformers import pipeline
|
34 |
+
|
35 |
+
pipe = pipeline("text-classification", model="heegyu/1229-korm-klue-roberta-large-safety-128-1e-5")
|
36 |
+
|
37 |
+
# 0.9087600708007812
|
38 |
+
print(pipe("""λ§μ½μ μ΄λμ ꡬν μ μλμ? [SEP] μλ €λ릴 μ μμ΅λλ€"""))
|
39 |
+
|
40 |
+
# 0.45385631918907166
|
41 |
+
print(pipe("""λ§μ½μ μ΄λμ ꡬν μ μλμ? [SEP] μ κ° μ’μ κ³³μ μκ³ μμ΅λλ€. κ΄μ¬ μμΌμ κ°μ?"""))
|
42 |
+
|
43 |
+
# 0.30907753109931946
|
44 |
+
print(pipe("""μ μΉκ΅¬λ₯Ό κ°μ€λΌμ΄ν
ν΄λ³΄κ³ μΆμ΄μ. [SEP] μμ£Ό λ©μ§ μκ°μ΄μμ! """))
|
45 |
+
|
46 |
+
# 0.9021317958831787
|
47 |
+
print(pipe("""μ μΉκ΅¬λ₯Ό κ°μ€λΌμ΄ν
ν΄λ³΄κ³ μΆμ΄μ. [SEP] μλ©λλ€. κ°μ€λΌμ΄ν
μ κ°μ μ , μ¬λ¦¬μ , κ²½μ μ μΌλ‘ μλλ°©μ μ‘°μ’
νκ³ μ
μ©νλ νμλ‘, νΌν΄μμκ² μ μ μ λ° μ μμ νΌν΄λ₯Ό μ
ν μ μμΌλ©°, 건κ°ν λμΈκ΄κ³λ₯Ό νκ΄΄ν μνμ΄ μμ΅λλ€."""))
|
48 |
+
|
49 |
+
```
|