Polish Lyrics Year Regressor
HerBERT-based regression models trained on Polish song lyrics to predict the approximate release year of a song from its text.
Overview
This Hugging Face repository contains three separate model checkpoints trained with different text chunking strategies:
first_last_herbert.pt — uses the first and last chunks of the lyrics
hierarchical_herbert.pt — uses a hierarchical chunking approach
random_chunk_herbert.pt — uses randomly sampled chunks of the lyrics
These models are part of the same NLP project and were trained/evaluated on Polish lyrics data.
Task
Given the lyrics of a Polish song, predict the likely release year.
This is a regression task rather than classification.
Models
| Checkpoint | Strategy | Notes |
|---|
first_last_herbert.pt | First + last chunk | Lightweight baseline |
hierarchical_herbert.pt | Hierarchical chunking | Structured representation of long lyrics |
random_chunk_herbert.pt | Random chunks | Samples different parts of the lyrics |
Repository Contents
README.md — project overview
- model weights for the three checkpoints above
- accompanying training / evaluation artifacts if included in the repo
Usage
Load a checkpoint with your preferred PyTorch / Transformers inference script, then pass tokenized lyric chunks through the model to get a year prediction.
Example workflow:
- Tokenize the lyrics
- Split them according to the selected chunking strategy
- Run inference with one of the checkpoints
- Convert the regression output into the predicted year
Why three models?
The three checkpoints make it easy to compare how different ways of splitting long lyrics affect performance. This is useful for testing whether the model benefits more from:
- using the beginning and end of the text,
- preserving a hierarchy of chunks,
- or sampling random sections.
Notes
- The repository is intended for experimentation and comparison of chunking strategies.
- Large model weights are stored in Hugging Face rather than GitHub because of file size limits.
Author
Created as part of an NLP project on Polish song lyrics.