TimeCapsuleLLM NYC 100M
Small Llama-style causal language model trained from scratch on a cleaned New York historical English corpus.
This is an evaluation model intended for corpus-quality testing. It is not instruction tuned and should be treated as a base text-generation model.
Model Details
- Architecture:
LlamaForCausalLM - Parameters: 100,449,920
- Layers: 12
- Hidden size: 640
- Attention heads: 10
- KV heads: 10
- MLP/intermediate size: 1,728
- Context length: 512
- Tokenizer: custom ByteLevel BPE
- Vocabulary size: 32,000
- Precision in checkpoint: safetensors weights
Training Data
- Source slice: cleaned New York historical English corpus
- Training tokens: 1,499,987,968
- Validation tokens: 10,000,000
- Raw text used for tokenization: about 4.49 GB
- Training duration: about 24.7 hours on a single RTX 4060 8GB
Intended Use
This model is useful for:
- historical-English texture experiments
- testing small from-scratch language-model training pipelines
- generating short 19th-century-style fragments
- evaluating the quality of the underlying cleaned corpus
Limitations
The model is small and trained for one epoch. It often produces plausible period style but may drift semantically, repeat phrases, or invent incoherent details. Best generations are usually short atmospheric fragments with strong prompts.
Quick Start
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "YOUR_USERNAME/timecapsulellm-nyc-100m"
tokenizer = AutoTokenizer.from_pretrained(model_id, use_fast=True)
model = AutoModelForCausalLM.from_pretrained(model_id)
prompt = "THE NIGHT FERRY.\nIt was past eleven o'clock when I came down to the East River."
inputs = tokenizer(prompt, return_tensors="pt", add_special_tokens=False)
inputs.pop("token_type_ids", None)
with torch.no_grad():
output = model.generate(
**inputs,
max_new_tokens=80,
do_sample=True,
temperature=0.82,
top_p=0.92,
top_k=80,
repetition_penalty=1.28,
no_repeat_ngram_size=5,
pad_token_id=tokenizer.pad_token_id,
eos_token_id=tokenizer.eos_token_id,
)
print(tokenizer.decode(output[0], skip_special_tokens=True))