Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
datasets:
|
4 |
+
- pankajmathur/orca_mini_v1_dataset
|
5 |
+
- pankajmathur/orca_mini_v8_sharegpt_format
|
6 |
+
language:
|
7 |
+
- en
|
8 |
+
base_model:
|
9 |
+
- microsoft/phi-4
|
10 |
+
library_name: transformers
|
11 |
+
---
|
12 |
+
|
13 |
+
# Model Name: orca_mini_v9_2_14B
|
14 |
+
|
15 |
+
**orca_mini_v9_2_14B is trained with various SFT Datasets on [microsoft/phi-4](https://huggingface.co/microsoft/phi-4) using Llama's architecture.**
|
16 |
+
|
17 |
+
<img src="https://huggingface.co/pankajmathur/orca_mini_v5_8b/resolve/main/orca_minis_small.jpeg" width="auto" />
|
18 |
+
|
19 |
+
<strong>
|
20 |
+
"Obsessed with GenAI's potential? So am I ! Let's create together 🚀 <a href="https://www.linkedin.com/in/pankajam" target="_blank">https://www.linkedin.com/in/pankajam</a>"
|
21 |
+
</strong>
|
22 |
+
|
23 |
+
<br>
|
24 |
+
|
25 |
+
### NOTICE
|
26 |
+
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.
|
27 |
+
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.
|
28 |
+
Dive in and innovate!
|
29 |
+
|
30 |
+
|
31 |
+
### Example Usage
|
32 |
+
|
33 |
+
**Use this model for Free on Google Colab with T4 GPU :)**
|
34 |
+
|
35 |
+
<a target="_blank" href="https://colab.research.google.com/#fileId=https://huggingface.co/pankajmathur/orca_mini_v9_2_14B-Instruct/blob/main/Orca_Mini_Chatbot_14B.ipynb">
|
36 |
+
<img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/>
|
37 |
+
</a>
|
38 |
+
|
39 |
+
### Example Usage on Your Personal Computer
|
40 |
+
|
41 |
+
Download GGUF version here and Follow Ollama instructions:
|
42 |
+
coming soon....
|
43 |
+
|
44 |
+
Here is the Llama3 prompt format
|
45 |
+
```
|
46 |
+
<|begin_of_text|><|start_header_id|>system<|end_header_id|>
|
47 |
+
You are Orca Mini, a helpful AI assistant.<|eot_id|>
|
48 |
+
<|start_header_id|>user<|end_header_id|>
|
49 |
+
Hello Orca Mini, what can you do for me?<|eot_id|>
|
50 |
+
<|start_header_id|>assistant<|end_header_id|>
|
51 |
+
```
|
52 |
+
|
53 |
+
Below shows a code example on how to use this model in default half precision (bfloat16) format
|
54 |
+
|
55 |
+
```python
|
56 |
+
import torch
|
57 |
+
from transformers import pipeline
|
58 |
+
|
59 |
+
model_slug = "pankajmathur/orca_mini_v9_2_14B"
|
60 |
+
pipeline = pipeline(
|
61 |
+
"text-generation",
|
62 |
+
model=model_slug,
|
63 |
+
device_map="auto",
|
64 |
+
)
|
65 |
+
messages = [
|
66 |
+
{"role": "system", "content": "You are Orca Mini, a helpful AI assistant."},
|
67 |
+
{"role": "user", "content": "Hello Orca Mini, what can you do for me?"}
|
68 |
+
]
|
69 |
+
outputs = pipeline(messages, max_new_tokens=128, do_sample=True, temperature=0.01, top_k=100, top_p=0.95)
|
70 |
+
print(outputs[0]["generated_text"][-1])
|
71 |
+
```
|
72 |
+
|
73 |
+
Below shows a code example on how to use this model in 4-bit format via bitsandbytes library
|
74 |
+
|
75 |
+
```python
|
76 |
+
import torch
|
77 |
+
from transformers import BitsAndBytesConfig, pipeline
|
78 |
+
|
79 |
+
model_slug = "pankajmathur/orca_mini_v9_2_14B"
|
80 |
+
quantization_config = BitsAndBytesConfig(
|
81 |
+
load_in_4bit=True,
|
82 |
+
bnb_4bit_quant_type="nf4",
|
83 |
+
bnb_4bit_compute_dtype="float16",
|
84 |
+
bnb_4bit_use_double_quant=True,
|
85 |
+
)
|
86 |
+
pipeline = pipeline(
|
87 |
+
"text-generation",
|
88 |
+
model=model_slug,
|
89 |
+
model_kwargs={"quantization_config": quantization_config},
|
90 |
+
device_map="auto",
|
91 |
+
)
|
92 |
+
messages = [
|
93 |
+
{"role": "system", "content": "You are Orca Mini, a helpful AI assistant."},
|
94 |
+
{"role": "user", "content": "Hello Orca Mini, what can you do for me?"}
|
95 |
+
]
|
96 |
+
outputs = pipeline(messages, max_new_tokens=128, do_sample=True, temperature=0.01, top_k=100, top_p=0.95)
|
97 |
+
print(outputs[0]["generated_text"][-1])
|
98 |
+
|
99 |
+
```
|
100 |
+
|
101 |
+
Below shows a code example on how to use this model in 8-bit format via bitsandbytes library
|
102 |
+
|
103 |
+
```python
|
104 |
+
import torch
|
105 |
+
from transformers import BitsAndBytesConfig, pipeline
|
106 |
+
|
107 |
+
model_slug = "pankajmathur/orca_mini_v9_2_14B"
|
108 |
+
quantization_config = BitsAndBytesConfig(
|
109 |
+
load_in_8bit=True
|
110 |
+
)
|
111 |
+
pipeline = pipeline(
|
112 |
+
"text-generation",
|
113 |
+
model=model_slug,
|
114 |
+
model_kwargs={"quantization_config": quantization_config},
|
115 |
+
device_map="auto",
|
116 |
+
)
|
117 |
+
messages = [
|
118 |
+
{"role": "system", "content": "You are Orca Mini, a helpful AI assistant."},
|
119 |
+
{"role": "user", "content": "Hello Orca Mini, what can you do for me?"}
|
120 |
+
]
|
121 |
+
outputs = pipeline(messages, max_new_tokens=128, do_sample=True, temperature=0.01, top_k=100, top_p=0.95)
|
122 |
+
print(outputs[0]["generated_text"][-1])
|
123 |
+
|
124 |
+
```
|
125 |
+
|
126 |
+
|
127 |
+
[<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)
|