Skip to content

santhoshrao95/thirukural_gpt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Tamil GPT - Thirukkural Language Model

A GPT-style transformer model trained on Thirukkural, inspired by Andrej Karpathy's "Let's build GPT" tutorial. This project demonstrates building a character-level language model for Tamil text using the ancient wisdom of Thiruvalluvar.

About Thirukkural

Thirukkural is a classical Tamil text with 1,330 couplets covering ethics, politics, and love. Written by Thiruvalluvar 2,000+ years ago, each kural follows a specific 7-word meter, making it perfect for studying Tamil poetic patterns.

Dataset

  • Source: Web-scraped from thirukkural.gokulnath.com
  • Size: 1,330 couplets (~7,840 Tamil words)
  • Processing: Character-level tokenization with Tamil Unicode normalization

Model Architecture

  • Transformer-based with multi-head self-attention
  • Character-level tokenization optimized for Tamil
  • 5 layers, 4 attention heads, 124 embedding dimensions

Key Features

  • Generates Tamil text in Thirukkural's philosophical style
  • Preserves classical Tamil meter and vocabulary
  • Handles Tamil Unicode complexities
  • Domain-specific training on ethical and moral themes

Results

The model successfully learns:

  • Thirukkural's poetic structure and rhythm
  • Classical Tamil vocabulary patterns

Training: ~10 mins on T4 GPU, final loss ~2.9296

Credits & Acknowledgments


Star if you found this helpful!
🔀 Fork to experiment with other classical texts!

Contact: santhoshrao95.2@gmail.com

About

This is a thitukural gpt inspired and implemented following Andrej karpathy's Let's build GPT: from scratch, in code, spelled out.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors