File size: 1,731 Bytes
6fbc64b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
language:
- en
license: apache-2.0
library_name: transformers
tags:
- dnd
- dungeons-and-dragons
- rpg
- text-generation
- qlora
- tinyllama
base_model: TinyLlama/TinyLlama-1.1B-Chat-v1.0
pipeline_tag: text-generation
---

# DM-LLM-Tiny

A tiny (1.1B parameter) language model fine-tuned for **Dungeons & Dragons** content generation.

## What it does

Generates creative D&D content including:
- **NPCs** — memorable characters with backstories, motivations, and quirks
- **Quests** — hooks, outlines, and full quest arcs
- **Dialog** — in-character conversations, monologues, and banter
- **Locations** — vivid descriptions of dungeons, towns, and wilderness
- **Encounters** — combat, social, and puzzle encounters

## Usage

### With Ollama (easiest)
```bash
ollama run JBHarris/dm-llm-tiny
```

### With Transformers
```python
from transformers import pipeline

pipe = pipeline("text-generation", model="JBHarris/dm-llm-tiny")
messages = [
    {"role": "system", "content": "You are a creative D&D dungeon master's assistant."},
    {"role": "user", "content": "Create a mysterious NPC for a tavern scene."},
]
result = pipe(messages, max_new_tokens=512)
print(result[0]["generated_text"][-1]["content"])
```

## Training

- **Base model:** TinyLlama-1.1B-Chat-v1.0
- **Method:** QLoRA (4-bit NF4 quantization + LoRA r=64)
- **Data:** ~5000 synthetic D&D instruction/response pairs generated with Claude
- **Hardware:** NVIDIA RTX 4080 16GB

## Limitations

This is a 1.1B parameter model. It's creative and fun for brainstorming but will not match
the quality of larger models (7B+). Best used as a quick idea generator, not a replacement
for a human DM's judgment.

## License

Apache 2.0 (same as base model)