File size: 4,103 Bytes
7d75cd6 3425326 7d75cd6 3425326 7d75cd6 dff7ae1 7d75cd6 dff7ae1 7d75cd6 e52178a 7d75cd6 db961d0 7d75cd6 3425326 7d75cd6 3425326 7d75cd6 3425326 7d75cd6 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 |
---
license: mit
datasets:
- pankajmathur/orca_mini_v1_dataset
- pankajmathur/orca_mini_v8_sharegpt_format
language:
- en
base_model:
- microsoft/phi-4
library_name: transformers
---
# Model Name: orca_mini_phi-4
**orca_mini_phi-4 is trained with various SFT Datasets on [microsoft/phi-4](https://huggingface.co/microsoft/phi-4) using Llama's architecture.**
<img src="https://huggingface.co/pankajmathur/orca_mini_v5_8b/resolve/main/orca_minis_small.jpeg" width="auto" />
<strong>
"Obsessed with Open Source GenAI's potential? So am I ! Let's Contribute together 🚀 <a href="https://www.linkedin.com/in/pankajam" target="_blank">https://www.linkedin.com/in/pankajam</a>"
</strong>
<br>
### NOTICE
By providing proper credit and attribution, you are granted permission to use this model as a foundational base for further Full fine tuning, DPO, PPO or ORPO tuning and any kind of Merges.
I actively encourage users to customize and enhance the model according to their specific needs, as this version is designed to be a comprehensive general model.
Dive in and innovate!
### Example Usage
**Use this model for Free on Google Colab with T4 GPU :)**
<a target="_blank" href="https://colab.research.google.com/#fileId=https://huggingface.co/pankajmathur/orca_mini_phi-4/blob/main/Orca_Mini_Chat_4bit_Phi_4.ipynb">
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
</a>
### Example Usage on Your Personal Computer
Download GGUF version here and Follow Ollama instructions:
[https://huggingface.co/pankajmathur/orca_mini_phi-4-GGUF](https://huggingface.co/pankajmathur/orca_mini_phi-4-GGUF)
Below shows a code example on how to use this model in default half precision (bfloat16) format
```python
import torch
from transformers import pipeline
model_slug = "pankajmathur/orca_mini_phi-4"
pipeline = pipeline(
"text-generation",
model=model_slug,
device_map="auto",
)
messages = [
{"role": "system", "content": "You are Orca Mini, a helpful AI assistant."},
{"role": "user", "content": "Hello Orca Mini, what can you do for me?"}
]
outputs = pipeline(messages, max_new_tokens=128, do_sample=True, temperature=0.01, top_k=100, top_p=0.95)
print(outputs[0]["generated_text"][-1])
```
Below shows a code example on how to use this model in 4-bit format via bitsandbytes library
```python
import torch
from transformers import BitsAndBytesConfig, pipeline
model_slug = "pankajmathur/orca_mini_phi-4"
quantization_config = BitsAndBytesConfig(
load_in_4bit=True,
bnb_4bit_quant_type="nf4",
bnb_4bit_compute_dtype="float16",
bnb_4bit_use_double_quant=True,
)
pipeline = pipeline(
"text-generation",
model=model_slug,
model_kwargs={"quantization_config": quantization_config},
device_map="auto",
)
messages = [
{"role": "system", "content": "You are Orca Mini, a helpful AI assistant."},
{"role": "user", "content": "Hello Orca Mini, what can you do for me?"}
]
outputs = pipeline(messages, max_new_tokens=128, do_sample=True, temperature=0.01, top_k=100, top_p=0.95)
print(outputs[0]["generated_text"][-1])
```
Below shows a code example on how to use this model in 8-bit format via bitsandbytes library
```python
import torch
from transformers import BitsAndBytesConfig, pipeline
model_slug = "pankajmathur/orca_mini_phi-4"
quantization_config = BitsAndBytesConfig(
load_in_8bit=True
)
pipeline = pipeline(
"text-generation",
model=model_slug,
model_kwargs={"quantization_config": quantization_config},
device_map="auto",
)
messages = [
{"role": "system", "content": "You are Orca Mini, a helpful AI assistant."},
{"role": "user", "content": "Hello Orca Mini, what can you do for me?"}
]
outputs = pipeline(messages, max_new_tokens=128, do_sample=True, temperature=0.01, top_k=100, top_p=0.95)
print(outputs[0]["generated_text"][-1])
```
[<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl) |