gyung commited on
Commit
1e4465b
β€’
1 Parent(s): 2599962

Update README.md

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