x0001 commited on
Commit
feeb56d
0 Parent(s):

Duplicate from localmodels/LLM

Browse files
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,180 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ duplicated_from: localmodels/LLM
3
+ ---
4
+ # Orca Mini v2 13B GPTQ
5
+
6
+ From: https://huggingface.co/psmathur/orca_mini_v2_13b
7
+
8
+ ## Prompt template
9
+
10
+ ```
11
+ ### System:
12
+ You are an AI assistant that follows instruction extremely well. Help as much as you can.
13
+
14
+ ### User:
15
+ {prompt}
16
+
17
+ ### Input:
18
+ {input}
19
+
20
+ ### Response:
21
+ ```
22
+ ---
23
+
24
+ | Model | Bits | Group Size | Act Order (desc_act) | File Size | ExLlama Compatible? | Made With | Description |
25
+ | ------ | ---- | ---------- | -------------------- | --------- | ------------------- | --------- | ----------- |
26
+ | orca_mini_v2_13b-GPTQ-4bit-128g.no-act.order | 4 | 128 | False | 7.45 GB | True | GPTQ-for-LLaMa | Most compatible. Good inference speed in AutoGPTQ and GPTQ-for-LLaMa. |
27
+
28
+ ---
29
+
30
+ # Orca Mini v2 13B
31
+
32
+ An **Uncensored** LLaMA-13b model in collaboration with [Eric Hartford](https://huggingface.co/ehartford). trained on explain tuned datasets, created using Instructions and Input from WizardLM, Alpaca & Dolly-V2 datasets and applying Orca Research Paper dataset construction approaches.
33
+
34
+ Please note this model has *better code generation capabilities* compare to our original orca_mini_13b which was trained on base OpenLLaMA-13b model and which has the [empty spaces issues & found not good for code generation]((https://github.com/openlm-research/open_llama#update-06072023)).
35
+
36
+ # Evaluation
37
+
38
+ I evaluated orca_mini_v2_13b on a wide range of tasks using [Language Model Evaluation Harness](https://github.com/EleutherAI/lm-evaluation-harness) from EleutherAI.
39
+
40
+ Here are the results on metrics used by [HuggingFaceH4 Open LLM Leaderboard](https://huggingface.co/spaces/HuggingFaceH4/open_llm_leaderboard)
41
+
42
+ ||||
43
+ |:------:|:-------------:|:---------:|
44
+ |**Task**|**Value**|**Stderr**|
45
+ |*arc_challenge*|0.5478|0.0145|
46
+ |*hellaswag*|0.7023|0.0040|
47
+ |*mmlu*|0.4969|0.035|
48
+ |*truthfulqa_mc*|0.44|0.0158|
49
+ |*Total Average*|0.54675|0.0114|
50
+
51
+ # Dataset
52
+
53
+ We used uncensored script on top of the previous explain tuned datasets we build which are [WizardLM dataset ~70K](https://github.com/nlpxucan/WizardLM), [Alpaca dataset ~52K](https://crfm.stanford.edu/2023/03/13/alpaca.html) & [Dolly-V2 dataset ~15K](https://github.com/databrickslabs/dolly) created using approaches from [Orca Research Paper](https://arxiv.org/abs/2306.02707).
54
+
55
+ We leverage all of the 15 system instructions provided in Orca Research Paper. to generate custom datasets, in contrast to vanilla instruction tuning approaches used by original datasets.
56
+
57
+ This helps student model aka this model to learn ***thought*** process from teacher model, which is ChatGPT (gpt-3.5-turbo-0301 version).
58
+
59
+ Please see below example usage how the **System** prompt is added before each **instruction**.
60
+
61
+ # Training
62
+
63
+ The training configurations are provided in the table below.
64
+
65
+ The training takes on 4x A100(80G) GPUs and lasts for around 21 Hours for cost of $210 (~$10 for Spot Instance) by using [Azure Standard_NC96ads_A100_v4](https://learn.microsoft.com/en-us/azure/virtual-machines/nc-a100-v4-series#supported-features).
66
+
67
+ We used DeepSpeed with fully sharded data parallelism, also know as [ZeRO stage 3](https://engineering.fb.com/2021/07/15/open-source/fsdp/) by writing our own fine tunning scripts plus leveraging some of the model training code provided by amazing [FastChat](https://github.com/lm-sys/FastChat)
68
+
69
+ Here are some of params used during training:
70
+
71
+ |||
72
+ |:-------------:|:-------------:|
73
+ |*batch_size*|48|
74
+ |*train_micro_batch_size_per_gpu*|3|
75
+ |*gradient_accumulation_steps*|4|
76
+ |*Learning rate*|2e-5|
77
+ |*Max length*|2048|
78
+ |*Epochs*|3|
79
+ |*Optimizer*|AdamW|
80
+
81
+ # Example Usage
82
+
83
+ Here is prompt format for [Oobabooga Text generation UI ](https://github.com/oobabooga/text-generation-webui)
84
+
85
+ ```
86
+ ### System:
87
+ {system}
88
+
89
+ ### User:
90
+ {instruction}
91
+
92
+ ### Input:
93
+ {input}
94
+
95
+ ### Response:
96
+
97
+ ```
98
+
99
+ Limitations & Biases:
100
+
101
+ This model can produce factually incorrect output, and should not be relied on to produce factually accurate information.
102
+ This model was trained on various public datasets. While great efforts have been taken to clean the pretraining data, it is possible that this model could generate lewd, biased or otherwise offensive outputs.
103
+
104
+ Disclaimer:
105
+
106
+ The license on this model does not constitute legal advice. We are not responsible for the actions of third parties who use this model.
107
+ Please cosult an attorney before using this model for commercial purposes.
108
+
109
+
110
+ Citiation:
111
+
112
+ If you found wizardlm_alpaca_dolly_orca_open_llama_7b useful in your research or applications, please kindly cite using the following BibTeX:
113
+
114
+ ```
115
+ @misc{orca_mini_v2_13b,
116
+ author = {Pankaj Mathur},
117
+ title = {orca_mini_v2_13b: An explain tuned LLaMA-13b model on uncensored wizardlm, alpaca, & dolly datasets},
118
+ year = {2023},
119
+ publisher = {GitHub, HuggingFace},
120
+ journal = {GitHub repository, HuggingFace repository},
121
+ howpublished = {\url{https://https://huggingface.co/psmathur/orca_mini_v2_13b},
122
+ }
123
+ ```
124
+ ```
125
+ @misc{mukherjee2023orca,
126
+ title={Orca: Progressive Learning from Complex Explanation Traces of GPT-4},
127
+ author={Subhabrata Mukherjee and Arindam Mitra and Ganesh Jawahar and Sahaj Agarwal and Hamid Palangi and Ahmed Awadallah},
128
+ year={2023},
129
+ eprint={2306.02707},
130
+ archivePrefix={arXiv},
131
+ primaryClass={cs.CL}
132
+ }
133
+ ```
134
+ ```
135
+ @software{touvron2023llama,
136
+ title={LLaMA: Open and Efficient Foundation Language Models},
137
+ author={Touvron, Hugo and Lavril, Thibaut and Izacard, Gautier and Martinet, Xavier and Lachaux, Marie-Anne and Lacroix, Timoth{\'e}e and Rozi{\`e}re, Baptiste and Goyal, Naman and Hambro, Eric and Azhar, Faisal and Rodriguez, Aurelien and Joulin, Armand and Grave, Edouard and Lample, Guillaume},
138
+ journal={arXiv preprint arXiv:2302.13971},
139
+ year={2023}
140
+ }
141
+ ```
142
+ ```
143
+ @misc{openalpaca,
144
+ author = {Yixuan Su and Tian Lan and Deng Cai},
145
+ title = {OpenAlpaca: A Fully Open-Source Instruction-Following Model Based On OpenLLaMA},
146
+ year = {2023},
147
+ publisher = {GitHub},
148
+ journal = {GitHub repository},
149
+ howpublished = {\url{https://github.com/yxuansu/OpenAlpaca}},
150
+ }
151
+ ```
152
+ ```
153
+ @misc{alpaca,
154
+ author = {Rohan Taori and Ishaan Gulrajani and Tianyi Zhang and Yann Dubois and Xuechen Li and Carlos Guestrin and Percy Liang and Tatsunori B. Hashimoto },
155
+ title = {Stanford Alpaca: An Instruction-following LLaMA model},
156
+ year = {2023},
157
+ publisher = {GitHub},
158
+ journal = {GitHub repository},
159
+ howpublished = {\url{https://github.com/tatsu-lab/stanford_alpaca}},
160
+ }
161
+ ```
162
+ ```
163
+ @online{DatabricksBlog2023DollyV2,
164
+ author = {Mike Conover and Matt Hayes and Ankit Mathur and Jianwei Xie and Jun Wan and Sam Shah and Ali Ghodsi and Patrick Wendell and Matei Zaharia and Reynold Xin},
165
+ title = {Free Dolly: Introducing the World's First Truly Open Instruction-Tuned LLM},
166
+ year = {2023},
167
+ url = {https://www.databricks.com/blog/2023/04/12/dolly-first-open-commercially-viable-instruction-tuned-llm},
168
+ urldate = {2023-06-30}
169
+ }
170
+ ```
171
+ ```
172
+ @misc{xu2023wizardlm,
173
+ title={WizardLM: Empowering Large Language Models to Follow Complex Instructions},
174
+ author={Can Xu and Qingfeng Sun and Kai Zheng and Xiubo Geng and Pu Zhao and Jiazhan Feng and Chongyang Tao and Daxin Jiang},
175
+ year={2023},
176
+ eprint={2304.12244},
177
+ archivePrefix={arXiv},
178
+ primaryClass={cs.CL}
179
+ }
180
+ ```
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/content/orca-mini/",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "bos_token_id": 1,
7
+ "eos_token_id": 2,
8
+ "hidden_act": "silu",
9
+ "hidden_size": 5120,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 13824,
12
+ "max_position_embeddings": 2048,
13
+ "max_sequence_length": 2048,
14
+ "model_type": "llama",
15
+ "num_attention_heads": 40,
16
+ "num_hidden_layers": 40,
17
+ "pad_token_id": 0,
18
+ "rms_norm_eps": 1e-06,
19
+ "tie_word_embeddings": false,
20
+ "torch_dtype": "bfloat16",
21
+ "transformers_version": "4.28.1",
22
+ "use_cache": true,
23
+ "vocab_size": 32000
24
+ }
generation_config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 1,
4
+ "eos_token_id": 2,
5
+ "pad_token_id": 0,
6
+ "transformers_version": "4.28.1"
7
+ }
orca_mini_v2_13b-GPTQ-4bit-128g.no-act.order.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d2aa7b2dad267d3dd911716302daee1056bf46087d134490f255287c8bc3be3
3
+ size 7454797240
quantize_config.json ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bits": 4,
3
+ "group_size": 128,
4
+ "damp_percent": 0.01,
5
+ "desc_act": false,
6
+ "sym": true,
7
+ "true_sequential": true
8
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": true,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "eos_token": {
10
+ "content": "</s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": "<unk>",
17
+ "unk_token": {
18
+ "content": "<unk>",
19
+ "lstrip": false,
20
+ "normalized": true,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e556afd44213b6bd1be2b850ebbbd98f5481437a8021afaf58ee7fb1818d347
3
+ size 499723
tokenizer_config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": true,
3
+ "add_eos_token": false,
4
+ "bos_token": {
5
+ "__type": "AddedToken",
6
+ "content": "<s>",
7
+ "lstrip": false,
8
+ "normalized": true,
9
+ "rstrip": false,
10
+ "single_word": false
11
+ },
12
+ "clean_up_tokenization_spaces": false,
13
+ "eos_token": {
14
+ "__type": "AddedToken",
15
+ "content": "</s>",
16
+ "lstrip": false,
17
+ "normalized": true,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "model_max_length": 2048,
22
+ "pad_token": null,
23
+ "padding_side": "right",
24
+ "sp_model_kwargs": {},
25
+ "tokenizer_class": "LlamaTokenizer",
26
+ "unk_token": {
27
+ "__type": "AddedToken",
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": true,
31
+ "rstrip": false,
32
+ "single_word": false
33
+ }
34
+ }