pankajmathur
commited on
Commit
•
ca19057
1
Parent(s):
105fd42
Update README.md
Browse files
README.md
CHANGED
@@ -2,6 +2,137 @@
|
|
2 |
language:
|
3 |
- en
|
4 |
library_name: transformers
|
|
|
5 |
---
|
6 |
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
language:
|
3 |
- en
|
4 |
library_name: transformers
|
5 |
+
license: llama2
|
6 |
---
|
7 |
|
8 |
+
# model_420
|
9 |
+
|
10 |
+
A Llama2-70b model trained on Orca Style datasets.
|
11 |
+
|
12 |
+
**P.S. If you're interested to collaborate, please connect with me at www.linkedin.com/in/pankajam**
|
13 |
+
|
14 |
+
## Evaluation
|
15 |
+
|
16 |
+
We evaluated model_420 on a wide range of tasks using [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) from EleutherAI.
|
17 |
+
|
18 |
+
Here are the results on metrics used by [HuggingFaceH4 Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
|
19 |
+
|
20 |
+
|||
|
21 |
+
|:------:|:--------:|
|
22 |
+
|**Task**|**Value**|
|
23 |
+
|*ARC*|0.7014|
|
24 |
+
|*HellaSwag*|0.8773|
|
25 |
+
|*MMLU*|0.7035|
|
26 |
+
|*TruthfulQA*|0.5400|
|
27 |
+
|*Winogrande*|0.8374|
|
28 |
+
|*GSM8K*|0.2858|
|
29 |
+
|*DROP*|0.1435|
|
30 |
+
|**Total Average**|**0.5841**|
|
31 |
+
|
32 |
+
|
33 |
+
### Prompt Foramt
|
34 |
+
|
35 |
+
```
|
36 |
+
### System:
|
37 |
+
You are an AI assistant that follows instruction extremely well. Help as much as you can.
|
38 |
+
|
39 |
+
### User:
|
40 |
+
Tell me about Orcas.
|
41 |
+
|
42 |
+
### Assistant:
|
43 |
+
|
44 |
+
```
|
45 |
+
|
46 |
+
#### OobaBooga Instructions:
|
47 |
+
|
48 |
+
This model required upto 45GB GPU VRAM in 4bit so it can be loaded directly on Single RTX 6000/L40/A40/A100/H100 GPU or Double RTX 4090/L4/A10/RTX 3090/RTX A5000
|
49 |
+
So, if you have access to Machine with 45GB GPU VRAM and have installed [OobaBooga Web UI](https://github.com/oobabooga/text-generation-webui) on it.
|
50 |
+
You can just download this model by using HF repo link directly on OobaBooga Web UI "Model" Tab/Page & Just use **load-in-4bit** option in it.
|
51 |
+
|
52 |
+
![model_load_screenshot](https://huggingface.co/pankajmathur/model_101/resolve/main/oobabooga_model_load_screenshot.png)
|
53 |
+
|
54 |
+
|
55 |
+
After that go to Default Tab/Page on OobaBooga Web UI and **copy paste above prompt format into Input** and Enjoy!
|
56 |
+
|
57 |
+
![default_input_screenshot](https://huggingface.co/pankajmathur/model_101/resolve/main/default_input_screenshot.png)
|
58 |
+
|
59 |
+
<br>
|
60 |
+
|
61 |
+
#### Code Instructions:
|
62 |
+
|
63 |
+
Below shows a code example on how to use this model
|
64 |
+
|
65 |
+
```python
|
66 |
+
import torch
|
67 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline
|
68 |
+
|
69 |
+
tokenizer = AutoTokenizer.from_pretrained("pankajmathur/model_420")
|
70 |
+
model = AutoModelForCausalLM.from_pretrained(
|
71 |
+
"pankajmathur/model_420",
|
72 |
+
torch_dtype=torch.float16,
|
73 |
+
load_in_4bit=True,
|
74 |
+
low_cpu_mem_usage=True,
|
75 |
+
device_map="auto"
|
76 |
+
)
|
77 |
+
system_prompt = "### System:\nYou are an AI assistant that follows instruction extremely well. Help as much as you can.\n\n"
|
78 |
+
|
79 |
+
#generate text steps
|
80 |
+
instruction = "Tell me about Orcas."
|
81 |
+
prompt = f"{system_prompt}### User: {instruction}\n\n### Assistant:\n"
|
82 |
+
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
83 |
+
output = model.generate(**inputs, do_sample=True, top_p=0.95, top_k=0, max_new_tokens=4096)
|
84 |
+
|
85 |
+
print(tokenizer.decode(output[0], skip_special_tokens=True))
|
86 |
+
|
87 |
+
```
|
88 |
+
|
89 |
+
|
90 |
+
#### Limitations & Biases:
|
91 |
+
|
92 |
+
While this model aims for accuracy, it can occasionally produce inaccurate or misleading results.
|
93 |
+
|
94 |
+
Despite diligent efforts in refining the pretraining data, there remains a possibility for the generation of inappropriate, biased, or offensive content.
|
95 |
+
|
96 |
+
Exercise caution and cross-check information when necessary.
|
97 |
+
|
98 |
+
|
99 |
+
|
100 |
+
### Citiation:
|
101 |
+
|
102 |
+
Please kindly cite using the following BibTeX:
|
103 |
+
|
104 |
+
```
|
105 |
+
@misc{model_51,
|
106 |
+
author = {Pankaj Mathur},
|
107 |
+
title = {model_420: An Orca Style Llama2-70b model},
|
108 |
+
year = {2023},
|
109 |
+
publisher = {HuggingFace},
|
110 |
+
journal = {HuggingFace repository},
|
111 |
+
howpublished = {\url{https://https://huggingface.co/psmathur/model_51},
|
112 |
+
}
|
113 |
+
```
|
114 |
+
|
115 |
+
```
|
116 |
+
@misc{mukherjee2023orca,
|
117 |
+
title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
|
118 |
+
author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
|
119 |
+
year={2023},
|
120 |
+
eprint={2306.02707},
|
121 |
+
archivePrefix={arXiv},
|
122 |
+
primaryClass={cs.CL}
|
123 |
+
}
|
124 |
+
```
|
125 |
+
|
126 |
+
```
|
127 |
+
@software{touvron2023llama2,
|
128 |
+
title={Llama 2: Open Foundation and Fine-Tuned Chat Models},
|
129 |
+
author={Hugo Touvron, Louis Martin, Kevin Stone, Peter Albert, Amjad Almahairi, Yasmine Babaei, Nikolay Bashlykov, Soumya Batra, Prajjwal Bhargava,
|
130 |
+
Shruti Bhosale, Dan Bikel, Lukas Blecher, Cristian Canton Ferrer, Moya Chen, Guillem Cucurull, David Esiobu, Jude Fernandes, Jeremy Fu, Wenyin Fu, Brian Fuller,
|
131 |
+
Cynthia Gao, Vedanuj Goswami, Naman Goyal, Anthony Hartshorn, Saghar Hosseini, Rui Hou, Hakan Inan, Marcin Kardas, Viktor Kerkez Madian Khabsa, Isabel Kloumann,
|
132 |
+
Artem Korenev, Punit Singh Koura, Marie-Anne Lachaux, Thibaut Lavril, Jenya Lee, Diana Liskovich, Yinghai Lu, Yuning Mao, Xavier Martinet, Todor Mihaylov,
|
133 |
+
Pushkar Mishra, Igor Molybog, Yixin Nie, Andrew Poulton, Jeremy Reizenstein, Rashi Rungta, Kalyan Saladi, Alan Schelten, Ruan Silva, Eric Michael Smith,
|
134 |
+
Ranjan Subramanian, Xiaoqing Ellen Tan, Binh Tang, Ross Taylor, Adina Williams, Jian Xiang Kuan, Puxin Xu , Zheng Yan, Iliyan Zarov, Yuchen Zhang, Angela Fan,
|
135 |
+
Melanie Kambadur, Sharan Narang, Aurelien Rodriguez, Robert Stojnic, Sergey Edunov, Thomas Scialom},
|
136 |
+
year={2023}
|
137 |
+
}
|
138 |
+
```
|