Pankaj Mathur
commited on
Commit
·
f07c509
1
Parent(s):
8ed1547
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,15 +1,199 @@
|
|
| 1 |
---
|
| 2 |
license: llama2
|
| 3 |
datasets:
|
|
|
|
| 4 |
- ehartford/dolphin
|
| 5 |
- psmathur/orca_mini_v1_dataset
|
| 6 |
- psmathur/WizardLM_Orca
|
| 7 |
- psmathur/alpaca_orca
|
| 8 |
- psmathur/dolly-v2_orca
|
|
|
|
|
|
|
|
|
|
| 9 |
language:
|
| 10 |
- en
|
| 11 |
library_name: transformers
|
| 12 |
pipeline_tag: text-generation
|
| 13 |
---
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: llama2
|
| 3 |
datasets:
|
| 4 |
+
- garage-bAInd/Open-Platypus
|
| 5 |
- ehartford/dolphin
|
| 6 |
- psmathur/orca_mini_v1_dataset
|
| 7 |
- psmathur/WizardLM_Orca
|
| 8 |
- psmathur/alpaca_orca
|
| 9 |
- psmathur/dolly-v2_orca
|
| 10 |
+
- tatsu-lab/alpaca
|
| 11 |
+
- databricks/databricks-dolly-15k
|
| 12 |
+
- WizardLM/WizardLM_evol_instruct_V2_196k
|
| 13 |
language:
|
| 14 |
- en
|
| 15 |
library_name: transformers
|
| 16 |
pipeline_tag: text-generation
|
| 17 |
---
|
| 18 |
|
| 19 |
+
# model_007_13b_v2
|
| 20 |
+
|
| 21 |
+
A hybrid (explain + instruct) style Llama2-70b model, Pleae check examples below for both style prompts, Here is the list of datasets used:
|
| 22 |
+
|
| 23 |
+
* Open-Platypus
|
| 24 |
+
* Alpaca
|
| 25 |
+
* WizardLM
|
| 26 |
+
* Dolly-V2
|
| 27 |
+
* Dolphin Samples (~200K)
|
| 28 |
+
* Orca_minis_v1
|
| 29 |
+
* Alpaca_orca
|
| 30 |
+
* WizardLM_orca
|
| 31 |
+
* Dolly-V2_orca
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
<br>
|
| 35 |
+
|
| 36 |
+
**P.S. If you're interested to collaborate, please connect with me at www.linkedin.com/in/pankajam.**
|
| 37 |
+
|
| 38 |
+
<br>
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
|
| 42 |
+
### quantized versions
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
<br>
|
| 46 |
+
|
| 47 |
+
#### license disclaimer:
|
| 48 |
+
|
| 49 |
+
This model is bound by the license & usage restrictions of the original Llama-2 model. And comes with no warranty or gurantees of any kind.
|
| 50 |
+
|
| 51 |
+
<br>
|
| 52 |
+
|
| 53 |
+
## Evaluation
|
| 54 |
+
|
| 55 |
+
We evaluated model_007_13b_v2 on a wide range of tasks using [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) from EleutherAI.
|
| 56 |
+
|
| 57 |
+
Here are the results on metrics used by [HuggingFaceH4 Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
|
| 58 |
+
|
| 59 |
+
|||||
|
| 60 |
+
|:------:|:--------:|:-------:|:--------:|
|
| 61 |
+
|**Task**|**Metric**|**Value**|**Stderr**|
|
| 62 |
+
|*arc_challenge*|acc_norm|0.6314|0.0141|
|
| 63 |
+
|*hellaswag*|acc_norm|0.8242|0.0038|
|
| 64 |
+
|*mmlu*|acc_norm|0.5637|0.0351|
|
| 65 |
+
|*truthfulqa_mc*|mc2|0.5127|0.0157|
|
| 66 |
+
|**Total Average**|-|**0.6329877193**||
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
<br>
|
| 70 |
+
|
| 71 |
+
## Example Usage
|
| 72 |
+
|
| 73 |
+
Here is the Orca prompt format
|
| 74 |
+
|
| 75 |
+
```
|
| 76 |
+
### System:
|
| 77 |
+
You are an AI assistant that follows instruction extremely well. Help as much as you can.
|
| 78 |
+
|
| 79 |
+
### User:
|
| 80 |
+
Tell me about Orcas.
|
| 81 |
+
|
| 82 |
+
### Assistant:
|
| 83 |
+
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
Below shows a code example on how to use this model
|
| 87 |
+
|
| 88 |
+
```python
|
| 89 |
+
import torch
|
| 90 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
| 91 |
+
|
| 92 |
+
tokenizer = AutoTokenizer.from_pretrained("psmathur/model_007_13b_v2")
|
| 93 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 94 |
+
"psmathur/model_007_13b_v2",
|
| 95 |
+
torch_dtype=torch.float16,
|
| 96 |
+
load_in_8bit=True,
|
| 97 |
+
low_cpu_mem_usage=True,
|
| 98 |
+
device_map="auto"
|
| 99 |
+
)
|
| 100 |
+
system_prompt = "### System:\nYou are an AI assistant that follows instruction extremely well. Help as much as you can.\n\n"
|
| 101 |
+
|
| 102 |
+
#generate text steps
|
| 103 |
+
instruction = "Tell me about Orcas."
|
| 104 |
+
prompt = f"{system_prompt}### User: {instruction}\n\n### Assistant:\n"
|
| 105 |
+
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
| 106 |
+
output = model.generate(**inputs, do_sample=True, top_p=0.95, top_k=0, max_new_tokens=4096)
|
| 107 |
+
|
| 108 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
| 109 |
+
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
|
| 113 |
+
Here is the Alpaca prompt format
|
| 114 |
+
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
### User:
|
| 118 |
+
Tell me about Alpacas.
|
| 119 |
+
|
| 120 |
+
### Assistant:
|
| 121 |
+
|
| 122 |
+
```
|
| 123 |
+
|
| 124 |
+
Below shows a code example on how to use this model
|
| 125 |
+
|
| 126 |
+
```python
|
| 127 |
+
import torch
|
| 128 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
| 129 |
+
|
| 130 |
+
tokenizer = AutoTokenizer.from_pretrained("psmathur/model_007_13b_v2")
|
| 131 |
+
model = AutoModelForCausalLM.from_pretrained(
|
| 132 |
+
"psmathur/model_007_13b_v2",
|
| 133 |
+
torch_dtype=torch.float16,
|
| 134 |
+
load_in_8bit=True,
|
| 135 |
+
low_cpu_mem_usage=True,
|
| 136 |
+
device_map="auto"
|
| 137 |
+
)
|
| 138 |
+
#generate text steps
|
| 139 |
+
instruction = "Tell me about Alpacas."
|
| 140 |
+
prompt = f"### User: {instruction}\n\n### Assistant:\n"
|
| 141 |
+
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
| 142 |
+
output = model.generate(**inputs, do_sample=True, top_p=0.95, top_k=0, max_new_tokens=4096)
|
| 143 |
+
|
| 144 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
| 145 |
+
|
| 146 |
+
```
|
| 147 |
+
|
| 148 |
+
<br>
|
| 149 |
+
|
| 150 |
+
#### Limitations & Biases:
|
| 151 |
+
|
| 152 |
+
While this model aims for accuracy, it can occasionally produce inaccurate or misleading results.
|
| 153 |
+
|
| 154 |
+
Despite diligent efforts in refining the pretraining data, there remains a possibility for the generation of inappropriate, biased, or offensive content.
|
| 155 |
+
|
| 156 |
+
Exercise caution and cross-check information when necessary.
|
| 157 |
+
|
| 158 |
+
|
| 159 |
+
<br>
|
| 160 |
+
|
| 161 |
+
### Citiation:
|
| 162 |
+
|
| 163 |
+
Please kindly cite using the following BibTeX:
|
| 164 |
+
|
| 165 |
+
```
|
| 166 |
+
@misc{model_007_13b_v2,
|
| 167 |
+
author = {Pankaj Mathur},
|
| 168 |
+
title = {model_007_13b_v2: A hybrid (explain + instruct) style Llama2-70b model},
|
| 169 |
+
year = {2023},
|
| 170 |
+
publisher = {HuggingFace},
|
| 171 |
+
journal = {HuggingFace repository},
|
| 172 |
+
howpublished = {\url{https://https://huggingface.co/psmathur/orca_mini_v3_13b},
|
| 173 |
+
}
|
| 174 |
+
```
|
| 175 |
+
|
| 176 |
+
```
|
| 177 |
+
@misc{mukherjee2023orca,
|
| 178 |
+
title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
|
| 179 |
+
author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
|
| 180 |
+
year={2023},
|
| 181 |
+
eprint={2306.02707},
|
| 182 |
+
archivePrefix={arXiv},
|
| 183 |
+
primaryClass={cs.CL}
|
| 184 |
+
}
|
| 185 |
+
```
|
| 186 |
+
|
| 187 |
+
```
|
| 188 |
+
@software{touvron2023llama2,
|
| 189 |
+
title={Llama 2: Open Foundation and Fine-Tuned Chat Models},
|
| 190 |
+
author={Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava,
|
| 191 |
+
Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller,
|
| 192 |
+
Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez Madian Khabsa, Isabel Kloumann,
|
| 193 |
+
Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov,
|
| 194 |
+
Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith,
|
| 195 |
+
Ranjan Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu , Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan,
|
| 196 |
+
Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, Thomas Scialom},
|
| 197 |
+
year={2023}
|
| 198 |
+
}
|
| 199 |
+
```
|