tamizhimet-indicbart

ai4bharat/IndicBARTSS fine-tuned to classify a Tamil song-lyric line into one of 9 rhetorical-figure classes (TamizhiMet).

Labels: Literal, Uvamai, Uruvagam, Uyarvu_Navirchi_Ani, Thatkurippetra_Ani, Vanchapugalchi_Ani, Madakku, Ilivu, Iyam.

Training

  • Data: TamizhiMet train split, 8,680 lines (one label per line).
  • Epochs 5, batch size 32, learning rate 3e-05, AdamW (weight decay 0.01), linear schedule with 10% warmup, max length 64 tokens.
  • Cross-entropy with class weights proportional to n_c^-0.5 (mean 1).
  • Seed 42; precision fp32; checkpoint after the last epoch.

Results of this checkpoint

Macro-F1 is averaged over the classes that have gold lines in the split.

split lines macro-F1 accuracy MCC classes without gold lines
val 1,240 0.267 0.869 0.777 Madakku, Iyam
test 2,480 0.233 0.871 0.778 Ilivu

Per-class F1 (gold support in brackets; fewer than 10 gold lines is unreliable):

class val test
Literal 0.89 (668) 0.89 (1337)
Uvamai 0.98 (429) 0.97 (871)
Uruvagam 0.00 (105) 0.00 (194)
Uyarvu_Navirchi_Ani 0.00 (25) 0.00 (44)
Thatkurippetra_Ani 0.00 (7) 0.00 (25)
Vanchapugalchi_Ani 0.00 (5) 0.00 (5)
Madakku n/a (0) 0.00 (1)
Ilivu 0.00 (1) n/a (0)
Iyam n/a (0) 0.00 (3)

For reference, the paper runs (same settings) score macro-F1 val 0.267 ± 0.001; test 0.233 ± 0.001 (mean ± sd over seeds 42/43/44). This checkpoint is a retrained seed, so its scores differ slightly.

Limitations

The training data is dominated by Literal and Uvamai; the rarest classes have very few training lines, and the model seldom or never predicts them (see the per-class table).

Usage

Input format: the line followed by </s> <2ta>, with add_special_tokens=False, exactly as in training.

import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer

repo = "kavienanj/tamizhimet-indicbart"
tok = AutoTokenizer.from_pretrained(repo, use_fast=False, do_lower_case=False, keep_accents=True)
model = AutoModelForSequenceClassification.from_pretrained(repo).eval()

line = "பறவை போல் பறந்தவன்"
enc = tok(line.strip() + ' </s> <2ta>', add_special_tokens=False, truncation=True, max_length=64, return_tensors="pt")
with torch.no_grad():
    probs = model(**enc).logits.softmax(-1)[0]
print(model.config.id2label[int(probs.argmax())])
Downloads last month
10
Safetensors
Model size
0.2B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for kavienanj/tamizhimet-indicbart

Finetuned
(6)
this model