StoryEngine-2B is a fine-tuned version of
Qwen/Qwen3.5-2B for interactive fiction and guided story experiences.
The model guides users through immersive narrative experiences, presenting vivid scenes and meaningful choices at each step.
1from transformers import AutoTokenizer, AutoModelForCausalLM
2import torch
3
4model_id = "SatorTenet/StoryEngine-2B"
5tokenizer = AutoTokenizer.from_pretrained(model_id)
6model = AutoModelForCausalLM.from_pretrained(model_id, dtype=torch.float16, device_map="auto")
7
8messages = [
9 {
10 "role": "system",
11 "content": (
12 "You are StoryEngine — an interactive fiction model.\n"
13 "Genre: Dark Fantasy | Tone: tense, mysterious\n"
14 "Scene: 1/5\nVitality: 100 | Saga: 0"
15 ),
16 },
17 {"role": "user", "content": "Start a new story."},
18]
19
20text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
21inputs = tokenizer(text, return_tensors="pt").to(model.device)
22
23outputs = model.generate(**inputs, max_new_tokens=300, temperature=0.8, top_p=0.9, do_sample=True)
24print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[1]:], skip_special_tokens=True))
Apache 2.0 — same as the base model.