Run this model with HF Jobs

Run purplejedi/dungeongpt-tiny-pretrain on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/purplejedi/dungeongpt-tiny-pretrain. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/purplejedi/dungeongpt-tiny-pretrain on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/purplejedi/dungeongpt-tiny-pretrain. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/purplejedi/dungeongpt-tiny-pretrain. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

DungeonGPT β€” Tiny Pretrained GPT (Experiment 01)

A small (~4.27M parameter) GPT-2-style causal Transformer pretrained from scratch in PyTorch on tabletop RPG scene cards (CJJones/RPG_Scenes_LLM_Synthetic), exported to standard Hugging Face GPT2LMHeadModel safetensors format (verified max absolute logit diff 7.15e-06 against the original PyTorch checkpoint dungeon_gpt_best.pt).

Provenance

  • Source Repository: sriramrathinavelu/DungeonGPT
  • Training Git Commit SHA: a8acfb1fc821dfe6d51eae2c0e3774f64e384702
  • Notebook: notebooks/01_pretraining.ipynb
  • Dataset: CJJones/RPG_Scenes_LLM_Synthetic (split="train", deduplicated to 2,500 scenes)
  • Split Identifier: seed42_90_5_5 (2,250 train / 125 val / 125 test, seed 42)
  • Dataset Split SHA-256: 691c8d38c1dd270aa156d601e1d1d2cd1e0f5da08b5eca3761d5ded7ccc33196
  • Weights & Biases Run: https://wandb.ai/chillyskywalker/dungeongpt/runs/cywyjr84
  • Hardware: Tesla T4

Model Architecture & Tokenizer

  • From-Scratch Training Class: dungeongpt.models.tiny_gpt.DungeonGPT (Pre-LN causal decoder, exact GELU, tied embeddings)
  • Hugging Face Format: Native GPT2LMHeadModel (model.safetensors, config.json) + PreTrainedTokenizerFast (tokenizer.json, tokenizer_config.json)
  • Parameters: 4,268,800 (all trainable)
  • Config: vocab_size=4089, emb_dim=256, context_length=256, n_layers=4, n_heads=4
  • Tokenizer: Custom ByteLevel BPE (<|scene_start|>, <|scene_end|>)

Evaluation Metrics

Metric Value
Best Epoch 13
Best Validation Cross-Entropy Loss 0.3667
Best Validation Perplexity 1.44
Total Optimizer Steps 1872
Total Training Tokens Seen 7,618,560

Known Limitations

  • Pretrained purely with unconditional next-token prediction; does not reliably follow arbitrary instructions or maintain strict cross-field factual consistency between card headers and prose.
  • Intended as an educational base checkpoint for Experiment 02 (notebooks/02_sft.ipynb, Supervised Fine-Tuning with prompt loss masking).

Usage

import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "purplejedi/dungeongpt-tiny-pretrain"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id)

prompt = "<|scene_start|>\nPrimary Setting: Haunted Castle\n"
inputs = tokenizer(prompt, return_tensors="pt")
with torch.no_grad():
    output_ids = model.generate(
        **inputs,
        max_new_tokens=200,
        do_sample=True,
        temperature=0.8,
        eos_token_id=tokenizer.eos_token_id,
        pad_token_id=tokenizer.pad_token_id,
    )
print(tokenizer.decode(output_ids[0], skip_special_tokens=False))
Downloads last month
37
Safetensors
Model size
4.27M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for purplejedi/dungeongpt-tiny-pretrain

Finetunes
1 model

Dataset used to train purplejedi/dungeongpt-tiny-pretrain