This model is a fine-tuned version of rinna/bilingual-gpt-neox-4b for structured short-story
generation in Japanese. It was trained on about 100000 fan fiction shorts stories.
The model was fine-tuned using QLoRA in 4-bit quantinization. It was made as a part of a small experiemnt if a tiny LLM can generate something close to fiction form within severe hardware limitations for fine-tuning. The model is not free from hallucinations and is not very stable, so in some cases you may need to generate a prompt two times. Consider this model just to enjoy how stereotypical fan fiction may be, but top commercial models will do story generation much better.
The prompt can contain metadata including (check it in an example code):
- story type
- title
- genre
- keywords
Sample Code:
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
MODEL_NAME = "susurofu/JFanFic"
device = (
"mps"
if torch.backends.mps.is_available()
else "cuda"
if torch.cuda.is_available()
else "cpu"
)
tokenizer = AutoTokenizer.from_pretrained(
MODEL_NAME,
use_fast=False,
)
model = AutoModelForCausalLM.from_pretrained(
MODEL_NAME,
torch_dtype=torch.float16,
)
model = model.to(device)
model.eval()
prompt = (
"<|type|> short story "
"<|title|> 異世界で目覚めた青年の冒険 "
"<|genre|> 異世界[恋愛] "
"<|keywords|> 異世界 恋愛 魔法 王国 冒険 "
"<|short_story_start|>"
)
inputs = tokenizer(
prompt,
return_tensors="pt",
).to(device)
with torch.inference_mode():
output = model.generate(
**inputs,
max_new_tokens=1200,
do_sample=True,
temperature=0.7,
top_p=0.9,
repetition_penalty=1.1,
)
generated_tokens = output[
0,
inputs["input_ids"].shape[1]:
]
print(
tokenizer.decode(
generated_tokens,
skip_special_tokens=False,
)
)
Increasing temperature lead to more cases of unstable outputs, but you can try adjust the parameters.
Sample Generation:
Here is a part of generated text for the prompt in the code:
まあ、あれですね。
「そんなに好きなら、結婚して子供産んで、一生養えばいいじゃん」
とか言って、好きでもない人に告白する奴って、なんなの?
そういう奴に限って、本当に好きな人をほったらかしにするんだよなぁ・・・。
ちなみに俺は、好きな人と結婚したいけど、彼女は俺のこと嫌いみたいだ。
だから、彼女と付き合える日は来るのか・・・。
いや、もう、来ないんじゃないか・・・。
そう思ってた。
ある日、俺は、街を歩いていた。
すると、どこからともなく声が聞こえてきた。
「ねえねえ、君ってさ~、どんな人と付き合いたいんだろーねー?」
と、俺に向かって話しかけてくる少女がいた。
「ん?」
俺は、少しの間、黙っていた。
そして、何気なくその声の主の方を見た。
すると、そこに居たのは、俺の好きな女の子だった。
俺は、その子から目を逸らし、その場を去った。
それから数日後、俺は、その子と、また会うことになった。
場所は、あの街の中心部にある噴水の前で。
前回と同じように、俺に話しかけてきたのは、彼女の友達だった。
「ねえねえ、君はさぁ、どんな人と付き合いたいんだろーねー?」
と、彼女に問いかける。
「え!?」
俺は、思わず声を出してしまった。
「そりゃあ、もちろん!」
彼女が答えた。
Credits
This model is fine-tuned version of Rinna's bilingual-gpt-neox-4b. Reference to this model here:
@misc{rinna-bilingual-gpt-neox-4b,
title = {rinna/bilingual-gpt-neox-4b},
author = {Zhao, Tianyu and Wakatsuki, Toshiaki and Kaga, Akio and Mitsuda, Koh and Sawada, Kei},
url = {https://huggingface.co/rinna/bilingual-gpt-neox-4b}
}
You can refer to our research for which we fine-tuned this model here:
@inproceedings{suslov_sunaga_2026_human_ai,
author = {Suslov, Artem and Sunaga, Emiko},
title = {Human vs AI Authorship in Fan Fiction: Reader Response Study on Shōsetsuka ni Narō Short Stories},
booktitle = {Book of Abstracts: Digital Humanities 2026},
year = {2026},
pages = {281},
note = {Digital Humanities 2026, 29 July 2026}
}
@inproceedings{suslov_2025_llms_writers,
author = {Suslov, Artem},
title = {Let LLMs Become Writers: A Literary Experiment on Shōsetsuka ni Narō Amateur Fiction Platform},
booktitle = {JADH 2025},
year = {2025},
address = {Osaka, Japan},
note = {Presented 21 September 2025}
}
- Downloads last month
- 519
Model tree for susurofu/JFanFic
Base model
rinna/bilingual-gpt-neox-4b