AIdenU commited on
Commit
08bf8ba
โ€ข
1 Parent(s): 4845fc9

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +26 -0
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]))