CoolFace
Apppublic

Leore42/tiny-transformer-trainer

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes
App README

Tiny Transformer Trainer ๐Ÿง 

Train small GPT-style transformers from your own text data โ€” directly in the browser.

How to Use

  1. 1.Upload data:
  2. 2..txt โ€” plain text files
  3. 3..csv โ€” Q&A pairs with named columns
  4. 4..json โ€” Q&A pairs as a list of objects
  1. 1.Set column names (for CSV/JSON): specify which columns hold questions/prompts and answers/responses.
  1. 1.Configure model: pick hidden size, layers, heads, vocab size, and max sequence length.
  1. 1.Train: click ๐Ÿš€ Start Training and watch live logs.
  1. 1.Download: grab the .zip with model weights + tokenizer.

Output Files

FileDescription
model/Trained GPT2LMHeadModel weights + config
tokenizer/Trained PreTrainedTokenizerFast vocab + config
README.mdUsage code snippet

Local Usage

python
from transformers import GPT2LMHeadModel, PreTrainedTokenizerFast

model = GPT2LMHeadModel.from_pretrained("trained_model_output/model")
tokenizer = PreTrainedTokenizerFast.from_pretrained("trained_model_output/tokenizer")