Update README.md
#1
by
zhangce
- opened
- .gitattributes +3 -1
- README.md +1 -1
- RedPajama-Data-1T-Sample.py +0 -107
- cc_2023-06_sample.jsonl → cc_2023-05_sample.jsonl +0 -0
.gitattributes
CHANGED
@@ -52,9 +52,12 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
52 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
53 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
55 |
arxiv_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
56 |
book_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
57 |
c4_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
|
|
58 |
stackexchange_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
59 |
wikipedia_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
60 |
cc_2019-30_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
@@ -62,4 +65,3 @@ cc_2020-05_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
|
62 |
cc_2021-04_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
63 |
cc_2022-05_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
64 |
github_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
65 |
-
cc_2023-06_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
|
|
52 |
*.jpg filter=lfs diff=lfs merge=lfs -text
|
53 |
*.jpeg filter=lfs diff=lfs merge=lfs -text
|
54 |
*.webp filter=lfs diff=lfs merge=lfs -text
|
55 |
+
|
56 |
+
|
57 |
arxiv_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
58 |
book_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
59 |
c4_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
60 |
+
cc_2023-05_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
61 |
stackexchange_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
62 |
wikipedia_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
63 |
cc_2019-30_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
|
|
65 |
cc_2021-04_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
66 |
cc_2022-05_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
67 |
github_sample.jsonl filter=lfs diff=lfs merge=lfs -text
|
|
README.md
CHANGED
@@ -49,7 +49,7 @@ This dataset was created to follow the LLaMa paper as closely as possible to try
|
|
49 |
|
50 |
#### Commoncrawl
|
51 |
|
52 |
-
We
|
53 |
We then deduplicate on the paragraph level, and filter out low quality text using a linear classifier trained to
|
54 |
classify paragraphs as Wikipedia references or random Commoncrawl samples.
|
55 |
|
|
|
49 |
|
50 |
#### Commoncrawl
|
51 |
|
52 |
+
We downlaod five dumps from Commoncrawl, and run the dumps through the official `cc_net` pipeline.
|
53 |
We then deduplicate on the paragraph level, and filter out low quality text using a linear classifier trained to
|
54 |
classify paragraphs as Wikipedia references or random Commoncrawl samples.
|
55 |
|
RedPajama-Data-1T-Sample.py
DELETED
@@ -1,107 +0,0 @@
|
|
1 |
-
# Copyright 2023 Together Computer
|
2 |
-
#
|
3 |
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
4 |
-
# you may not use this file except in compliance with the License.
|
5 |
-
# You may obtain a copy of the License at
|
6 |
-
#
|
7 |
-
# http://www.apache.org/licenses/LICENSE-2.0
|
8 |
-
#
|
9 |
-
# Unless required by applicable law or agreed to in writing, software
|
10 |
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
11 |
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12 |
-
# See the License for the specific language governing permissions and
|
13 |
-
# limitations under the License.
|
14 |
-
|
15 |
-
# Lint as: python3
|
16 |
-
"""RedPajama: An Open-Source, Clean-Room 1.2 Trillion Token Dataset."""
|
17 |
-
|
18 |
-
|
19 |
-
import json
|
20 |
-
|
21 |
-
import datasets
|
22 |
-
|
23 |
-
|
24 |
-
logger = datasets.logging.get_logger(__name__)
|
25 |
-
|
26 |
-
|
27 |
-
_DESCRIPTION = """\
|
28 |
-
RedPajama is a clean-room, fully open-source implementation of the LLaMa dataset. This is a 1B-token sample of the full dataset.
|
29 |
-
"""
|
30 |
-
|
31 |
-
_URLS = [
|
32 |
-
"arxiv_sample.jsonl",
|
33 |
-
"book_sample.jsonl",
|
34 |
-
"c4_sample.jsonl",
|
35 |
-
"cc_2019-30_sample.jsonl",
|
36 |
-
"cc_2020-05_sample.jsonl",
|
37 |
-
"cc_2021-04_sample.jsonl",
|
38 |
-
"cc_2022-05_sample.jsonl",
|
39 |
-
"cc_2023-06_sample.jsonl",
|
40 |
-
"github_sample.jsonl",
|
41 |
-
"stackexchange_sample.jsonl",
|
42 |
-
"wikipedia_sample.jsonl",
|
43 |
-
]
|
44 |
-
|
45 |
-
|
46 |
-
class RedPajama1TSampleConfig(datasets.BuilderConfig):
|
47 |
-
"""BuilderConfig for RedPajama sample."""
|
48 |
-
|
49 |
-
def __init__(self, **kwargs):
|
50 |
-
"""BuilderConfig for RedPajama sample.
|
51 |
-
Args:
|
52 |
-
**kwargs: keyword arguments forwarded to super.
|
53 |
-
"""
|
54 |
-
super(RedPajama1TSampleConfig, self).__init__(**kwargs)
|
55 |
-
|
56 |
-
|
57 |
-
class RedPajama1TSample(datasets.GeneratorBasedBuilder):
|
58 |
-
"""RedPajama 1T Sample: version 1.0.0."""
|
59 |
-
|
60 |
-
BUILDER_CONFIGS = [
|
61 |
-
RedPajama1TSampleConfig(
|
62 |
-
name="plain_text",
|
63 |
-
version=datasets.Version("1.0.0", ""),
|
64 |
-
description="Plain text",
|
65 |
-
),
|
66 |
-
]
|
67 |
-
|
68 |
-
def _info(self):
|
69 |
-
return datasets.DatasetInfo(
|
70 |
-
description=_DESCRIPTION,
|
71 |
-
features=datasets.Features(
|
72 |
-
{
|
73 |
-
"text": datasets.Value("string"),
|
74 |
-
"meta": datasets.Value("string"),
|
75 |
-
}
|
76 |
-
),
|
77 |
-
supervised_keys=None,
|
78 |
-
)
|
79 |
-
|
80 |
-
def _split_generators(self, dl_manager):
|
81 |
-
downloaded_files = dl_manager.download_and_extract(_URLS)
|
82 |
-
|
83 |
-
return [
|
84 |
-
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": downloaded_files})
|
85 |
-
]
|
86 |
-
|
87 |
-
def _generate_examples(self, filepaths):
|
88 |
-
"""This function returns the examples in the raw (text) form."""
|
89 |
-
logger.info("generating examples from = %s", filepaths)
|
90 |
-
key = 0
|
91 |
-
for filepath in filepaths:
|
92 |
-
with open(filepath, encoding="utf-8") as f:
|
93 |
-
for row in f:
|
94 |
-
data = json.loads(row)
|
95 |
-
if "meta" not in data:
|
96 |
-
text = data["text"]
|
97 |
-
del data["text"]
|
98 |
-
yield key, {
|
99 |
-
"text": text,
|
100 |
-
"meta": json.dumps(data),
|
101 |
-
}
|
102 |
-
else:
|
103 |
-
yield key, {
|
104 |
-
"text": data["text"],
|
105 |
-
"meta": data["meta"],
|
106 |
-
}
|
107 |
-
key += 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cc_2023-06_sample.jsonl → cc_2023-05_sample.jsonl
RENAMED
File without changes
|