SGEcon commited on
Commit
10adf94
β€’
1 Parent(s): ad2fbdd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +9 -10
README.md CHANGED
@@ -50,19 +50,19 @@ If you wish to use the original data, please contact the original author directl
50
  def gen(x):
51
  inputs = tokenizer(f"### 질문: {x}\n\n### λ‹΅λ³€:", return_tensors='pt', return_token_type_ids=False)
52
 
53
- # 데이터λ₯Ό GPU둜 이동(μ‚¬μš© κ°€λŠ₯ν•œ 경우)
54
  inputs = {k: v.to(device="cuda" if torch.cuda.is_available() else "cpu") for k, v in inputs.items()}
55
 
56
  gened = model.generate(
57
  **inputs,
58
- max_new_tokens=256, # μƒˆλ‘œ 생성할 ν† ν°μ˜ μ΅œλŒ€ 개수
59
  early_stopping=True,
60
- num_return_sequences=1, # ν•˜λ‚˜μ˜ λ‹΅λ³€λ§Œ 생성
61
- do_sample=True, # λ‹€μ–‘ν•œ λ‹΅λ³€ 생성을 μœ„ν•΄ μƒ˜ν”Œλ§ ν™œμ„±ν™”
62
- eos_token_id=tokenizer.eos_token_id, # EOS 토큰 ID μ‚¬μš©
63
- temperature=0.9, # 생성 λ‹€μ–‘μ„± μ‘°μ ˆμ„ μœ„ν•œ μ˜¨λ„ μ„€μ •
64
- top_p=0.8, # nucleus samplingμ—μ„œ μ‚¬μš©ν•  p κ°’
65
- top_k=50 # top-k samplingμ—μ„œ μ‚¬μš©ν•  k κ°’
66
  )
67
 
68
  # μƒμ„±λœ μ‹œν€€μŠ€λ₯Ό λ””μ½”λ“œν•˜μ—¬ 좜λ ₯ ν…μŠ€νŠΈλ‘œ λ³€ν™˜
@@ -132,5 +132,4 @@ The copyright of the data used belongs to the original author, so please contact
132
 
133
  > μ€‘μ•™μ€ν–‰μ˜ 역할에 λŒ€ν•΄μ„œ μ„€λͺ…ν•΄μ€„λž˜?
134
 
135
- >> 쀑앙은행은 ν†΅ν™”λ°œν–‰κΆŒκ³Ό κΈˆμœ΅ν†΅μ œκΆŒμ„ 가진 기관이닀. 쀑앙은행은 κ΅­κ°€μ˜ 톡화정책, μ™Έν™˜μ •μ±…, κΈˆμœ΅μ •μ±…μ„ μˆ˜λ¦½ν•˜λŠ” λ™μ‹œμ— 상업은행과 같은 κΈˆμœ΅κΈ°κ΄€μ„ κ°λ…Β·κ°λ…ν•˜λŠ” 업무λ₯Ό μˆ˜ν–‰ν•œλ‹€. 쀑앙은행은 정뢀와 상업은행에 λŒ€ν•œ μžκΈˆλŒ€λΆ€κΈ°κ΄€μ΄λ‹€. 상업은행은 쀑앙은행에 μžκΈˆμ„ λΉŒλ¦¬κ±°λ‚˜ μ˜ˆκΈˆν•œλ‹€. 쀑앙은행은 ν†΅ν™”μ‹ μš©μ •μ±…μ„ μˆ˜ν–‰ν•˜κΈ° μœ„ν•΄ κΈˆμœ΅κΈ°κ΄€μ„ 톡해 μžκΈˆμ„ λŒ€μΆœν•˜κ±°λ‚˜ 예금 λ°›λŠ”λ‹€. 쀑앙은행은 상업은행에 λŒ€ν•œ μžκΈˆλŒ€λΆ€κΈ°κ΄€μ˜ μ—­ν• κ³Ό ν•¨κ»˜ μ‹œμ€‘μ€ν–‰μ— λŒ€ν•œ κ°λ…Β·κ°λ…μ˜ 역할을 μˆ˜ν–‰ν•œλ‹€. 상업은행이 μžκΈˆμ„ λŒ€μΆœν•  λ•ŒλŠ” 1차적으둜 상업은행에 λŒ€μΆœκΈˆμ„ μ§€κΈ‰ν•˜λŠ” λŒ€μ‹ , λŒ€μΆœμ€ν–‰μ— λŒ€μΆœκΈˆμ˜ 일뢀 λ˜λŠ” 전앑을 예금으둜 λ°›μ•„ 쀑앙은행에 λˆμ„ 빌렀주고 μ˜ˆκΈˆν•œλ‹€. μ˜ˆκΈˆμ— λŒ€ν•œ μ΄μžμœ¨μ„ λ†’μ—¬ μ˜ˆκΈˆμžκ°€ 쀑앙은행에 μ˜ˆκΈˆμ„ ν•˜κ²Œλ” μœ λ„ν•˜λŠ” 것이닀. ν•œνŽΈ 상업은행은 λŒ€μΆœμ„ ν•  λ•Œ λŒ€μΆœμ€ν–‰μ΄ λŒ€μΆœκΈˆμ„ μ˜ˆκΈˆν•˜λŠ” λŒ€μ‹ , λŒ€μΆœμ„ λ°›λŠ” 은행에 λŒ€μΆœκΈˆμ„ μ§€κΈ‰ν•œλ‹€.
136
-
 
50
  def gen(x):
51
  inputs = tokenizer(f"### 질문: {x}\n\n### λ‹΅λ³€:", return_tensors='pt', return_token_type_ids=False)
52
 
53
+ # Move data to GPU (if available)
54
  inputs = {k: v.to(device="cuda" if torch.cuda.is_available() else "cpu") for k, v in inputs.items()}
55
 
56
  gened = model.generate(
57
  **inputs,
58
+ max_new_tokens=256, # Maximum number of new tokens to create
59
  early_stopping=True,
60
+ num_return_sequences=1, # Generate only one answer
61
+ do_sample=True, # Enable sampling to generate a variety of answers
62
+ eos_token_id=tokenizer.eos_token_id, # Using EOS Token IDs
63
+ temperature=0.9, # This option is adjustable.
64
+ top_p=0.8, # This option is adjustable.
65
+ top_k=100 # This option is adjustable.
66
  )
67
 
68
  # μƒμ„±λœ μ‹œν€€μŠ€λ₯Ό λ””μ½”λ“œν•˜μ—¬ 좜λ ₯ ν…μŠ€νŠΈλ‘œ λ³€ν™˜
 
132
 
133
  > μ€‘μ•™μ€ν–‰μ˜ 역할에 λŒ€ν•΄μ„œ μ„€λͺ…ν•΄μ€„λž˜?
134
 
135
+ >> μ€‘μ•™μ€ν–‰μ΄λž€ κ΅­κ°€ 및 경제 μ „μ²΄μ˜ κ²½μ œμ•ˆμ • 및 λ°œμ „μ„ λͺ©μ μœΌλ‘œ μ„€λ¦½λœ κΈˆμœ΅κΈ°κ΄€μœΌλ‘œ, μš°λ¦¬λ‚˜λΌμ˜ 경우 ν•œκ΅­μ€ν–‰μ΄λ‹€. 쀑앙은행은 κ΅­κ°€κΈˆμœ΅ 및 μ™Έν™˜μ˜ 쀑좔적인 κΈ°λŠ₯을 μˆ˜ν–‰ν•˜κ³  있으며, κ·Έ κΆŒν•œ 및 κΈ°λŠ₯은 μ€‘μ•™μ€ν–‰λ²•μ—μ„œ κ·œμ •ν•˜κ³  μžˆλ‹€.\n\n### λ§₯락: 쀑앙은행은 κ΅­κ°€κ°€ κ²½μ œμ•ˆμ • 및 λ°œμ „μ„ λͺ©μ μœΌλ‘œ μ„€λ¦½ν•œ κΈˆμœ΅κΈ°κ΄€μ΄λ‹€. λ”°λΌμ„œ 쀑앙은행은 κ΅­κ°€μ˜ 경제λ₯Ό μ•ˆμ •μ μœΌλ‘œ κ΄€λ¦¬ν•˜κ³  λ°œμ „μ‹œν‚€κΈ° μœ„ν•΄ λ‹€μ–‘ν•œ κΈ°λŠ₯을 μˆ˜ν–‰ν•˜κ³  μžˆλ‹€. ### 좔가정보: 쀑앙은행은 톡화정책, κΈˆμœ΅μ‹œμž₯관리, ꡭ제결제, κ΅­κ°€μž¬μ •κ΄€λ¦¬ λ“±μ˜ κΈ°λŠ₯을 μˆ˜ν–‰ν•œλ‹€. 특히 톡화정책은 μ€‘μ•™μ€ν–‰μ˜ κ°€μž₯ μ€‘μš”ν•œ κΈ°λŠ₯으둜, ν†΅ν™”μ •μ±…μ˜ λ°©ν–₯κ³Ό μˆ˜μ€€μ€ 경제의 μ•ˆμ •μ„± 및 λ°œμ „μ— 큰 영ν–₯을 λ―ΈμΉœλ‹€.