gpt2-reuters-from-scratch

GPT-2 style causal language model trained from random initialisation on the Reuters articles dataset (title + body concatenated) with the next-token prediction objective. Tokenizer: ingeniumacademy/gpt2-reuters-tokenizer.

Setting Value
Layers / heads / d_model 6 / 6 / 384
Context length 256
Parameters 30,713,856
Epochs 5
Batch size / LR 32 / 0.0005 (cosine, 5% warmup)
Training time 561.2 s
Validation loss (ppl) 4.1743 (65.00)
Test loss (ppl) 3.9747 (53.24)

Supporting files: training_summary.json, log_history.csv, loss_curve.png.

from transformers import AutoTokenizer, AutoModelForCausalLM
tok = AutoTokenizer.from_pretrained('randeepa02/gpt2-reuters-from-scratch')
model = AutoModelForCausalLM.from_pretrained('randeepa02/gpt2-reuters-from-scratch')
Downloads last month
-
Safetensors
Model size
30.7M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train randeepa02/gpt2-reuters-from-scratch