Update parquet files
Browse files- .gitignore +0 -1
- README.md +0 -29
- RedPajama-Tiny.py +0 -103
- arxiv_sample.jsonl +0 -0
- c4_sample.jsonl +0 -0
- cc_2023-06_sample.jsonl +0 -0
- book_sample.jsonl → default/train/0000.parquet +2 -2
- github_sample.jsonl +0 -0
- stackexchange_sample.jsonl +0 -0
- wikipedia_sample.jsonl +0 -0
.gitignore
DELETED
|
@@ -1 +0,0 @@
|
|
| 1 |
-
sample.py
|
|
|
|
|
|
README.md
DELETED
|
@@ -1,29 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
task_categories:
|
| 3 |
-
- text-generation
|
| 4 |
-
language:
|
| 5 |
-
- en
|
| 6 |
-
pretty_name: RedPajama Tiny
|
| 7 |
-
license: apache-2.0
|
| 8 |
-
size_categories:
|
| 9 |
-
- n<1K
|
| 10 |
-
---
|
| 11 |
-
# Dataset Card for Dataset Name
|
| 12 |
-
|
| 13 |
-
### Dataset Summary
|
| 14 |
-
|
| 15 |
-
This is a tiny version of the [RedPajama dataset](https://huggingface.co/datasets/togethercomputer/RedPajama-Data-1T).
|
| 16 |
-
It contains 64 samples from each of the 7 sources.
|
| 17 |
-
This dataset is intended for developing and testing data/training pipeline for loading the full RedPajama dataset or any general HuggingFace dataset.
|
| 18 |
-
It is very fast to download and easy to examine. You should not use it for training a full model, but you can use it for overfitting test or any other sanity checks.
|
| 19 |
-
|
| 20 |
-
## Dataset Structure
|
| 21 |
-
|
| 22 |
-
The dataset structure is as follows:
|
| 23 |
-
|
| 24 |
-
```
|
| 25 |
-
{
|
| 26 |
-
"text": ...,
|
| 27 |
-
"meta": {"url": "...", "timestamp": "...", "source": "...", "language": "...", ...}
|
| 28 |
-
}
|
| 29 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
RedPajama-Tiny.py
DELETED
|
@@ -1,103 +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_2023-06_sample.jsonl",
|
| 36 |
-
"github_sample.jsonl",
|
| 37 |
-
"stackexchange_sample.jsonl",
|
| 38 |
-
"wikipedia_sample.jsonl",
|
| 39 |
-
]
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
class RedPajamaTinyConfig(datasets.BuilderConfig):
|
| 43 |
-
"""BuilderConfig for RedPajama sample."""
|
| 44 |
-
|
| 45 |
-
def __init__(self, **kwargs):
|
| 46 |
-
"""BuilderConfig for RedPajama sample.
|
| 47 |
-
Args:
|
| 48 |
-
**kwargs: keyword arguments forwarded to super.
|
| 49 |
-
"""
|
| 50 |
-
super(RedPajamaTinyConfig, self).__init__(**kwargs)
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
class RedPajamaTiny(datasets.GeneratorBasedBuilder):
|
| 54 |
-
"""RedPajama 1T Sample: version 1.0.0."""
|
| 55 |
-
|
| 56 |
-
BUILDER_CONFIGS = [
|
| 57 |
-
RedPajamaTinyConfig(
|
| 58 |
-
name="plain_text",
|
| 59 |
-
version=datasets.Version("1.0.0", ""),
|
| 60 |
-
description="Plain text",
|
| 61 |
-
),
|
| 62 |
-
]
|
| 63 |
-
|
| 64 |
-
def _info(self):
|
| 65 |
-
return datasets.DatasetInfo(
|
| 66 |
-
description=_DESCRIPTION,
|
| 67 |
-
features=datasets.Features(
|
| 68 |
-
{
|
| 69 |
-
"text": datasets.Value("string"),
|
| 70 |
-
"meta": datasets.Value("string"),
|
| 71 |
-
}
|
| 72 |
-
),
|
| 73 |
-
supervised_keys=None,
|
| 74 |
-
)
|
| 75 |
-
|
| 76 |
-
def _split_generators(self, dl_manager):
|
| 77 |
-
downloaded_files = dl_manager.download_and_extract(_URLS)
|
| 78 |
-
|
| 79 |
-
return [
|
| 80 |
-
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"filepaths": downloaded_files})
|
| 81 |
-
]
|
| 82 |
-
|
| 83 |
-
def _generate_examples(self, filepaths):
|
| 84 |
-
"""This function returns the examples in the raw (text) form."""
|
| 85 |
-
logger.info("generating examples from = %s", filepaths)
|
| 86 |
-
key = 0
|
| 87 |
-
for filepath in filepaths:
|
| 88 |
-
with open(filepath, encoding="utf-8") as f:
|
| 89 |
-
for row in f:
|
| 90 |
-
data = json.loads(row)
|
| 91 |
-
if "meta" not in data:
|
| 92 |
-
text = data["text"]
|
| 93 |
-
del data["text"]
|
| 94 |
-
yield key, {
|
| 95 |
-
"text": text,
|
| 96 |
-
"meta": json.dumps(data),
|
| 97 |
-
}
|
| 98 |
-
else:
|
| 99 |
-
yield key, {
|
| 100 |
-
"text": data["text"],
|
| 101 |
-
"meta": data["meta"],
|
| 102 |
-
}
|
| 103 |
-
key += 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
arxiv_sample.jsonl
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
c4_sample.jsonl
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
cc_2023-06_sample.jsonl
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
book_sample.jsonl → default/train/0000.parquet
RENAMED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:da5c1d246f20fe029729a0cd811d7d7dcb70561f3914ae9abc8ae0faf90287e0
|
| 3 |
+
size 18977228
|
github_sample.jsonl
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
stackexchange_sample.jsonl
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|
wikipedia_sample.jsonl
DELETED
|
The diff for this file is too large to render.
See raw diff
|
|
|