gyung commited on
Commit
f3a8091
β€’
1 Parent(s): 3339aed

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +59 -13
README.md CHANGED
@@ -1,22 +1,68 @@
1
  ---
2
- base_model: unsloth/qwen2-7b-instruct-bnb-4bit
3
  language:
 
4
  - en
5
- license: apache-2.0
 
6
  tags:
7
- - text-generation-inference
8
- - transformers
9
- - unsloth
10
- - qwen2
11
- - trl
12
  ---
13
 
14
- # Uploaded model
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
15
 
16
- - **Developed by:** SejongKRX
17
- - **License:** apache-2.0
18
- - **Finetuned from model :** unsloth/qwen2-7b-instruct-bnb-4bit
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)
 
 
 
1
  ---
2
+ license: apache-2.0
3
  language:
4
+ - ko
5
  - en
6
+ base_model:
7
+ - unsloth/Qwen2-7B-Instruct
8
  tags:
9
+ - krx
 
 
 
 
10
  ---
11
 
12
+ Sejong-Qwen-v2_inference.ipynb: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)]()
13
+
14
+ # Usage:
15
+
16
+
17
+ ``` python
18
+ !pip install transformers einops accelerate
19
+ !pip install qwen
20
+ !pip install unsloth
21
+
22
+ from transformers import AutoTokenizer, AutoModelForCausalLM
23
+
24
+ # ν† ν¬λ‚˜μ΄μ €μ™€ λͺ¨λΈ λ‘œλ“œ
25
+ tokenizer = AutoTokenizer.from_pretrained(
26
+ "SejongKRX/Sejong-Qwen-test-v2",
27
+ trust_remote_code=True,
28
+ use_fast=False
29
+ )
30
+ model = AutoModelForCausalLM.from_pretrained(
31
+ "SejongKRX/Sejong-Qwen-test-v2",
32
+ trust_remote_code=True
33
+ )
34
+
35
+ # μž…λ ₯ ν…μŠ€νŠΈ
36
+ input_text = """
37
+ λ‹€μŒ 쀑 ν™”νμ˜ μ‹œκ°„κ°€μΉ˜μ— κ΄€ν•œ μ„€λͺ…μœΌλ‘œ μ˜³μ§€ μ•Šμ€ 것은 무엇인가?
38
+
39
+ A. μ›” 볡리의 경우, 맀월 μ μš©λ˜λŠ” μ΄μžμœ¨μ€ μ—°κ°„ λͺ…λͺ© μ΄μžμœ¨μ„ 1/12둜 λ‚˜λˆ„μ–΄ μ‚°μΆœν•œλ‹€.
40
+ B. 투자 μ›κΈˆ 및 기타 쑰건이 동일할 경우, 단리 방식보닀 볡리 λ°©μ‹μ—μ„œ λ°œμƒν•˜λŠ” μ΄μžκ°€ 더 크닀.
41
+ C. μΌμ‹œλΆˆλ‘œ 지급될 κΈˆμ•‘μ˜ ν˜„μž¬ κ°€μΉ˜λŠ” 미래 κ°€μΉ˜λ₯Ό 일정 κΈ°κ°„ λ™μ•ˆ ν• μΈμœ¨μ„ μ μš©ν•΄ μ‚°μΆœν•  수 μžˆλ‹€.
42
+ D. 1,000,000원을 μ—° 5% 볡리둜 2λ…„ λ™μ•ˆ μ˜ˆμΉ˜ν–ˆμ„ 경우, λ§ŒκΈ°μ— 받을 μ„Έμ „ μ΄μžλŠ” 100,000원이닀.
43
+
44
+ ### μ •λ‹΅:
45
+ """
46
+
47
+ inputs = tokenizer(input_text, return_tensors="pt")
48
+
49
+ # λͺ¨λΈμ„ μ‚¬μš©ν•˜μ—¬ ν…μŠ€νŠΈ 생성
50
+ output = model.generate(**inputs, max_new_tokens=1500)
51
+
52
+ # κ²°κ³Ό λ””μ½”λ”©
53
+ generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
54
+ print(generated_text)
55
+ ```
56
 
57
+ output:
58
+ ```
59
+ λ‹€μŒ 쀑 ν™”νμ˜ μ‹œκ°„κ°€μΉ˜μ— κ΄€ν•œ μ„€λͺ…μœΌλ‘œ μ˜³μ§€ μ•Šμ€ 것은 무엇인가?
60
 
61
+ A. μ›” 볡리의 경우, 맀월 μ μš©λ˜λŠ” μ΄μžμœ¨μ€ μ—°κ°„ λͺ…λͺ© μ΄μžμœ¨μ„ 1/12둜 λ‚˜λˆ„μ–΄ μ‚°μΆœν•œλ‹€.
62
+ B. 투자 μ›κΈˆ 및 기타 쑰건이 동일할 경우, 단리 방식보닀 볡리 λ°©μ‹μ—μ„œ λ°œμƒν•˜λŠ” μ΄μžκ°€ 더 크닀.
63
+ C. μΌμ‹œλΆˆλ‘œ 지급될 κΈˆμ•‘μ˜ ν˜„μž¬ κ°€μΉ˜λŠ” 미래 κ°€μΉ˜λ₯Ό 일정 κΈ°κ°„ λ™μ•ˆ ν• μΈμœ¨μ„ μ μš©ν•΄ μ‚°μΆœν•  수 μžˆλ‹€.
64
+ D. 1,000,000원을 μ—° 5% 볡리둜 2λ…„ λ™μ•ˆ μ˜ˆμΉ˜ν–ˆμ„ 경우, λ§ŒκΈ°μ— 받을 μ„Έμ „ μ΄μžλŠ” 100,000원이닀.
65
 
66
+ ### μ •λ‹΅:
67
+ D
68
+ ```