gyung commited on
Commit
984f7e7
โ€ข
1 Parent(s): 02c846b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +22 -0
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
  ๋‹ค์Œ ์ค‘ ํ™”ํ์˜ ์‹œ๊ฐ„๊ฐ€์น˜์— ๊ด€ํ•œ ์„ค๋ช…์œผ๋กœ ์˜ณ์ง€ ์•Š์€ ๊ฒƒ์€ ๋ฌด์—‡์ธ๊ฐ€?