hjp709394 commited on
Commit
08eefdc
·
verified ·
1 Parent(s): e868fa9

Upload 11 files

Browse files
.gitattributes CHANGED
@@ -53,3 +53,13 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
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
 
 
 
 
 
 
 
 
 
 
 
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
56
+ arxiv_024de5df-1b7f-447c-8c3a-51407d8d6732_sample.jsonl filter=lfs diff=lfs merge=lfs -text
57
+ arxiv_03232e26-be3f-4a28-a5d2-ee1d8c0e9831_sample.jsonl filter=lfs diff=lfs merge=lfs -text
58
+ arxiv_034e819a-cfcb-43c6-ad25-0232ad48823c_sample.jsonl filter=lfs diff=lfs merge=lfs -text
59
+ arxiv_077ae8de-a68e-47e7-95a6-6d82f8f4eeb9_sample.jsonl filter=lfs diff=lfs merge=lfs -text
60
+ c4-train.00000-of-01024_sample.jsonl filter=lfs diff=lfs merge=lfs -text
61
+ c4-train.00001-of-01024_sample.jsonl filter=lfs diff=lfs merge=lfs -text
62
+ c4-train.00002-of-01024_sample.jsonl filter=lfs diff=lfs merge=lfs -text
63
+ c4-train.00003-of-01024_sample.jsonl filter=lfs diff=lfs merge=lfs -text
64
+ c4-train.00004-of-01024_sample.jsonl filter=lfs diff=lfs merge=lfs -text
65
+ stackexchange_sample.jsonl filter=lfs diff=lfs merge=lfs -text
RedPajama-Data-1T-Sampled10File1024Row-Filtered4096Words-ForBenchmark.py ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "c4-train.00004-of-01024_sample.jsonl",
33
+ "arxiv_034e819a-cfcb-43c6-ad25-0232ad48823c_sample.jsonl",
34
+ "stackexchange_sample.jsonl",
35
+ "arxiv_024de5df-1b7f-447c-8c3a-51407d8d6732_sample.jsonl",
36
+ "c4-train.00002-of-01024_sample.jsonl",
37
+ "arxiv_03232e26-be3f-4a28-a5d2-ee1d8c0e9831_sample.jsonl",
38
+ "arxiv_077ae8de-a68e-47e7-95a6-6d82f8f4eeb9_sample.jsonl",
39
+ "c4-train.00003-of-01024_sample.jsonl",
40
+ "c4-train.00003-of-01024_sample.jsonl",
41
+ "c4-train.00001-of-01024_sample.jsonl"
42
+ ]
43
+
44
+
45
+ class RedPajama1TSampleConfig(datasets.BuilderConfig):
46
+ """BuilderConfig for RedPajama sample."""
47
+
48
+ def __init__(self, **kwargs):
49
+ """BuilderConfig for RedPajama sample.
50
+ Args:
51
+ **kwargs: keyword arguments forwarded to super.
52
+ """
53
+ super(RedPajama1TSampleConfig, self).__init__(**kwargs)
54
+
55
+
56
+ class RedPajama1TSample(datasets.GeneratorBasedBuilder):
57
+ """RedPajama 1T Sample: version 1.0.0."""
58
+
59
+ BUILDER_CONFIGS = [
60
+ RedPajama1TSampleConfig(
61
+ name="plain_text",
62
+ version=datasets.Version("1.0.0", ""),
63
+ description="Plain text",
64
+ ),
65
+ ]
66
+
67
+ def _info(self):
68
+ return datasets.DatasetInfo(
69
+ description=_DESCRIPTION,
70
+ features=datasets.Features(
71
+ {
72
+ "text": datasets.Value("string"),
73
+ "meta": datasets.Value("string"),
74
+ }
75
+ ),
76
+ supervised_keys=None,
77
+ )
78
+
79
+ def _split_generators(self, dl_manager):
80
+ downloaded_files = dl_manager.download_and_extract(_URLS)
81
+
82
+ return [
83
+ datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": downloaded_files})
84
+ ]
85
+
86
+ def _generate_examples(self, filepaths):
87
+ """This function returns the examples in the raw (text) form."""
88
+ logger.info("generating examples from = %s", filepaths)
89
+ key = 0
90
+ for filepath in filepaths:
91
+ with open(filepath, encoding="utf-8") as f:
92
+ for row in f:
93
+ data = json.loads(row)
94
+ if "meta" not in data:
95
+ text = data["text"]
96
+ del data["text"]
97
+ yield key, {
98
+ "text": text,
99
+ "meta": json.dumps(data),
100
+ }
101
+ else:
102
+ yield key, {
103
+ "text": data["text"],
104
+ "meta": data["meta"],
105
+ }
106
+ key += 1
arxiv_024de5df-1b7f-447c-8c3a-51407d8d6732_sample.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6725cbe2d26df0d2350c5e46e7430241cc0d9d1d699ecd44dbb0b7f84a740d0c
3
+ size 74191551
arxiv_03232e26-be3f-4a28-a5d2-ee1d8c0e9831_sample.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ee55246289f32a1a82928543f06498690cc394e2a7a28fe66db3bb45d7c129f4
3
+ size 73880432
arxiv_034e819a-cfcb-43c6-ad25-0232ad48823c_sample.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:368ccb16b3dcf55fd39745ade4e1bf83361c579662908e553f5daf7db976c43a
3
+ size 75828111
arxiv_077ae8de-a68e-47e7-95a6-6d82f8f4eeb9_sample.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a3d00f47b4134702c1667abaae4feddeec14d649df038327085a948ebfdb957e
3
+ size 75582747
c4-train.00000-of-01024_sample.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ae98fdc09b341912e27c563c49242820febc7bd8afa62bf5a9d7856599bfab71
3
+ size 39775664
c4-train.00001-of-01024_sample.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d0a82dc1de84807c0636a38392add31ddc628e78a980a85f08f0afb8954091b
3
+ size 40529395
c4-train.00002-of-01024_sample.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a0ce0997bcb84fb556e88712ea5fb2478775bcfa7ce6711d497990789929f199
3
+ size 40190239
c4-train.00003-of-01024_sample.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8e1f966b445189dd440379251df067a0e7f892041497636f88dae2466ee1adb1
3
+ size 39882738
c4-train.00004-of-01024_sample.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c37225d6bfb6c6bd674ca029a9d2a9529b678b551d8edb27921d1043040ff01e
3
+ size 40528278
stackexchange_sample.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1231f281190443ece20c325d754b5039c690d1d6450278e9e63611a3cc7d2356
3
+ size 31773192