snoop2head commited on
Commit
5a06eba
ยท
1 Parent(s): 85c3838

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +48 -0
README.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # KoGPT-Conditional-2
2
+
3
+ ### Condition format
4
+ ```python
5
+ # create condition sentence
6
+ random_main_logit = np.random.normal(
7
+ loc=3.368,
8
+ scale=1.015,
9
+ size=1
10
+ )[0].round(1)
11
+ random_sub_logit = np.random.normal(
12
+ loc=1.333,
13
+ scale=0.790,
14
+ size=1
15
+ )[0].round(1)
16
+ condition_sentence = f"{random_main_logit}๋งŒํผ ํ–‰๋ณต๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. {random_sub_logit}๋งŒํผ ๋†€๋žŒ๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. "
17
+
18
+ ```
19
+
20
+ ### Input Format
21
+ ```python
22
+ # make input sentence
23
+ input_sentence = "์ˆ˜์ƒํ•œ ๋ฐค๋“ค์ด ๊ณ„์†๋˜๋˜ ๋‚ , ์–ธ์  ๊ฐ€๋ถ€ํ„ฐ ๋‚˜๋Š”"
24
+ condition_plus_input = condition_sentence + input_sentence
25
+ print(condition_plus_input)
26
+ ```
27
+ ```
28
+ 3.9๋งŒํผ ํ–‰๋ณต๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. 1.2๋งŒํผ ๋†€๋žŒ๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. ์ˆ˜์ƒํ•œ ๋ฐค๋“ค์ด ๊ณ„์†๋˜๋˜ ๋‚ , ์–ธ์  ๊ฐ€๋ถ€ํ„ฐ ๋‚˜๋Š”
29
+ ```
30
+
31
+ ### How to infer
32
+ ```
33
+ inferred_sentence = infer_sentence(condition_plus_input, k=10, output_token_length=max_token_length)
34
+ inferred_sentence
35
+ ```
36
+ ```
37
+ ['3.9๋งŒํผ ํ–‰๋ณต๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. 1.2๋งŒํผ ๋†€๋žŒ๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. ์ˆ˜์ƒํ•œ ๋ฐค๋“ค์ด ๊ณ„์†๋˜๋˜ ๋‚ , ์–ธ์  ๊ฐ€๋ถ€ํ„ฐ ๋‚˜๋Š” ์„œ์„œํžˆ ์ œ์ •์‹ ์„ ์ฐจ๋ฆฌ๊ณ  ์ผ์–ด๋‚  ์ˆ˜ ์žˆ์—ˆ๋‹ค',
38
+ '3.9๋งŒํผ ํ–‰๋ณต๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. 1.2๋งŒํผ ๋†€๋žŒ๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. ์ˆ˜์ƒํ•œ ๋ฐค๋“ค์ด ๊ณ„์†๋˜๋˜ ๋‚ , ์–ธ์  ๊ฐ€๋ถ€ํ„ฐ ๋‚˜๋Š” ๋‹ฌ ๋ณด๋Š” ๊ฑธ ์ข‹์•„ํ•˜๊ฒŒ ๋˜์—ˆ๋‹ค',
39
+ '3.9๋งŒํผ ํ–‰๋ณต๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. 1.2๋งŒํผ ๋†€๋žŒ๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. ์ˆ˜์ƒํ•œ ๋ฐค๋“ค์ด ๊ณ„์†๋˜๋˜ ๋‚ , ์–ธ์  ๊ฐ€๋ถ€ํ„ฐ ๋‚˜๋Š” ์ˆ˜์ƒํ•œ ์‚ฌ๋žŒ๋“ค์˜ ์ž…์„ ๋“ค์—ฌ๋‹ค ๋ณผ ์ˆ˜ ์žˆ์—ˆ๋‹ค',
40
+ '3.9๋งŒํผ ํ–‰๋ณต๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. 1.2๋งŒํผ ๋†€๋žŒ๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. ์ˆ˜์ƒํ•œ ๋ฐค๋“ค์ด ๊ณ„์†๋˜๋˜ ๋‚ , ์–ธ์  ๊ฐ€๋ถ€ํ„ฐ ๋‚˜๋Š” ์ด์ƒํ•œ ๋‚˜๋ผ์˜ ์•จ๋ฆฌ์Šค๊ฐ€ ๋˜์–ด ์žˆ์—ˆ๋‹ค',
41
+ '3.9๋งŒํผ ํ–‰๋ณต๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. 1.2๋งŒํผ ๋†€๋žŒ๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. ์ˆ˜์ƒํ•œ ๋ฐค๋“ค์ด ๊ณ„์†๋˜๋˜ ๋‚ , ์–ธ์  ๊ฐ€๋ถ€ํ„ฐ ๋‚˜๋Š” ๊ธฐ์ดํ•œ ๊ฒฝํ—˜์„ ํ–ˆ๋‹ค',
42
+ '3.9๋งŒํผ ํ–‰๋ณต๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. 1.2๋งŒํผ ๋†€๋žŒ๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. ์ˆ˜์ƒํ•œ ๋ฐค๋“ค์ด ๊ณ„์†๋˜๋˜ ๋‚ , ์–ธ์  ๊ฐ€๋ถ€ํ„ฐ ๋‚˜๋Š” ์ด์ƒํ•˜๊ฒŒ๋„ ํ‰ํ™”๊ฐ€ ์ฐพ์•„์˜จ๋‹ค๋Š” ์‚ฌ์‹ค์„ ๊นจ๋‹ฌ์•˜๋‹ค',
43
+ '3.9๋งŒํผ ํ–‰๋ณต๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. 1.2๋งŒํผ ๋†€๋žŒ๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. ์ˆ˜์ƒํ•œ ๋ฐค๋“ค์ด ๊ณ„์†๋˜๋˜ ๋‚ , ์–ธ์  ๊ฐ€๋ถ€ํ„ฐ ๋‚˜๋Š” ์–ด๋‘ ์„ ๋šซ๋Š” ๋ฌด์–ธ๊ฐ€๊ฐ€ ์žˆ๋‹ค๋Š” ๊ฑธ ์•Œ์•˜๋‹ค',
44
+ '3.9๋งŒํผ ํ–‰๋ณต๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. 1.2๋งŒํผ ๋†€๋žŒ๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. ์ˆ˜์ƒํ•œ ๋ฐค๋“ค์ด ๊ณ„์†๋˜๋˜ ๋‚ , ์–ธ์  ๊ฐ€๋ถ€ํ„ฐ ๋‚˜๋Š” ๋‹ฌ๋น›์˜ ์˜๋ฏธ๋ฅผ ์ดํ•ดํ•˜๊ธฐ ์‹œ์ž‘ํ–ˆ๋‹ค',
45
+ '3.9๋งŒํผ ํ–‰๋ณต๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. 1.2๋งŒํผ ๋†€๋žŒ๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. ์ˆ˜์ƒํ•œ ๋ฐค๋“ค์ด ๊ณ„์†๋˜๋˜ ๋‚ , ์–ธ์  ๊ฐ€๋ถ€ํ„ฐ ๋‚˜๋Š” ์•ˆ๋ฐฉ์—์„œ ์ž˜ ๋•Œ ๋‚ด ์†์„ ๊ผญ ์žก์•˜๋‹ค',
46
+ '3.9๋งŒํผ ํ–‰๋ณต๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. 1.2๋งŒํผ ๋†€๋žŒ๊ฐ์ •์ธ ๋ฌธ์žฅ์ด๋‹ค. ์ˆ˜์ƒํ•œ ๋ฐค๋“ค์ด ๊ณ„์†๋˜๋˜ ๋‚ , ์–ธ์  ๊ฐ€๋ถ€ํ„ฐ ๋‚˜๋Š” ์ด์ƒํ•œ ๋‚˜๋ผ์˜ ์•จ๋ฆฌ์Šค์ฒ˜๋Ÿผ ๋ˆˆ์„ ๋ฐ˜์ง์ด๋ฉฐ ์ฃผ์œ„๋ฅผ ํƒ๊ตฌํ•˜๊ธฐ ์‹œ์ž‘ํ–ˆ๋‹ค']
47
+
48
+ ```