gyung commited on
Commit
e69f63d
β€’
1 Parent(s): 8032c24

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +67 -0
README.md CHANGED
@@ -9,6 +9,7 @@ tags:
9
  - unsloth
10
  - qwen2
11
  - trl
 
12
  ---
13
 
14
  # Uploaded model
@@ -20,3 +21,69 @@ tags:
20
  This qwen2 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
21
 
22
  [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
9
  - unsloth
10
  - qwen2
11
  - trl
12
+ - krx
13
  ---
14
 
15
  # Uploaded model
 
21
  This qwen2 model was trained 2x faster with [Unsloth](https://github.com/unslothai/unsloth) and Huggingface's TRL library.
22
 
23
  [<img src="https://raw.githubusercontent.com/unslothai/unsloth/main/images/unsloth%20made%20with%20love.png" width="200"/>](https://github.com/unslothai/unsloth)
24
+
25
+
26
+ # Usage:
27
+
28
+
29
+ ``` python
30
+ !pip install transformers einops accelerate
31
+ !pip install qwen
32
+ !pip install unsloth
33
+
34
+ from transformers import AutoTokenizer, AutoModelForCausalLM
35
+
36
+ # ν† ν¬λ‚˜μ΄μ €μ™€ λͺ¨λΈ λ‘œλ“œ
37
+ tokenizer = AutoTokenizer.from_pretrained(
38
+ "SejongKRX/Sejong-Qwen-3",
39
+ trust_remote_code=True,
40
+ use_fast=False
41
+ )
42
+ model = AutoModelForCausalLM.from_pretrained(
43
+ "SejongKRX/Sejong-Qwen-3",
44
+ trust_remote_code=True
45
+ )
46
+
47
+ # μž…λ ₯ ν…μŠ€νŠΈ
48
+ input_text = """
49
+ λ‹€μŒ 쀑 ν™”νμ˜ μ‹œκ°„κ°€μΉ˜μ— κ΄€ν•œ μ„€λͺ…μœΌλ‘œ μ˜³μ§€ μ•Šμ€ 것은 무엇인가?
50
+
51
+ A. μ›” 볡리의 경우, 맀월 μ μš©λ˜λŠ” μ΄μžμœ¨μ€ μ—°κ°„ λͺ…λͺ© μ΄μžμœ¨μ„ 1/12둜 λ‚˜λˆ„μ–΄ μ‚°μΆœν•œλ‹€.
52
+ B. 투자 μ›κΈˆ 및 기타 쑰건이 동일할 경우, 단리 방식보닀 볡리 λ°©μ‹μ—μ„œ λ°œμƒν•˜λŠ” μ΄μžκ°€ 더 크닀.
53
+ C. μΌμ‹œλΆˆλ‘œ 지급될 κΈˆμ•‘μ˜ ν˜„μž¬ κ°€μΉ˜λŠ” 미래 κ°€μΉ˜λ₯Ό 일정 κΈ°κ°„ λ™μ•ˆ ν• μΈμœ¨μ„ μ μš©ν•΄ μ‚°μΆœν•  수 μžˆλ‹€.
54
+ D. 1,000,000원을 μ—° 5% 볡리둜 2λ…„ λ™μ•ˆ μ˜ˆμΉ˜ν–ˆμ„ 경우, λ§ŒκΈ°μ— 받을 μ„Έμ „ μ΄μžλŠ” 100,000원이닀.
55
+
56
+ ### μ •λ‹΅:
57
+ """
58
+
59
+ inputs = tokenizer(input_text, return_tensors="pt")
60
+
61
+ # λͺ¨λΈμ„ μ‚¬μš©ν•˜μ—¬ ν…μŠ€νŠΈ 생성
62
+ output = model.generate(**inputs, max_new_tokens=1500)
63
+
64
+ # κ²°κ³Ό λ””μ½”λ”©
65
+ generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
66
+ print(generated_text)
67
+ ```
68
+
69
+ output:
70
+ ```
71
+ λ‹€μŒ 쀑 ν™”νμ˜ μ‹œκ°„κ°€μΉ˜μ— κ΄€ν•œ μ„€λͺ…μœΌλ‘œ μ˜³μ§€ μ•Šμ€ 것은 무엇인가?
72
+
73
+ A. μ›” 볡리의 경우, 맀월 μ μš©λ˜λŠ” μ΄μžμœ¨μ€ μ—°κ°„ λͺ…λͺ© μ΄μžμœ¨μ„ 1/12둜 λ‚˜λˆ„μ–΄ μ‚°μΆœν•œλ‹€.
74
+ B. 투자 μ›κΈˆ 및 기타 쑰건이 동일할 경우, 단리 방식보닀 볡리 λ°©μ‹μ—μ„œ λ°œμƒν•˜λŠ” μ΄μžκ°€ 더 크닀.
75
+ C. μΌμ‹œλΆˆλ‘œ 지급될 κΈˆμ•‘μ˜ ν˜„μž¬ κ°€μΉ˜λŠ” 미래 κ°€μΉ˜λ₯Ό 일정 κΈ°κ°„ λ™μ•ˆ ν• μΈμœ¨μ„ μ μš©ν•΄ μ‚°μΆœν•  수 μžˆλ‹€.
76
+ D. 1,000,000원을 μ—° 5% 볡리둜 2λ…„ λ™μ•ˆ μ˜ˆμΉ˜ν–ˆμ„ 경우, λ§ŒκΈ°μ— 받을 μ„Έμ „ μ΄μžλŠ” 100,000원이닀.
77
+
78
+ ### μ •λ‹΅:
79
+ D
80
+ ```
81
+
82
+
83
+ # Dataset
84
+
85
+ λ³Έ λͺ¨λΈμ€ λ‹€μ–‘ν•œ 좜처의 데이터(mlabonne의 open-perfectblend, Wikipedia, ν•œκ΅­μ€ν–‰μ˜ 곡곡 데이터 λ“±)λ₯Ό ν™œμš©ν•˜μ—¬ ν•™μŠ΅λ˜μ—ˆμœΌλ©°, λͺ¨λ“  λ°μ΄ν„°λŠ” μ €μž‘κΆŒ 및 μ‚¬μš© 정책에 따라 적절히 μ‚¬μš©λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
86
+
87
+ - Wikipedia λ°μ΄ν„°λŠ” CC BY-SA 4.0 λΌμ΄μ„ μŠ€λ₯Ό λ”°λ¦…λ‹ˆλ‹€. μžμ„Έν•œ μ •λ³΄λŠ” [μ—¬κΈ°](https://creativecommons.org/licenses/by-sa/4.0/)μ—μ„œ 확인할 수 μžˆμŠ΅λ‹ˆλ‹€.
88
+ - ν•œκ΅­μ€ν–‰μ˜ λ°μ΄ν„°λŠ” ν•œκ΅­μ€ν–‰μ˜ [μ €μž‘κΆŒ 보호방침](https://www.bok.or.kr)에 따라 μ‚¬μš©λ˜μ—ˆμŠ΅λ‹ˆλ‹€.
89
+ - mlabonne의 open-perfectblend λ°μ΄ν„°λŠ” Apache 2.0 λΌμ΄μ„ μŠ€λ₯Ό λ”°λ¦…λ‹ˆλ‹€. λΌμ΄μ„ μŠ€μ— λŒ€ν•œ μžμ„Έν•œ λ‚΄μš©μ€ [Apache 2.0 λΌμ΄μ„ μŠ€](https://www.apache.org/licenses/LICENSE-2.0)μ—μ„œ 확인할 수 μžˆμŠ΅λ‹ˆλ‹€.