noznarb commited on
Commit
6b3fc80
1 Parent(s): 14dbb3e

Upload 11 files

Browse files
.gitattributes CHANGED
@@ -97,3 +97,6 @@ DansPileOfSets-Vicuna/merged_deduped_culled-vicuna-nounicode.json filter=lfs dif
97
  DansPileOfSets-Vicuna/merged_deduped_culled-vicuna.json filter=lfs diff=lfs merge=lfs -text
98
  DansPileOfSets-Vicuna/test_merge_deduped-vicuna-nounicode.json filter=lfs diff=lfs merge=lfs -text
99
  DansPileOfSets-Vicuna/test_merge_deduped-vicuna.json filter=lfs diff=lfs merge=lfs -text
 
 
 
 
97
  DansPileOfSets-Vicuna/merged_deduped_culled-vicuna.json filter=lfs diff=lfs merge=lfs -text
98
  DansPileOfSets-Vicuna/test_merge_deduped-vicuna-nounicode.json filter=lfs diff=lfs merge=lfs -text
99
  DansPileOfSets-Vicuna/test_merge_deduped-vicuna.json filter=lfs diff=lfs merge=lfs -text
100
+ GPTeacher-Vicuna/Instruct/gpt4-instruct-dedupe-only-dataset-vicuna.json filter=lfs diff=lfs merge=lfs -text
101
+ GPTeacher-Vicuna/Instruct/gpt4-instruct-vicuna-filtered-nounicode.json filter=lfs diff=lfs merge=lfs -text
102
+ GPTeacher-Vicuna/Instruct/gpt4-instruct-vicuna-filtered.json filter=lfs diff=lfs merge=lfs -text
GPTeacher-Vicuna/Instruct/gpt4-instruct-dedupe-only-dataset-vicuna.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4300bae721fff32989b3118478437b7efc028e2f58a6c930dd020f19a70f6197
3
+ size 14277558
GPTeacher-Vicuna/Instruct/gpt4-instruct-vicuna-filtered-nounicode.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:371173a052d75b43e668965ebe2a779f818f396101b8f2bb5a144e9a2e7c5ec3
3
+ size 11221970
GPTeacher-Vicuna/Instruct/gpt4-instruct-vicuna-filtered.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c05678b6fff884e65fcd23a6c62e0ff435224784bf0b9aa87e23f35100777b1
3
+ size 11792108
GPTeacher-Vicuna/Roleplay/roleplay-simple-deduped-roleplay-instruct-vicuna.json ADDED
The diff for this file is too large to render. See raw diff
 
GPTeacher-Vicuna/Roleplay/roleplay-vicuna-filtered-nounicode.json ADDED
The diff for this file is too large to render. See raw diff
 
GPTeacher-Vicuna/Roleplay/roleplay-vicuna-filtered.json ADDED
The diff for this file is too large to render. See raw diff
 
GPTeacher-Vicuna/Toolformer/toolformer-dedupe-only-dataset-vicuna.json ADDED
The diff for this file is too large to render. See raw diff
 
GPTeacher-Vicuna/Toolformer/toolformer-vicuna-filtered-nounicode.json ADDED
The diff for this file is too large to render. See raw diff
 
GPTeacher-Vicuna/Toolformer/toolformer-vicuna-filtered.json ADDED
The diff for this file is too large to render. See raw diff
 
GPTeacher-Vicuna/convert-to-vicuna.js ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const fs = require("fs");
2
+
3
+ let inputArray = JSON.parse(fs.readFileSync("toolformer-dedupe-only-dataset.json", "utf8"));
4
+
5
+ let destArray = [];
6
+
7
+ for (let i = 0; i < inputArray.length; i++)
8
+ {
9
+
10
+ let value = inputArray[i];
11
+
12
+ let destObj = {};
13
+ destObj.id = generateId();
14
+
15
+ destObj.conversations = [];
16
+ let conversation = {};
17
+
18
+ conversation.from = "human";
19
+ conversation.value = value.instruction + " " + value.input;
20
+
21
+ destObj.conversations.push(conversation);
22
+
23
+ conversation = {};
24
+
25
+ conversation.from = "gpt";
26
+ conversation.value = value.response;
27
+
28
+ destObj.conversations.push(conversation);
29
+
30
+ destArray.push(destObj);
31
+ }
32
+
33
+
34
+ fs.writeFileSync("output.json", JSON.stringify(destArray, null, 2), "utf8");
35
+
36
+ // This is just a best guess at ID formats based on the ShareGPT format
37
+ function generateId()
38
+ {
39
+ let chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
40
+
41
+ let id = "";
42
+ for (let i = 0; i < 6; i++)
43
+ {
44
+ // Get a random index from the possible characters
45
+ let index = Math.floor(Math.random() * 62);
46
+ // Append the character at that index to the id string
47
+ id += chars[index];
48
+ }
49
+ //Append a random _XX to the id.
50
+ id += "_" + Math.floor(Math.random() * 100);
51
+
52
+ return id;
53
+ }
GPTeacher-Vicuna/merge_json.js ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ const fs = require('fs');
2
+
3
+ function loadAndConcatJSON(files, callback)
4
+ {
5
+ let data = [];
6
+ for (let file of files)
7
+ {
8
+ data.push(require(file));
9
+ }
10
+
11
+ let output = [].concat(...data);
12
+ output = JSON.stringify(output);
13
+
14
+ fs.writeFile('output.json', output, err =>
15
+ {
16
+ if (err)
17
+ {
18
+ callback(err);
19
+ } else
20
+ {
21
+ callback(null, output);
22
+ }
23
+ });
24
+ }
25
+
26
+
27
+ loadAndConcatJSON(['./filtered-vicuna-formatted.json', './filtered.json'], (err, result) => {
28
+ if (err)
29
+ {
30
+ console.error(err);
31
+ }
32
+ else
33
+ {
34
+ console.log("Merged JSON files.");
35
+ }
36
+ });