A minimal educational GPT-style language model trained on Art of Living Bhajan content, satsangs, guru stotrams, devotional songs, and spiritual lyrics related to Gurudev Sri Sri Ravi Shankar.
This project builds a small decoder-only GPT architecture from scratch in PyTorch. It uses a Byte Pair Encoding (BPE) tokenizer and trains on text extracted from a Bhajan PDF.
-
Place your Bhajan PDF in data/bhajan_lyrics.pdf.
-
Extract the PDF text into data/train.txt:
-
Create an account on Hugging Face if you do not have one.
-
Install the Hugging Face Hub client:
-
Create a repository for SriSriLM-Bhajan-v1 on Hugging Face.
-
Upload the model checkpoint and tokenizer files. Example using Python:
1from huggingface_hub import HfApi, Repository
2from pathlib import Path
3
4repo_id = "<username>/SriSriLM-Bhajan-v1"
5local_dir = Path(".")
6
7# Initialize and push the repo
8repo = Repository(local_dir=local_dir, clone_from=repo_id)
9repo.push_to_hub(commit_message="Upload SriSriLM-Bhajan-v1 checkpoint and tokenizer")
This code is intended for educational purposes, demonstrating how to build a small decoder-only transformer from scratch and train it on devotional bhajan text. The model is named SriSriLM-Bhajan-v1 and can be adapted for further fine-tuning or deployment.