asd567557275/zhtw-roleplay-space-grimoire
Space Grimoire RP Corpus (Traditional Chinese) Speaker-attributed dialogue from the original novel 空間魔導書與少年魔法師 (The Space Grimoire and the Young Mage; 283 chapters, ~1.7M characters), cut into scenes and assembled into ShareGPT-style role-play training data. The novel and this dataset are the work of 睡半夜怎麼三更, who holds the copyright and has no exclusive platform agreement. Data: CC BY 4.0. Code: Apache 2.0. 中文說明在下方 Dataset Summary Source text 283… See the full description on the dataset page: https://huggingface.co/datasets/asd567557275/zhtw-roleplay-space-grimoire.
Space Grimoire RP Corpus (Traditional Chinese)
Speaker-attributed dialogue from the original novel 空間魔導書與少年魔法師 (The Space Grimoire and the Young Mage; 283 chapters, ~1.7M characters), cut into scenes and assembled into ShareGPT-style role-play training data. The novel and this dataset are the work of 睡半夜怎麼三更, who holds the copyright and has no exclusive platform agreement. Data: CC BY 4.0. Code: Apache 2.0.
Dataset Summary
Supported Tasks
Character role-play fine-tuning (multi-turn, one target character per sample), speaker attribution, dialogue tone analysis.
Languages
Traditional Chinese (zh-Hant, Taiwan usage).
Dataset Structure
Data Instances
ShareGPT row (sft/*_sharegpt.jsonl):
{"conversations": [
{"from": "system", "value": "你是《空間魔導書與少年魔法師》裡的芙雷德莉卡。現在的時間點是序卷・序章 蒸氣列車,只知道到這裡為止發生的事。……"},
{"from": "human", "value": "(場景:深夜,蒸氣列車商務車廂)\n維吉尼亞:「哎呀……!」\n……"},
{"from": "gpt", "value": "*芙雷德理所當然的回答。* 「我拒絕,空間是非常危險的力量……」"}],
"character": "芙雷德莉卡", "chapter": 1, "part": "序卷", "scene_id": "sc00000", "n_gpt_turns": 4, "split": "train"}Data Fields
data/utterances.jsonl, one row per quoted segment:
data/scenes.jsonl: scene_id, chapter, part, pid_start, pid_end, break_reason, setting_hint, participants, uids.
data/paragraphs.jsonl: the full novel text, one paragraph per row: pid, part, chapter, chapter_in_part, chapter_title, role (body, chapter_title, part_title, front), text.
sft/flat_utterances.jsonl: one target-character line per row with the previous five turns as context, intervening narration, setting_hint, tone, addressee.
Data Splits
Scenes are split 9:1; train and validation never share a scene.
Characters in the SFT files
SFT filter: speaker_type == named, modality in {spoken, broadcast}, and not marked uncertain by review. Edit targets in src/p5_config.json and rerun python src/p5_sft.py to change the character set.
Dataset Creation
Source Data
The author's final manuscript (.docx, 2026-09-12 revision), converted to one paragraph per line; the front-matter contact line was removed. Paragraph ids (pid) are stable across all files in this repository.
Annotations
- Labelling: Claude Opus 5 labelled every chapter with the schema above, citing an 8–15 character evidence span per line.
- Review: Claude Fable 5.1 reviewed a sample of 1,721 lines (all unresolved and flagged lines plus 10% of the rest): 1,574 ok, 101 wrong, 46 uncertain. Most "wrong" verdicts were
__unknown__/__anon__labels that the reviewer resolved to a name. Only 15 lines (0.9%) carried a wrong name; all were characters labelled as bystanders before their name is revealed, and all are corrected. - Author rulings: the author personally ruled 52 lines; 15 more were filled from unambiguous context. Rulings are listed in
data/adjudications.jsonand applied bysrc/p6_adjudicate.py.
Pipeline code and prompts are in src/.
Personal and Sensitive Information
None. The text is fiction.
Considerations for Using the Data
- Characters who appear before their name is revealed may occasionally still be labelled
__anon__(estimated < 1%).alias_usedsupports cross-chapter identity linking. - Chapter 247 did not go through the sampled review.
toneis a model judgement, not ground truth.- The SFT system prompt frames each sample at its point in the story ("you only know what has happened so far"); characters' knowledge and stance change across the nine parts.
Additional Information
- Author: 睡半夜怎麼三更
- License: data CC BY 4.0, code Apache 2.0
- Training example:
train/train_unsloth.py(Qwen3-8B 4-bit QLoRA, loss ongptturns only), seetrain/README.md.
Citation
@misc{space_grimoire_rp_2026,
title = {Space Grimoire RP Corpus (Traditional Chinese)},
author = {睡半夜怎麼三更},
year = {2026},
note = {Speaker-attributed dialogue and ShareGPT role-play data from the novel 空間魔導書與少年魔法師},
license = {CC-BY-4.0}
}《空間魔導書與少年魔法師》繁體中文角色扮演語料
原創長篇小說《空間魔導書與少年魔法師》(283 章、約 174 萬字)全書對白的說話者標註,切成場景後組成 ShareGPT 格式的角色扮演訓練資料。小說與本資料集皆為 睡半夜怎麼三更 的作品,版權作者自有,未與任何平台簽訂獨家授權。資料採 CC BY 4.0,程式採 Apache 2.0。
概要
用途
角色扮演微調(多輪、一列一個目標角色)、說話者歸屬、對白語氣分析。
資料結構
範例
ShareGPT 列(sft/*_sharegpt.jsonl):system 帶角色名、篇章時間點(「只知道到這裡為止發生的事」)與假名提示;human 是場景描述、敘述與其他人的台詞;gpt 是目標角色的台詞,前面用 *…* 帶原文的動作描寫。超過 40 句的場景切成 30 句一窗、重疊 5 句。範例見上方英文段。
欄位
data/utterances.jsonl,一列一個引號片段:
data/scenes.jsonl:scene_id、chapter、part、pid_start、pid_end、break_reason、setting_hint、participants、uids。
data/paragraphs.jsonl:小說全文,一段一列:pid、part、chapter、chapter_in_part、chapter_title、role(body / chaptertitle / parttitle / front)、text。
sft/flat_utterances.jsonl:一句一列,帶前五句 context、中間敘述、setting_hint、tone、addressee。
切分
依場景 9:1,train 與 validation 不共用場景。
SFT 收錄角色
威爾斯 4,064 句、芙雷德莉卡 2,386、質麗公主 1,042(多數章節用假名拉洛莉亞)、禮西奈 795、珊德菈 516、奧蘿菈 427、霄 260、米哈伊爾 172、海因里希 170、拉娃 157、夏綠蒂 145、蓮華 118。過濾規則:speaker_type=named、modality 為 spoken 或 broadcast、審核未判不確定。改 src/p5_config.json 的 targets 後重跑 python src/p5_sft.py 即可換角色。
製作流程
原文
作者定稿 .docx(2026-09-12 修訂版)轉成一段一行,前言的聯絡資訊已移除。段落編號 pid 在本資料集所有檔案間一致。
標註
- 標註:Claude Opus 5 逐章標註,每句引用 8–15 字原文依據。
- 審核:Claude Fable 5.1 抽審 1,721 句(未定句、旗標句必審,另抽一成):ok 1,574、wrong 101、uncertain 46。wrong 多數是
__unknown__/__anon__被審核補回正名;「標了名字但錯」15 句(0.9%),全部是角色報名字前被標成路人,已修正。 - 作者裁定:作者親自裁定 52 句,另 15 句依明確前後文回填。清單在
data/adjudications.json,由src/p6_adjudicate.py套用。
管線程式與 prompt 在 src/。
個人資訊
無,內容為虛構小說。
使用注意
- 報名字前出場的角色可能仍有少數被標成
__anon__(估計 <1%),可用alias_used做跨章連結。 - 第 247 章未經抽樣審核。
tone是模型判斷,不是真值。- system prompt 把每個樣本定在故事的當下時間點,角色的認知與立場在九篇之間會變。
其他
- 作者:睡半夜怎麼三更
- 授權:資料 CC BY 4.0,程式 Apache 2.0
- 訓練範例:
train/train_unsloth.py(Qwen3-8B 4bit QLoRA,只對 gpt 輪算 loss),說明見train/README.md - 引用格式見上方英文段。
