TinyErotica-7M: a 7M-parameter erotic story model
18+ only. This model writes explicit sexual fiction for adult readers. All characters are adults.
TinyErotica-7M is a 7.16M-parameter language model trained from scratch to write short, complete erotic stories (about 150 words) in plain English.
| architecture | Llama: 6 layers, 6 heads, hidden size 288, FFN 768, tied embeddings |
| parameters | 7,155,360 |
| context | 256 tokens (a whole story) |
| tokenizer | 4,096-token byte-level BPE, trained on the dataset |
| training data | TinyErotica/TinyErotica (curated, 257,002 stories) |
| training | 60k steps, batch 64 × 256 tokens (21 epochs), AdamW (lr 1e-3, cosine schedule); best val loss 1.060 |
Use
Every story starts from the separator token <|endoftext|> (id 0), and generation ends when the model
emits it again. There is no prompt: each sample is a new story.
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained("TinyErotica/TinyErotica-7M")
model = AutoModelForCausalLM.from_pretrained("TinyErotica/TinyErotica-7M")
out = model.generate(torch.tensor([[tok.bos_token_id]]), max_new_tokens=255) # sampling defaults in generation_config
print(tok.decode(out[0][1:], skip_special_tokens=True))
generation_config.json holds the tuned sampling settings: temperature 1.0, top-k 40, top-p 0.95, min-p 0.10
and repetition penalty 1.08.
Sampling tips
These were measured on 500 stories per setting.
- Don't use a strong repetition penalty. A character's name comes back every few sentences, and a penalty pushes the model to a different name. With penalty 1.15, 7% of stories switched names partway through. With penalty 1.08 on distinct tokens and the 50 character names exempt, 0% did.
- Optionally, keep a name budget. The training stories never have more than 3 names, or more than 2 names of one gender. Blocking new names past that limit removes the last name slips in group scenes.
- Temperature 1.0 with min-p 0.10 gives the most varied stories that are still coherent.
Evaluation
Effect of dataset size and training length. 100 stories per model, int8 weights, an earlier sampler (temperature 0.8, top-p 0.9, repetition penalty 1.15):
| 10k stories | 110k stories | 257k, 30k steps | 257k, 60k steps (this model) | |
|---|---|---|---|---|
| stories that end on their own | 100% | 99% | 100% | 100% |
| median words | 129 | 130 | 146 | 146 |
| stories flagged by the checker | 5% | 13% | 0% | 0% |
| stories that switch names | 10% | 4% | 7% | 1% |
| distinct 4-grams | 0.654 | 0.791 | 0.867 | 0.842 |
Blind judging. A separate model read anonymized stories and counted logic errors in each (who does what, characters appearing or vanishing, impossible positions, contradictions). It didn't know which model or setting wrote which story.
| errors per story | stories with no errors | |
|---|---|---|
| 257k, 30k steps | 0.67–0.71 | 50–51% |
| larger models (11.5M–14.0M parameters, same data) | 0.67–0.73 | 50–57% |
| this model, with the recommended sampling | 0.51–0.57 | 60% |
With this amount of data, bigger models didn't make fewer logic errors: past ~7M parameters, more data is what would help, not more size. A higher temperature (1.05–1.1) adds a little variety but also a few more errors.
Training data
TinyErotica/TinyErotica, curated config:
257,002 synthetic stories of 80–190 words in 16 categories, written from per-story plans by a Gemma 4 teacher
and checked automatically (length, banned words, any reference to ages or minors, unplanned acts, body and
pronoun mistakes). Every character is an adult (21 or older). The dataset card has the details.
Limits
- It has 7M parameters. Stories are short and formulaic, and in scenes with three people it sometimes mixes up who does what.
- It writes only what it was trained on: short explicit stories in 16 categories, including dark fantasy themes such as non-consent and taboo relationships between adults. Everything is fiction.
- Not for minors, and not for use in any product that minors can reach.
Related
- Literotica-Writer-26B-A4B: a 26B-A4B model that writes long, complete erotic stories (1,000–5,000 words) from a title, category and premise; runs locally with llama.cpp.
- TinyErotica dataset: the 300k stories this model was trained on.