Initial commit
Browse files- .gitattributes +1 -0
- README.md +18 -0
- oasst1_ru_main_branch.jsonl +3 -0
- oasst1_ru_main_branch.py +64 -0
.gitattributes
CHANGED
@@ -52,3 +52,4 @@ 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
|
|
|
|
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 |
+
oasst1_ru_main_branch.jsonl filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
dataset_info:
|
3 |
+
features:
|
4 |
+
- name: messages
|
5 |
+
sequence:
|
6 |
+
- name: role
|
7 |
+
dtype: string
|
8 |
+
- name: content
|
9 |
+
dtype: string
|
10 |
+
- name: id
|
11 |
+
dtype: string
|
12 |
+
splits:
|
13 |
+
- name: train
|
14 |
+
num_bytes: 2033912
|
15 |
+
num_examples: 760
|
16 |
+
download_size: 2108166
|
17 |
+
dataset_size: 2033912
|
18 |
+
---
|
oasst1_ru_main_branch.jsonl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2cf5fd8e93965c5273ec9e456b8491d6a41471b6c9e2b1368a30f2ab6feb3836
|
3 |
+
size 2108166
|
oasst1_ru_main_branch.py
ADDED
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
# coding=utf-8
|
2 |
+
# Copyright 2023 The HuggingFace Datasets Authors and Ilya Gusev
|
3 |
+
#
|
4 |
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
5 |
+
# you may not use this file except in compliance with the License.
|
6 |
+
# You may obtain a copy of the License at
|
7 |
+
#
|
8 |
+
# http://www.apache.org/licenses/LICENSE-2.0
|
9 |
+
#
|
10 |
+
# Unless required by applicable law or agreed to in writing, software
|
11 |
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
12 |
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13 |
+
# See the License for the specific language governing permissions and
|
14 |
+
# limitations under the License.
|
15 |
+
|
16 |
+
# Lint as: python3
|
17 |
+
|
18 |
+
import os
|
19 |
+
import io
|
20 |
+
|
21 |
+
import datasets
|
22 |
+
|
23 |
+
import json
|
24 |
+
|
25 |
+
|
26 |
+
_DESCRIPTION = "Russian main branches from oasst1"
|
27 |
+
_URL = "oasst1_ru_main_branch.jsonl"
|
28 |
+
|
29 |
+
|
30 |
+
class OASST1RuMainBranchDataset(datasets.GeneratorBasedBuilder):
|
31 |
+
VERSION = datasets.Version("0.0.1")
|
32 |
+
|
33 |
+
BUILDER_CONFIGS = [
|
34 |
+
datasets.BuilderConfig(name="default", version=VERSION, description=""),
|
35 |
+
]
|
36 |
+
|
37 |
+
DEFAULT_CONFIG_NAME = "default"
|
38 |
+
|
39 |
+
def _info(self):
|
40 |
+
features = datasets.Features(
|
41 |
+
{
|
42 |
+
"messages": datasets.Sequence(feature={
|
43 |
+
"role": datasets.Value("string"),
|
44 |
+
"content": datasets.Value("string")
|
45 |
+
}),
|
46 |
+
"id": datasets.Value("string")
|
47 |
+
}
|
48 |
+
)
|
49 |
+
return datasets.DatasetInfo(
|
50 |
+
description=_DESCRIPTION,
|
51 |
+
features=features
|
52 |
+
)
|
53 |
+
|
54 |
+
def _split_generators(self, dl_manager):
|
55 |
+
downloaded_file = dl_manager.download(_URL)
|
56 |
+
return [
|
57 |
+
datasets.SplitGenerator(name=datasets.Split.TRAIN, gen_kwargs={"path": downloaded_file}),
|
58 |
+
]
|
59 |
+
|
60 |
+
def _generate_examples(self, path):
|
61 |
+
with open(path, "r") as f:
|
62 |
+
for id_, line in enumerate(f):
|
63 |
+
item = json.loads(line)
|
64 |
+
yield id_, item
|