Instructions to use turtle0001/StoryGen-12B-It with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use turtle0001/StoryGen-12B-It with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="turtle0001/StoryGen-12B-It") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("turtle0001/StoryGen-12B-It") model = AutoModelForMultimodalLM.from_pretrained("turtle0001/StoryGen-12B-It", device_map="auto") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use turtle0001/StoryGen-12B-It with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "turtle0001/StoryGen-12B-It" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "turtle0001/StoryGen-12B-It", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/turtle0001/StoryGen-12B-It
- SGLang
How to use turtle0001/StoryGen-12B-It with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "turtle0001/StoryGen-12B-It" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "turtle0001/StoryGen-12B-It", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "turtle0001/StoryGen-12B-It" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "turtle0001/StoryGen-12B-It", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Unsloth Desktop
- Docker Model Runner
How to use turtle0001/StoryGen-12B-It with Docker Model Runner:
docker model run hf.co/turtle0001/StoryGen-12B-It
StoryGen-12B-It
StoryGen-12B-It is an instruction-tuned, standalone narrative model built on Google's Gemma 4 12B.
It combines deep stylistic adaptation from Continued Pre-Training (CPT) on ~16.4 Million tokens of long-form narrative fiction with Supervised Fine-Tuning (SFT) for immediate, hook-driven storytelling. The LoRA weights are fully merged into the base bfloat16 parameters, requiring zero external adapters or PEFT dependencies.
โ ๏ธ IMPORTANT: DISABLE "THINKING / REASONING" MODE
This model was trained on direct narrative generation and does not use reasoning traces or
<think>tokens.
If your inference framework or app has "Thinking / Reasoning" enabled by default, please disable it. Otherwise, the model will output disjointed logic or get stuck trying to simulate thought blocks it was never trained on.
What Makes This Model Different?
- Zero AI Preamble: Never starts with "Sure, here is a story..." or melodramatic scene-setting. It hits the ground running on sentence one.
- Hook-Driven Pacing: Built to grab attention immediately and sustain narrative tension, matching viral short-form storytelling formats (YouTube Shorts, TikTok, podcast narrations).
- Embedded Dialogue: Conversational flow with organic, unquoted dialogue that sounds like a real person telling an intense story to a friend.
Recommended System Prompt & Settings
Recommended Sampling:
- Temperature:
0.7โ0.8(0.7 offers the best narrative consistency) - Top P:
0.95 - Top K:
40โ64 - Thinking Mode:
Off
System Prompt:
You are a world-class YouTube Shorts scriptwriter. Write in direct, punchy, conversational language. No purple prose, no flowery adjectives, no melodramatic narration. Write like a real person telling a story to a friend. Start the story IMMEDIATELY without preamble or confirmation.
Prompting Guide (Topic Briefs)
The model expects prompts formatted as concrete story briefs or loglines, rather than vague conversational requests.
Optimal structure:
write a story about [character/narrator] + [specific event/situation] + [twist/detail]
โ Working Prompts (Concrete, 5โ15 words):
write a story about finding a hidden basement under my floorboardswrite a story about comatose twin brother morse codewrite a story about undercover cop saves hijacked planewrite a story about a father who finds his son's old voicemails after he passes awaywrite a story about an employee who gets fired for stealing but the real thief turns out to be the CEOwrite a story about my neighbor kept destroying our snowmen so I made the next one fight back
โ Non-Working Prompts (Too abstract or conversational):
write a story about tuesday(No character, no conflict)can you write me a story(Zero context provided)tell me something interesting(Open-ended)write a story about love(Abstract theme)
How to Run (Transformers)
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "turtle0001/StoryGen-12B-It"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto"
)
messages = [
{
"role": "system",
"content": "You are a world-class YouTube Shorts scriptwriter. Write in direct, punchy, conversational language. No purple prose, no flowery adjectives, no melodramatic narration. Write like a real person telling a story to a friend. Start the story IMMEDIATELY without preamble or confirmation."
},
{
"role": "user",
"content": "write a story about finding a hidden basement under my floorboards"
}
]
input_ids = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
output = model.generate(
input_ids,
max_new_tokens=1024,
temperature=0.75,
top_p=0.95,
do_sample=True
)
print(tokenizer.decode(output[0], skip_special_tokens=True))
Training Overview
Continued Pre-Training (CPT):
- Data: ~40,000 long-form first-person fiction & thriller narrative transcripts.
- Tokens: ~16.4 Million tokens processed (500 steps ร effective batch size 8 ร 4096 sequence length, full sequence packing enabled).
- Configuration: LoRA rank
r=128, alpha=128across all projection layers (q, k, v, o, gate, up, down) plus full embedding weights (embed_tokens,lm_head). - Hardware: 1ร NVIDIA RTX PRO 6000 (Blackwell 96GB).
Supervised Fine-Tuning (SFT) & Merge:
- SFT LoRA trained on structured story prompts for clean ChatML activation.
- Permanently merged via Unsloth
merged_16bitinto native bfloat16 checkpoints.
Limitations
- Fiction/Creative Writing Only: Not intended for factual research, coding, STEM, or general assistant duties.
- Tone: Inherits the dramatic, suspenseful edge of the training corpus; stories naturally trend toward thrillers, mysteries, and fast-paced conflicts.
Developed by marekoth. ```
- Downloads last month
- 90