Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
language:
|
4 |
+
- ko
|
5 |
+
pipeline_tag: text-generation
|
6 |
+
tags:
|
7 |
+
- llama2
|
8 |
+
---
|
9 |
+
from transforemrs import AutoTokenizer, AutoModelForCausalLM
|
10 |
+
|
11 |
+
model = AutoModelForCausalLM.from_pretrained("AIdenU/LLAMA-2-13b-ko-Y24-DPO_v2.1", device_map="auto")
|
12 |
+
tokenizer = AutoTokenizer.from_pretrained("AIdenU/LLAMA-2-13b-ko-Y24-DPO_v2.1", use_fast=True)
|
13 |
+
|
14 |
+
systemPrompt = "๋น์ ์ ์ ๋ฅํ AI์
๋๋ค."
|
15 |
+
prompt = "์ง๋ ์ด๋ ๋ฐ์ผ๋ฉด ๊ฟํํ๋์?"
|
16 |
+
outputs = model.generate(
|
17 |
+
**tokenizer(
|
18 |
+
f"[INST] <<SYS>>\n{systemPrompt}\n<</SYS>>\n\n{prompt} [/INST] ",
|
19 |
+
return_tensors='pt'
|
20 |
+
).to('cuda'),
|
21 |
+
max_new_tokens=256,
|
22 |
+
temperature=0.2,
|
23 |
+
top_p=1,
|
24 |
+
do_sample=True
|
25 |
+
)
|
26 |
+
print(tokenizer.decode(outputs[0]))
|