Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| phi-2-instruct-apo.Q2_K.gguf | Q2_K | 1.03GB |
| phi-2-instruct-apo.IQ3_XS.gguf | IQ3_XS | 1.12GB |
| phi-2-instruct-apo.IQ3_S.gguf | IQ3_S | 1.16GB |
| phi-2-instruct-apo.Q3_K_S.gguf | Q3_K_S | 1.16GB |
| phi-2-instruct-apo.IQ3_M.gguf | IQ3_M | 1.23GB |
| phi-2-instruct-apo.Q3_K.gguf | Q3_K | 1.33GB |
| phi-2-instruct-apo.Q3_K_M.gguf | Q3_K_M | 1.33GB |
| phi-2-instruct-apo.Q3_K_L.gguf | Q3_K_L | 1.46GB |
| phi-2-instruct-apo.IQ4_XS.gguf | IQ4_XS | 1.43GB |
| phi-2-instruct-apo.Q4_0.gguf | Q4_0 | 1.49GB |
| phi-2-instruct-apo.IQ4_NL.gguf | IQ4_NL | 1.5GB |
| phi-2-instruct-apo.Q4_K_S.gguf | Q4_K_S | 1.5GB |
| phi-2-instruct-apo.Q4_K.gguf | Q4_K | 1.62GB |
| phi-2-instruct-apo.Q4_K_M.gguf | Q4_K_M | 1.62GB |
| phi-2-instruct-apo.Q4_1.gguf | Q4_1 | 1.64GB |
| phi-2-instruct-apo.Q5_0.gguf | Q5_0 | 1.8GB |
| phi-2-instruct-apo.Q5_K_S.gguf | Q5_K_S | 1.8GB |
| phi-2-instruct-apo.Q5_K.gguf | Q5_K | 1.86GB |
| phi-2-instruct-apo.Q5_K_M.gguf | Q5_K_M | 1.86GB |
| phi-2-instruct-apo.Q5_1.gguf | Q5_1 | 1.95GB |
| phi-2-instruct-apo.Q6_K.gguf | Q6_K | 2.12GB |
| phi-2-instruct-apo.Q8_0.gguf | Q8_0 | 2.75GB |
1<|im_start|>system
2You are a helpful assistant.<|im_end|>
3<|im_start|>user
4Question?<|im_end|>
5<|im_start|>assistant1<|im_start|>system
2You are a helpful assistant.<|im_end|>
3<|im_start|>user
4How to explain Internet for a medieval knight?<|im_end|>
5<|im_start|>assistant<|im_start|>assistant .1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
3
4torch.random.manual_seed(0)
5
6model_id = "rasyosef/phi-2-instruct-apo"
7model = AutoModelForCausalLM.from_pretrained(
8 model_id,
9 device_map="cuda",
10 torch_dtype="auto"
11)
12
13tokenizer = AutoTokenizer.from_pretrained(model_id)
14
15messages = [
16 {"role": "system", "content": "You are a helpful AI assistant."},
17 {"role": "user", "content": "Can you provide ways to eat combinations of bananas and dragonfruits?"},
18 {"role": "assistant", "content": "Sure! Here are some ways to eat bananas and dragonfruits together: 1. Banana and dragonfruit smoothie: Blend bananas and dragonfruits together with some milk and honey. 2. Banana and dragonfruit salad: Mix sliced bananas and dragonfruits together with some lemon juice and honey."},
19 {"role": "user", "content": "What about solving an 2x + 3 = 7 equation?"},
20]
21
22pipe = pipeline(
23 "text-generation",
24 model=model,
25 tokenizer=tokenizer,
26)
27
28generation_args = {
29 "max_new_tokens": 256,
30 "return_full_text": False,
31 "temperature": 0.0,
32 "do_sample": False,
33}
34
35output = pipe(messages, **generation_args)
36print(output[0]['generated_text']) | Model | Phi-2-Instruct-APO | Phi-2 |
|---|---|---|
| Size (# params) | 2.7B | 2.7B |
| IFEval | 34.48 | 26.53 |
| GSM8K | 52.16 | 56.44 |
| MMLU | 44.88 | 56.70 |
| TruthfulQA | 49.44 | 44.48 |
| Winogrande | 75.61 | 73.72 |