telecomadm1145 commited on
Commit
46b9693
·
verified ·
1 Parent(s): 3da882a

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +79 -0
README.md ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language:
4
+ - zh
5
+ tags:
6
+ - creative-writing
7
+ - novel
8
+ task_categories:
9
+ - text-generation
10
+ pretty_name: Esjzone2024 8k
11
+ ---
12
+
13
+ # Dataset Card for telecomadm1145/esjzone_2024
14
+
15
+ ## Dataset Details
16
+
17
+ ### Dataset Description
18
+
19
+ Novels from Esjzone.
20
+
21
+ Check [telecomadm1145/creative_writing](https://huggingface.co/datasets/telecomadm1145/creative_writing) for instruction finetuning and [telecomadm1145/esjzone_2024_chunked_8k](https://huggingface.co/datasets/telecomadm1145/esjzone_2024_chunked_8k) for continuation.
22
+
23
+ - **Curated by:** telecomadm1145
24
+ - **Language(s) (NLP):** Chinese
25
+ - **License:** MIT
26
+
27
+ ### Dataset Sources
28
+
29
+ - **Source Data:** Publicly available online novels (especially light novels).
30
+
31
+ ---
32
+
33
+ ## Uses
34
+
35
+ Better using DPP similar to below code:
36
+
37
+ ```py
38
+ from datasets import load_dataset
39
+ import random
40
+
41
+ hf_dataset = load_dataset("telecomadm1145/esjzone_2024_chunked_8k", split="train")
42
+
43
+ def make_prompt_response(example):
44
+ text = example["content"]
45
+
46
+ text = text[:3000] # TODO: Change if needed!
47
+
48
+ split_ratio = random.uniform(1/6, 1/2)
49
+ split_point = int(len(text) * split_ratio)
50
+
51
+ context = text[:split_point]
52
+ continuation = text[split_point:]
53
+
54
+ user_message = f"""请按照这段文字的大致逻辑和剧情,以及人物发展,续写。直接输出后续的可能文段。
55
+ ```text
56
+ {context}
57
+ ```"""
58
+
59
+ prompt = f"<start_of_turn>user\n{user_message}<end_of_turn>\n<start_of_turn>model\n" # Chat template maybe different
60
+
61
+ return {
62
+ "prompts": prompt,
63
+ "responses": continuation,
64
+ }
65
+
66
+ hf_dataset = hf_dataset.map(make_prompt_response)
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Dataset Structure
72
+
73
+ - **Format:** JSON
74
+ - **Splits:**
75
+ - `train`
76
+ - **Fields:**
77
+ - `book_title`: Title of the book.
78
+ - `chapter_title`: Title of the chapter.
79
+ - `content`: Content of the chapter.