yukiontheiceberg
commited on
Commit
•
8ae4d54
1
Parent(s):
64d1f17
Update README.md
Browse files
README.md
CHANGED
@@ -14,10 +14,10 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
|
|
14 |
tokenizer = AutoTokenizer.from_pretrained("LLM360/K2-Chat")
|
15 |
model = AutoModelForCausalLM.from_pretrained("LLM360/K2-Chat")
|
16 |
|
17 |
-
prompt = '
|
18 |
|
19 |
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
|
20 |
-
gen_tokens = model.generate(input_ids, do_sample=True,
|
21 |
|
22 |
print("-"*20 + "Output for model" + 20 * '-')
|
23 |
print(tokenizer.batch_decode(gen_tokens)[0])
|
|
|
14 |
tokenizer = AutoTokenizer.from_pretrained("LLM360/K2-Chat")
|
15 |
model = AutoModelForCausalLM.from_pretrained("LLM360/K2-Chat")
|
16 |
|
17 |
+
prompt = 'what is the highest mountain on earth?'
|
18 |
|
19 |
input_ids = tokenizer(prompt, return_tensors="pt").input_ids
|
20 |
+
gen_tokens = model.generate(input_ids, do_sample=True, max_new_tokens=128)
|
21 |
|
22 |
print("-"*20 + "Output for model" + 20 * '-')
|
23 |
print(tokenizer.batch_decode(gen_tokens)[0])
|