The Dragon Hatchling: The Missing Link between the Transformer and Models of the Brain
Paper β’ 2509.26507 β’ Published β’ 560
Pathway's BDH ("Dragon Hatchling", arXiv:2509.26507) trained from scratch on the tiny-Shakespeare corpus β the same toy task the official repo ships, but run to completion on GPU. Code: github.com/pathwaycom/bdh.
This is a toy model for studying the BDH architecture, not a general text model.
n_layer=6, n_embd=256, n_head=4, vocab_size=256, block size 512karpathy/char-rnn input.txt)bdh_tinyshakespeare.pt holds the trained weights plus its config:
{"model": state_dict, "config": {...}, "iters": 3000, "final_loss": 0.1147}
Clone the official repo first so bdh is importable, then (from the training
notebook's reload check):
import torch
import bdh # from github.com/pathwaycom/bdh
ckpt = torch.load("bdh_tinyshakespeare.pt", map_location="cuda", weights_only=True)
model = bdh.BDH(bdh.BDHConfig(**ckpt["config"])).to("cuda")
model.load_state_dict(ckpt["model"])
model.eval()
prompt = torch.tensor(bytearray("To be or ", "utf-8"), dtype=torch.long).unsqueeze(0).to("cuda")
out = model.generate(prompt, max_new_tokens=300, top_k=3)
print(bytes(out.to(torch.uint8).cpu().squeeze(0)).decode(errors="backslashreplace"))