gyung commited on
Commit
d09ddc7
β€’
1 Parent(s): aa65694

Update README.md

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