← Projects

Fine-tuning GPT-2 for News

Fine-tuned GPT-2 on a news dataset for conditional text generation, covering tokenization, training with Hugging Face Trainer, and evaluation.

Role
Creator
Period
2025 – now
Status
shipped
Type
Open source
Stack
Python · Hugging Face Transformers · PyTorch

A hands-on project to understand how large language models are adapted to a domain.

  • Tokenize a JSONL news dataset and save it to disk
  • Fine-tune GPT-2 with the Hugging Face Trainer
  • Generate and evaluate news-style text from prompts

I wrote up what I learned in Generative AI Large Language Model: Train From Pre-trained Model.