Views
No views yet
| Name | Quant method | Size |
|---|---|---|
| phi-1_5-slimorca.Q2_K.gguf | Q2_K | 0.54GB |
| phi-1_5-slimorca.Q3_K_S.gguf | Q3_K_S | 0.61GB |
| phi-1_5-slimorca.Q3_K.gguf | Q3_K | 0.69GB |
| phi-1_5-slimorca.Q3_K_M.gguf | Q3_K_M | 0.69GB |
| phi-1_5-slimorca.Q3_K_L.gguf | Q3_K_L | 0.75GB |
| phi-1_5-slimorca.IQ4_XS.gguf | IQ4_XS | 0.74GB |
| phi-1_5-slimorca.Q4_0.gguf | Q4_0 | 0.77GB |
| phi-1_5-slimorca.IQ4_NL.gguf | IQ4_NL | 0.78GB |
| phi-1_5-slimorca.Q4_K_S.gguf | Q4_K_S | 0.78GB |
| phi-1_5-slimorca.Q4_K.gguf | Q4_K | 0.83GB |
| phi-1_5-slimorca.Q4_K_M.gguf | Q4_K_M | 0.83GB |
| phi-1_5-slimorca.Q4_1.gguf | Q4_1 | 0.85GB |
| phi-1_5-slimorca.Q5_0.gguf | Q5_0 | 0.92GB |
| phi-1_5-slimorca.Q5_K_S.gguf | Q5_K_S | 0.92GB |
| phi-1_5-slimorca.Q5_K.gguf | Q5_K | 0.96GB |
| phi-1_5-slimorca.Q5_K_M.gguf | Q5_K_M | 0.96GB |
| phi-1_5-slimorca.Q5_1.gguf | Q5_1 | 1.0GB |
| phi-1_5-slimorca.Q6_K.gguf | Q6_K | 1.09GB |
| phi-1_5-slimorca.Q8_0.gguf | Q8_0 | 1.41GB |
1import torch
2import transformers
3
4model = transformers.AutoModelForCausalLM.from_pretrained(
5 "miguelcarv/phi-1_5-slimorca",
6 trust_remote_code=True
7)
8tokenizer = transformers.AutoTokenizer.from_pretrained("microsoft/phi-1_5")
9
10
11SYSTEM_PROMPT = "You are an AI assistant. You will be given a task. You must generate a detailed and long answer."
12input_text = f"""{SYSTEM_PROMPT}
13
14Instruction: Give me the first 5 prime numbers and explain what prime numbers are.
15Output:"""
16
17with torch.no_grad():
18 outputs = model.generate(
19 tokenizer(input_text, return_tensors="pt")['input_ids'],
20 max_length=1024,
21 num_beams = 3,
22 eos_token_id = tokenizer.eos_token_id
23 )
24print(tokenizer.decode(outputs[0], skip_special_tokens=True))