XLM-RoBERTa-base fine-tuned for Hindi–English code-mixed POS tagging

Model Details

Model Description

NOT PRODUCTION READY DO NOT USE. FOR TESTING PURPOSES ONLY A token-classification model for part-of-speech tagging of Hindi–English code-mixed text. Fine-tuned from xlm-roberta-base on the POS-annotated split of the COMI-LINGUA dataset. Built as part of doctoral research on structural and pragmatic dimensions of Hindi–English code-mixing in digital communication.

  • Model type: Token classification (POS tagging)
  • Language(s): Hindi, English, Hindi–English code-mixed
  • License: [inherit from COMI-LINGUA — check its terms before setting this]
  • Finetuned from model: xlm-roberta-base

Model Sources

Uses

Direct Use

POS tagging of Hindi–English code-mixed sentences for corpus-linguistic analysis. Intended for research use only

Downstream Use

Intended as one stage in an annotation pipeline for a Hindi–English code-mixed Reddit corpus, preceded by language identification and followed by human review. Model output is treated as a first pass requiring manual verification, not as gold annotation.

Out-of-Scope Use

  • Production or user-facing applications
  • Languages or language pairs outside Hindi–English
  • Monolingual text in scripts or domains substantially unlike the training data
  • Any use where unreviewed automatic output is treated as ground truth

Bias, Risks, and Limitations

Recommendations

How to Get Started with the Model

from transformers import AutoTokenizer, AutoModelForTokenClassification
import torch

repo = "navnav98/xlmr-comi-pos"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForTokenClassification.from_pretrained(repo)
model.eval()

id2label = model.config.id2label

def tag(text):
    words = text.split()
    inputs = tokenizer(words, is_split_into_words=True,
                       return_tensors="pt", truncation=True, max_length=256)
    with torch.no_grad():
        logits = model(**inputs).logits
    preds = torch.argmax(logits, dim=2)[0]
    word_ids = inputs.word_ids()

    result, seen = [], set()
    for idx, wid in enumerate(word_ids):
        if wid is not None and wid not in seen:
            seen.add(wid)
            result.append((words[wid], id2label[preds[idx].item()]))
    return result

print(tag("kal main office nahi gaya kyunki traffic bahut zyada tha"))

Note: inputs longer than 256 subword tokens are silently truncated.

Training Details

Training Data

COMI-LINGUA, POS-annotated split. [add: number of sentences/tokens, train/dev/test sizes, tagset used — UD or BIS]

Training Procedure

Preprocessing

Training Hyperparameters

  • Training regime: [fp16 / fp32 — Colab T4]
  • Epochs: [ ]
  • Learning rate: [ ]
  • Batch size: [ ]
  • Optimizer: [ ]
  • Max sequence length: 256

Speeds, Sizes, Times

Evaluation

Testing Data

Metrics

Token-level F1.

Results

Metric Score
F1 0.886

Summary

Achieves 0.886 F1 on the COMI-LINGUA POS test split. Comparison point: HingRoBERTa (Nayak & Joshi 2022) reports higher POS accuracy on code-mixed benchmarks and may be a stronger base model for this task.

Citation

Downloads last month
95
Safetensors
Model size
0.3B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for navnav98/xlmr-comi-pos

Finetuned
(15)
this model

Dataset used to train navnav98/xlmr-comi-pos