Yu-Gi-Oh! Card Generator — Decoder-only Transformer from Scratch
A decoder-only Transformer trained from scratch in pure PyTorch to generate fictional Yu-Gi-Oh! card text.
Built as a learning project to understand LLM internals without HuggingFace Transformers.
Architecture based on Attention Is All You Need (Vaswani et al., 2017)
<card>
name: roar, the infer king
rarity: ultra rare
type: monster
sub_type: [spellcaster/effect]
attribute: fire
rank: level 8
attack: 2800
defense: 2800
description: cannot be normal summoned/set. must be special summoned by its
own effect. during your opponent's main phase (quick effect): you can target 1
"nekroz" monster you control; this turn, it can make a second attack during
each battle phase this turn. if this card attacks, it is changed to defense
position at the end of the battle phase.
</card>
<card>
name: gaia soul the fire kings
rarity: prismatic secret rare
type: spell
sub_type: quick-play
description: target 1 face-up monster your opponent controls (quick effect):
destroy it. you can only activate 1 "fire formation - tenki" per turn.
</card>
Usage
⚠️ This is a custom architecture. It cannot be loaded with AutoModel.from_pretrained().
You need the source code from the GitHub repo.