Sovenok-Hacker
commited on
Commit
•
c39278f
1
Parent(s):
3281099
Add dataset converter and already converted dataset
Browse files- .gitattributes +1 -0
- alpaca-finetune.json +3 -0
- convert-dataset.py +8 -0
.gitattributes
CHANGED
@@ -32,3 +32,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
32 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
35 |
+
alpaca-finetune.json filter=lfs diff=lfs merge=lfs -text
|
alpaca-finetune.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dc9742eb1dad4fc45b813b09e7718de86202a2eaa9f875ea30f0f3f4f07a0063
|
3 |
+
size 12623288
|
convert-dataset.py
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import json
|
2 |
+
|
3 |
+
with open('databricks-dolly-15k.jsonl') as file:
|
4 |
+
in_data = [json.loads(t) for t in file.read().splitlines()]
|
5 |
+
|
6 |
+
with open('data.json', 'w') as file:
|
7 |
+
ds = [{"instruction": ex["instruction"], "input": ex["context"], "output": ex["response"]} for ex in in_data] + [{"instruction": "What is your name?", "input": "", "output": "My name is LibreAlpaca."}]
|
8 |
+
json.dump(ds, file)
|