heegyu commited on
Commit
e0bc742
β€’
1 Parent(s): 9665b04

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +49 -0
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
+ ```