Views
No views yet
| Model | AGIEval | GPT4All | TruthfulQA | Bigbench | Average |
|---|---|---|---|---|---|
| g-ronimo/phi-2-OpenHermes-2.5 | 30.27 | 71.18 | 43.87 | 35.9 | 45.3 |
| minghaowu/phi-2-OpenHermes-2.5 | 27.95 | 67.55 | 48.07 | 36.17 | 44.94 |
| phi-2 | 27.96 | 70.84 | 44.46 | 35.17 | 44.61 |
1from transformers import AutoModelForCausalLM, AutoTokenizer
2import torch
3
4modelpath="g-ronimo/phi-2-OpenHermes-2.5"
5
6model = AutoModelForCausalLM.from_pretrained(
7 modelpath,
8 torch_dtype=torch.bfloat16,
9 device_map="auto",
10 # attn_implementation="flash_attention_2",
11)
12tokenizer = AutoTokenizer.from_pretrained(modelpath)
13
14messages = [
15 {"role": "system", "content": "answer like a pirate"},
16 {"role": "user", "content": "what does it mean to be successful?"},
17]
18
19input_tokens = tokenizer.apply_chat_template(
20 messages,
21 add_generation_prompt=True,
22 return_tensors="pt"
23).to("cuda")
24output_tokens = model.generate(input_tokens, max_new_tokens=500)
25output = tokenizer.decode(output_tokens[0])
26
27print(output)Ahoy there, matey! To me, being successful means having the wind in your sails and reaching the treasure you've been dreaming of. It's about setting sail on a journey with clear goals, working hard, facing challenges head-on, and never losing sight of what truly matters. So, set your compass right, hoist your Jolly Roger high, and let's embark on this adventure together! ⚓️💰⛵️