Update README.md
Browse files
README.md
CHANGED
@@ -11,7 +11,29 @@ tags:
|
|
11 |
|
12 |
Sejong-Qwen-test-v1_inference.ipynb: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1nQ_aQFc4m15du8s1fM_v1sI7KnRM1tbq?usp=sharing)
|
13 |
|
|
|
|
|
|
|
|
|
|
|
14 |
``` python
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
# ์
๋ ฅ ํ
์คํธ
|
16 |
input_text = """
|
17 |
๋ค์ ์ค ํํ์ ์๊ฐ๊ฐ์น์ ๊ดํ ์ค๋ช
์ผ๋ก ์ณ์ง ์์ ๊ฒ์ ๋ฌด์์ธ๊ฐ?
|
|
|
11 |
|
12 |
Sejong-Qwen-test-v1_inference.ipynb: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/drive/1nQ_aQFc4m15du8s1fM_v1sI7KnRM1tbq?usp=sharing)
|
13 |
|
14 |
+
# Usage:
|
15 |
+
|
16 |
+
8.7 GB์ GPU RAM์ ์ฌ์ฉํ์ฌ, Colab์์ T4๋ก ์์ ์ ์ธ Inference๊ฐ ๊ฐ๋ฅํฉ๋๋ค.
|
17 |
+
|
18 |
+
|
19 |
``` python
|
20 |
+
!pip install transformers einops accelerate
|
21 |
+
!pip install qwen
|
22 |
+
!pip install unsloth
|
23 |
+
|
24 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM
|
25 |
+
|
26 |
+
# ํ ํฌ๋์ด์ ์ ๋ชจ๋ธ ๋ก๋
|
27 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
28 |
+
"SejongKRX/Sejong-Qwen-test-v1",
|
29 |
+
trust_remote_code=True,
|
30 |
+
use_fast=False
|
31 |
+
)
|
32 |
+
model = AutoModelForCausalLM.from_pretrained(
|
33 |
+
"SejongKRX/Sejong-Qwen-test-v1",
|
34 |
+
trust_remote_code=True
|
35 |
+
)
|
36 |
+
|
37 |
# ์
๋ ฅ ํ
์คํธ
|
38 |
input_text = """
|
39 |
๋ค์ ์ค ํํ์ ์๊ฐ๊ฐ์น์ ๊ดํ ์ค๋ช
์ผ๋ก ์ณ์ง ์์ ๊ฒ์ ๋ฌด์์ธ๊ฐ?
|