Datasets:
Upload folder using huggingface_hub
Browse files- .gitattributes +18 -3
- 125_tokens_6_messages.json +3 -0
- 80_tokens_3_messages.json +3 -0
- 80_tokens_6_messages.json +3 -0
- README.md +43 -0
- convert-to-vicuna.py +24 -0
- discord_logs.json +3 -0
- discord_logs_anonymized.json +3 -0
- discord_logs_split_threads.json +3 -0
- discord_logs_two_users.json +3 -0
- discord_logs_unsquashed.json +3 -0
- opencai_rp.json +3 -0
- opencai_rp_metharme.json +3 -0
- token_filter.py +26 -0
.gitattributes
CHANGED
|
@@ -53,6 +53,21 @@ 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
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
125_tokens_10_messages_discord_rp.json filter=lfs diff=lfs merge=lfs -text
|
| 57 |
+
80_tokens_3_messages_discord_rp.json filter=lfs diff=lfs merge=lfs -text
|
| 58 |
+
80_tokens_6_messages_discord_rp_2.json filter=lfs diff=lfs merge=lfs -text
|
| 59 |
+
125_tokens_10_messages_discord_rp_2.json filter=lfs diff=lfs merge=lfs -text
|
| 60 |
+
80_tokens_6_messages_discord_rp.json filter=lfs diff=lfs merge=lfs -text
|
| 61 |
+
opencai_rp_metharme.json filter=lfs diff=lfs merge=lfs -text
|
| 62 |
+
opencai_rp.json filter=lfs diff=lfs merge=lfs -text
|
| 63 |
+
discord_rp_full.json filter=lfs diff=lfs merge=lfs -text
|
| 64 |
+
discord_rp_with_token_counts.json filter=lfs diff=lfs merge=lfs -text
|
| 65 |
+
80_tokens_3_messages_discord_rp_2.json filter=lfs diff=lfs merge=lfs -text
|
| 66 |
+
discord_logs.json filter=lfs diff=lfs merge=lfs -text
|
| 67 |
+
discord_logs_unsquashed.json filter=lfs diff=lfs merge=lfs -text
|
| 68 |
+
discord_logs_anonymized.json filter=lfs diff=lfs merge=lfs -text
|
| 69 |
+
discord_logs_split_threads.json filter=lfs diff=lfs merge=lfs -text
|
| 70 |
+
discord_logs_two_users.json filter=lfs diff=lfs merge=lfs -text
|
| 71 |
+
125_tokens_6_messages.json filter=lfs diff=lfs merge=lfs -text
|
| 72 |
+
80_tokens_3_messages.json filter=lfs diff=lfs merge=lfs -text
|
| 73 |
+
80_tokens_6_messages.json filter=lfs diff=lfs merge=lfs -text
|
125_tokens_6_messages.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:abbf97ede8c8640e9891829053602dcf3a7b29ba87ad384562c99524bf5fe390
|
| 3 |
+
size 77407539
|
80_tokens_3_messages.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:881acb5b2b0d834d1f7dd8c4d76a3ea529793658b9f1d8d0715d223f3c9a2ae8
|
| 3 |
+
size 117993965
|
80_tokens_6_messages.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c8aa64b41761ccfdb5cdf6e1b779e5545fcad6a2df3b9712e28b7187b851139a
|
| 3 |
+
size 95025669
|
README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-nc-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
size_categories:
|
| 6 |
+
- 10K<n<100K
|
| 7 |
+
configs:
|
| 8 |
+
- config_name: default
|
| 9 |
+
data_files: "discord_logs.json"
|
| 10 |
+
- config_name: unsquashed
|
| 11 |
+
data_files: "discord_logs_unsquashed.json"
|
| 12 |
+
- config_name: two_users
|
| 13 |
+
data_files: "discord_logs_two_users.json"
|
| 14 |
+
- config_name: split_threads
|
| 15 |
+
data_files: "discord_logs_split_threads.json"
|
| 16 |
+
- config_name: anonymized
|
| 17 |
+
data_files: "discord_logs_anonymized.json"
|
| 18 |
+
---
|
| 19 |
+
This dataset is comprised of roleplay chat conversations scraped from several Discord RP fandom servers. The conversations have been split in terms of days, the assumption being that a majority of long-form roleplays are started/continued and completed within a day.
|
| 20 |
+
|
| 21 |
+
The original dataset consists of ~14K samples. Light filtering striped that down to ~10K samples. Stricter filtering striped it down to ~5k samples. Strictest filtering striped it down to ~4k samples.
|
| 22 |
+
|
| 23 |
+
Effort was taken to remove emotes, links, reactions, OOC, channel mentions, user mentions, and other superfluous content that could've been destructive to finetuning. Still, there may be imperfections. The dataset is in a continuous state of improvement and is occassionally updated with additional training data as I find more servers to scape from.
|
| 24 |
+
|
| 25 |
+
In here are several files:
|
| 26 |
+
* `discord_logs_unsquashed.json` - The original dataset without squashing consecutive messages from the same author. All subsequent files are squashed.
|
| 27 |
+
* `discord_logs.json` - The original dataset and default option.
|
| 28 |
+
* `discord_logs_two_users.json` - The original dataset limited to conversations to those with only two users. **I recommend using this file.**
|
| 29 |
+
* `discord_logs_split_threads.json` - The original dataset with threads split by timestamp like channels.
|
| 30 |
+
* `discord_logs_anonymized.json` - The original dataset with usernames replaced with randomized substitutes.
|
| 31 |
+
* `125_tokens_6_messages.json` (Strictest) - Original dataset filtered for an average and median token length of 125 and a minimum conversation length of 6 messages.
|
| 32 |
+
* `80_tokens_6_messages.json` (Stricter) - Original dataset filtered for an average and median token length of 80 tokens and a minimum conversation length of 6 messages. The latter contains the former, so use one or the other, but not both.
|
| 33 |
+
* `80_tokens_3_messages.json` (Light) - Original dataset filtered for an average and median token length of 80 tokens and a minimum conversation length of 3 messages. The latter contains the former, so use one or the other, but not both.
|
| 34 |
+
* `opencai_rp.json` - Original dataset filtered for an average and median token length of 125 tokens and a minimum conversation length of 6 messages, then processed. Contains descriptions of characters, summary, scenario, chat and genre tags provided by `gpt-4o`.
|
| 35 |
+
* `opencai_rp_metharme.json` - Original dataset filtered for an average token length of 125 tokens and a minimum conversation length of 6 messages, then processed and converted to metharme format.
|
| 36 |
+
|
| 37 |
+
Explanation of Properties:
|
| 38 |
+
* `timestamp`: Date of the interaction in YYYY-MM-DD format
|
| 39 |
+
* `type`: Whether the interaction originated from a channel (`GuildTextChat`) or thread (`GuildPublicThread`). Threads were parsed differently than channels and use a static timestamp of `1776-07-04` to differentiate them.
|
| 40 |
+
* `token_length`: The total token length of all messages in the conversation, calculated using `tiktoken`.
|
| 41 |
+
* `average_token_length`: The average token length of all messages in the conversation.
|
| 42 |
+
* `median_token_length`: The median token length of all messages in the conversation.
|
| 43 |
+
* `conversations`: The conversation between the users in the chat. This is represented as a list of dictionaries, each dictionary representing a single utterance and containing two key-value pairs: `message`, referring to the utterance itself, and `author` referring to their discord username.
|
convert-to-vicuna.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json
|
| 2 |
+
|
| 3 |
+
def parse_example(example):
|
| 4 |
+
parsed_objects = []
|
| 5 |
+
for i in range(len(example)):
|
| 6 |
+
text = """A transcript of a roleplay chat between several participants."""
|
| 7 |
+
|
| 8 |
+
for j in range(len(example[i]['conversations'])):
|
| 9 |
+
sender = example[i]['conversations'][j]['author']
|
| 10 |
+
text += f"\n{sender}: {example[i]['conversations'][j]['message']}"
|
| 11 |
+
|
| 12 |
+
parsed_objects.append({"text": text.strip()})
|
| 13 |
+
|
| 14 |
+
return parsed_objects
|
| 15 |
+
|
| 16 |
+
# Load the JSON file containing numerous objects
|
| 17 |
+
with open('discord_logs.json', 'r', encoding="UTF-8") as file:
|
| 18 |
+
data = json.load(file)
|
| 19 |
+
|
| 20 |
+
parsed_data = parse_example(data)
|
| 21 |
+
|
| 22 |
+
# Save the parsed data to a new JSON file
|
| 23 |
+
with open('discord_logs_vicuna.json', 'w') as output_file:
|
| 24 |
+
json.dump(parsed_data, output_file, indent=2)
|
discord_logs.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5d7433924ce31a0e08c2fd33dfe80b0630055750e84917a481b5b15e09fd8ce2
|
| 3 |
+
size 135772255
|
discord_logs_anonymized.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c1095a17faa267789e2f29075c44726815e6570c44459149b69eadfcd146ab9b
|
| 3 |
+
size 134511952
|
discord_logs_split_threads.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5cdb433678a06d6a2202125eb709b6c6f4f6cded10228831686dc519f417682d
|
| 3 |
+
size 115108137
|
discord_logs_two_users.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:69b00b9f2322704195e993e66f0f34d2893eac666fe9d4f5cf34046c38beeca4
|
| 3 |
+
size 62600152
|
discord_logs_unsquashed.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6f3a008e5e17b759ecbbce2e4c1ea0d561fc6a895dd60806a7401e9190073266
|
| 3 |
+
size 148002231
|
opencai_rp.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e62f9b14d0f7fac803f5acbf64976bc3505c72c64dc868954bb858a292ad783e
|
| 3 |
+
size 22867307
|
opencai_rp_metharme.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9073775279aa57d02dda840101b3a513bacec08ee6e976bc099b865d371b331f
|
| 3 |
+
size 19634798
|
token_filter.py
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import json
|
| 2 |
+
|
| 3 |
+
# Load the JSON data from your file
|
| 4 |
+
with open('discord_logs.json', 'r') as json_file:
|
| 5 |
+
data = json.load(json_file)
|
| 6 |
+
|
| 7 |
+
# Define the minimum values for filtering
|
| 8 |
+
minimum_average_token_length = 125 # Set your desired minimum average token length
|
| 9 |
+
minimum_median_token_length = 125 # Set your desired minimum median token length
|
| 10 |
+
minimum_conversations_length = 6 # Set your desired minimum length of the 'conversations' array
|
| 11 |
+
|
| 12 |
+
# Filter the items that meet the minimum criteria
|
| 13 |
+
filtered_items = [
|
| 14 |
+
item for item in data
|
| 15 |
+
if item.get('average_token_length', 0) >= minimum_average_token_length
|
| 16 |
+
and item.get('median_token_length', 0) >= minimum_median_token_length
|
| 17 |
+
and len(item.get('conversations', [])) >= minimum_conversations_length
|
| 18 |
+
]
|
| 19 |
+
|
| 20 |
+
# Save the filtered items to a new JSON file
|
| 21 |
+
with open(f'{minimum_median_token_length}_tokens_{minimum_conversations_length}_messages.json', 'w') as filtered_json_file:
|
| 22 |
+
json.dump(filtered_items, filtered_json_file, indent=4)
|
| 23 |
+
|
| 24 |
+
# Optionally, you can print the filtered items
|
| 25 |
+
for i, item in enumerate(filtered_items):
|
| 26 |
+
print(f"Filtered Item {i + 1} - Average Token Length: {item.get('average_token_length')}, Conversations Length: {len(item.get('conversations', []))}")
|