nelsonmaligro disham993 commited on
Commit
36b096d
·
0 Parent(s):

Duplicate from disham993/alpaca-train-validation-test-split

Browse files

Co-authored-by: Doula Isham Rashik Hasan <disham993@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
13
+ *.model filter=lfs diff=lfs merge=lfs -text
14
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
15
+ *.npy filter=lfs diff=lfs merge=lfs -text
16
+ *.npz filter=lfs diff=lfs merge=lfs -text
17
+ *.onnx filter=lfs diff=lfs merge=lfs -text
18
+ *.ot filter=lfs diff=lfs merge=lfs -text
19
+ *.parquet filter=lfs diff=lfs merge=lfs -text
20
+ *.pb filter=lfs diff=lfs merge=lfs -text
21
+ *.pickle filter=lfs diff=lfs merge=lfs -text
22
+ *.pkl filter=lfs diff=lfs merge=lfs -text
23
+ *.pt filter=lfs diff=lfs merge=lfs -text
24
+ *.pth filter=lfs diff=lfs merge=lfs -text
25
+ *.rar filter=lfs diff=lfs merge=lfs -text
26
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
27
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar filter=lfs diff=lfs merge=lfs -text
30
+ *.tflite filter=lfs diff=lfs merge=lfs -text
31
+ *.tgz filter=lfs diff=lfs merge=lfs -text
32
+ *.wasm filter=lfs diff=lfs merge=lfs -text
33
+ *.xz filter=lfs diff=lfs merge=lfs -text
34
+ *.zip filter=lfs diff=lfs merge=lfs -text
35
+ *.zst filter=lfs diff=lfs merge=lfs -text
36
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
37
+ # Audio files - uncompressed
38
+ *.pcm filter=lfs diff=lfs merge=lfs -text
39
+ *.sam filter=lfs diff=lfs merge=lfs -text
40
+ *.raw filter=lfs diff=lfs merge=lfs -text
41
+ # Audio files - compressed
42
+ *.aac filter=lfs diff=lfs merge=lfs -text
43
+ *.flac filter=lfs diff=lfs merge=lfs -text
44
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
45
+ *.ogg filter=lfs diff=lfs merge=lfs -text
46
+ *.wav filter=lfs diff=lfs merge=lfs -text
47
+ # Image files - uncompressed
48
+ *.bmp filter=lfs diff=lfs merge=lfs -text
49
+ *.gif filter=lfs diff=lfs merge=lfs -text
50
+ *.png filter=lfs diff=lfs merge=lfs -text
51
+ *.tiff filter=lfs diff=lfs merge=lfs -text
52
+ # Image files - compressed
53
+ *.jpg filter=lfs diff=lfs merge=lfs -text
54
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
55
+ *.webp filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,183 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ license: cc-by-nc-4.0
5
+ size_categories:
6
+ - 10K<n<100K
7
+ task_categories:
8
+ - text-generation
9
+ pretty_name: Alpaca
10
+ tags:
11
+ - instruction-finetuning
12
+ configs:
13
+ - config_name: default
14
+ data_files:
15
+ - split: train
16
+ path: data/train-*
17
+ - split: validation
18
+ path: data/validation-*
19
+ - split: test
20
+ path: data/test-*
21
+ dataset_info:
22
+ features:
23
+ - name: instruction
24
+ dtype: string
25
+ - name: input
26
+ dtype: string
27
+ - name: output
28
+ dtype: string
29
+ - name: text
30
+ dtype: string
31
+ splits:
32
+ - name: train
33
+ num_bytes: 33409057
34
+ num_examples: 36401
35
+ - name: validation
36
+ num_bytes: 7159137
37
+ num_examples: 7801
38
+ - name: test
39
+ num_bytes: 7196544
40
+ num_examples: 7800
41
+ download_size: 24523957
42
+ dataset_size: 47764738
43
+ ---
44
+
45
+ # Dataset Card for Alpaca
46
+
47
+ I have just performed train, test and validation split on the original dataset. Repository to reproduce this will be shared here soon. I am including the orignal Dataset card as follows.
48
+
49
+ ## Dataset Description
50
+
51
+ - **Homepage:** https://crfm.stanford.edu/2023/03/13/alpaca.html
52
+ - **Repository:** https://github.com/tatsu-lab/stanford_alpaca
53
+ - **Paper:**
54
+ - **Leaderboard:**
55
+ - **Point of Contact:** Rohan Taori
56
+
57
+ ### Dataset Summary
58
+
59
+ Alpaca is a dataset of 52,000 instructions and demonstrations generated by OpenAI's `text-davinci-003` engine. This instruction data can be used to conduct instruction-tuning for language models and make the language model follow instruction better.
60
+
61
+ The authors built on the data generation pipeline from [Self-Instruct framework](https://github.com/yizhongw/self-instruct) and made the following modifications:
62
+
63
+ - The `text-davinci-003` engine to generate the instruction data instead of `davinci`.
64
+ - A [new prompt](https://github.com/tatsu-lab/stanford_alpaca/blob/main/prompt.txt) was written that explicitly gave the requirement of instruction generation to `text-davinci-003`.
65
+ - Much more aggressive batch decoding was used, i.e., generating 20 instructions at once, which significantly reduced the cost of data generation.
66
+ - The data generation pipeline was simplified by discarding the difference between classification and non-classification instructions.
67
+ - Only a single instance was generated for each instruction, instead of 2 to 3 instances as in Self-Instruct.
68
+
69
+ This produced an instruction-following dataset with 52K examples obtained at a much lower cost (less than $500).
70
+ In a preliminary study, the authors also found that the 52K generated data to be much more diverse than the data released by [Self-Instruct](https://github.com/yizhongw/self-instruct/blob/main/data/seed_tasks.jsonl).
71
+
72
+ ### Supported Tasks and Leaderboards
73
+
74
+ The Alpaca dataset designed for instruction training pretrained language models.
75
+
76
+ ### Languages
77
+
78
+ The data in Alpaca are in English (BCP-47 en).
79
+
80
+ ## Dataset Structure
81
+
82
+ ### Data Instances
83
+
84
+ An example of "train" looks as follows:
85
+
86
+ ```json
87
+ {
88
+ "instruction": "Create a classification task by clustering the given list of items.",
89
+ "input": "Apples, oranges, bananas, strawberries, pineapples",
90
+ "output": "Class 1: Apples, Oranges\nClass 2: Bananas, Strawberries\nClass 3: Pineapples",
91
+ "text": "Below is an instruction that describes a task, paired with an input that provides further context. Write a response that appropriately completes the request.\n\n### Instruction:\nCreate a classification task by clustering the given list of items.\n\n### Input:\nApples, oranges, bananas, strawberries, pineapples\n\n### Response:\nClass 1: Apples, Oranges\nClass 2: Bananas, Strawberries\nClass 3: Pineapples",
92
+ }
93
+ ```
94
+
95
+ ### Data Fields
96
+
97
+ The data fields are as follows:
98
+
99
+ * `instruction`: describes the task the model should perform. Each of the 52K instructions is unique.
100
+ * `input`: optional context or input for the task. For example, when the instruction is "Summarize the following article", the input is the article. Around 40% of the examples have an input.
101
+ * `output`: the answer to the instruction as generated by `text-davinci-003`.
102
+ * `text`: the `instruction`, `input` and `output` formatted with the [prompt template](https://github.com/tatsu-lab/stanford_alpaca#data-release) used by the authors for fine-tuning their models.
103
+
104
+ ### Data Splits
105
+
106
+ | | train |
107
+ |---------------|------:|
108
+ | alpaca | 52002 |
109
+
110
+ ## Dataset Creation
111
+
112
+ ### Curation Rationale
113
+
114
+ [More Information Needed]
115
+
116
+ ### Source Data
117
+
118
+ #### Initial Data Collection and Normalization
119
+
120
+ [More Information Needed]
121
+
122
+ #### Who are the source language producers?
123
+
124
+ [More Information Needed]
125
+
126
+ ### Annotations
127
+
128
+ #### Annotation process
129
+
130
+ [More Information Needed]
131
+
132
+ #### Who are the annotators?
133
+
134
+ [More Information Needed]
135
+
136
+ ### Personal and Sensitive Information
137
+
138
+ [More Information Needed]
139
+
140
+ ## Considerations for Using the Data
141
+
142
+ ### Social Impact of Dataset
143
+
144
+ Excerpt the [blog post](https://crfm.stanford.edu/2023/03/13/alpaca.html) accompanying the release of this dataset:
145
+
146
+ > We believe that releasing the above assets will enable the academic community to perform controlled scientific studies on instruction-following language models, resulting in better science and ultimately new techniques to address the existing deficiencies with these models. At the same time, any release carries some risk. First, we recognize that releasing our training recipe reveals the feasibility of certain capabilities. On one hand, this enables more people (including bad actors) to create models that could cause harm (either intentionally or not). On the other hand, this awareness might incentivize swift defensive action, especially from the academic community, now empowered by the means to perform deeper safety research on such models. Overall, we believe that the benefits for the research community outweigh the risks of this particular release. Given that we are releasing the training recipe, we believe that releasing the data, model weights, and training code incur minimal further risk, given the simplicity of the recipe. At the same time, releasing these assets has enormous benefits for reproducible science, so that the academic community can use standard datasets, models, and code to perform controlled comparisons and to explore extensions. Deploying an interactive demo for Alpaca also poses potential risks, such as more widely disseminating harmful content and lowering the barrier for spam, fraud, or disinformation. We have put into place two risk mitigation strategies. First, we have implemented a content filter using OpenAI’s content moderation API, which filters out harmful content as defined by OpenAI’s usage policies. Second, we watermark all the model outputs using the method described in Kirchenbauer et al. 2023, so that others can detect (with some probability) whether an output comes from Alpaca 7B. Finally, we have strict terms and conditions for using the demo; it is restricted to non-commercial uses and to uses that follow LLaMA’s license agreement. We understand that these mitigation measures can be circumvented once we release the model weights or if users train their own instruction-following models. However, by installing these mitigations, we hope to advance the best practices and ultimately develop community norms for the responsible deployment of foundation models.
147
+
148
+ ### Discussion of Biases
149
+
150
+ [More Information Needed]
151
+
152
+ ### Other Known Limitations
153
+
154
+ The `alpaca` data is generated by a language model (`text-davinci-003`) and inevitably contains some errors or biases. We encourage users to use this data with caution and propose new methods to filter or improve the imperfections.
155
+
156
+
157
+ ## Additional Information
158
+
159
+ ### Dataset Curators
160
+
161
+ [More Information Needed]
162
+
163
+ ### Licensing Information
164
+
165
+ The dataset is available under the [Creative Commons NonCommercial (CC BY-NC 4.0)](https://creativecommons.org/licenses/by-nc/4.0/legalcode).
166
+
167
+
168
+ ### Citation Information
169
+
170
+ ```
171
+ @misc{alpaca,
172
+ 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 },
173
+ title = {Stanford Alpaca: An Instruction-following LLaMA model},
174
+ year = {2023},
175
+ publisher = {GitHub},
176
+ journal = {GitHub repository},
177
+ howpublished = {\url{https://github.com/tatsu-lab/stanford_alpaca}},
178
+ }
179
+ ```
180
+
181
+ ### Contributions
182
+
183
+ [More Information Needed]
data/test-00000-of-00001-9f6a652027f19250.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cc01146c053419ca5fc370396fd001fdb34421c29d635aee54bf147b8cf0a59c
3
+ size 3694326
data/train-00000-of-00001-56663e4dc2b0545a.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6d8ed24b5ef988c9d7799ac9268c33b937580c4b8686b8afb8ed01c30a4e518a
3
+ size 17142545
data/validation-00000-of-00001-f04e3b4e46336eca.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:02dec3270d0e7e16a970f66a30285917153709eeaf2b3b12b44fca4b9dc20bcb
3
+ size 3687086