/ Модель

Характеристики

Контекст
514 токенов
Параметры
305 млн
Лицензия
Apache 2.0
Архитектура
xlm-roberta · dense
Базовая модель
xlm-roberta-base
Библиотека
transformers
Опубликована
29 окт 2026

bhasha-lid-indic

Разметка токеновТекст → label5 профессий
83скачиваний за 30 дней1лайквеса обновлены6 ноя 2026

Описание модели

Составлено на русском по карточке модели и метаданным Hugging Face

Bhasha размечает язык каждого слова в смешанном индийском тексте, включая романизированные слова и переключение между английским и индийскими языками.

Bhasha — модель LatentAILabs для определения языка на уровне отдельных слов в смешанном индийском тексте. Она размечает слова как хинди, бенгальский, тамильский, телугу, маратхи, гуджарати, каннада, малаялам, панджаби, урду, одия или английский, а также использует метки для имён и прочих слов. Модель основана на XLM-RoBERTa-base и дообучена как классификатор токенов; метаданные указывают 305,2 млн параметров и контекст до 514 токенов. Она рассчитана на текст в родных письменностях и латинице, включая переключение языков внутри сообщения и романизированные варианты индийских языков.

Модель подходит для языковой разметки сообщений и комментариев перед анализом многоязычных или смешанных корпусов. В карточке приведены хорошие результаты на независимых наборах для смешения английского с малаялам и каннада, но отмечены ошибки на разговорном тамильском и склонность путать южноиндийские слова с телугу. Для телугу, маратхи, панджаби, урду и одия отсутствуют испытания на настоящем смешанном тексте; короткие сообщения, имена и различение хинди и урду латиницей также затруднительны. Распространяется по лицензии Apache-2.0.

Сценарии применения

  • определение языка каждого слова в смешанных индийско-английских сообщениях
  • разметка романизированного хинди, тамильского и других индийских языков
  • анализ переключения языков в комментариях и сообщениях
  • подготовка многоязычных текстовых корпусов к анализу
  • выделение английских и индийских слов в одном предложении

Ограничения

На разговорном тамильском модель часто ошибочно присваивает словам метку телугу; также встречаются ошибки на коротких сообщениях, именах и английских словах в хинди. Для ряда языков не проверялась работа на настоящем смешанном тексте, а хинди и урду латиницей часто трудно различить.

Публичные бенчмарки

Результаты из открытых лидербордов в сравнении с лидерами каталога

Публичных оценок пока нет

В подключённых источниках результатов этой модели не нашлось. Отсутствие оценки не значит, что модель хуже: её могли просто не проверять.

Источники: Hugging Face Leaderboards, Hugging Face Eval Results, Open LLM v2, MTEB, timm, Open ASR, EvalPlus, LLM Stats

Для каких профессий подходит5

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

Bhasha: word-level language ID for code-mixed Indian-language text

Newer version: Bhasha v2 — much better on spoken Tamil (CoLI Tamil .72 → .94) and better on every other independent test set except native-script and romanised single-language sentences, which stay within 0.005.

📖 Write-up: My Model Thought Tamil Was Telugu (Towards AI) · Summary and FAQ · By Arun Prabhakaran · @LatentAILabs

Bhasha (bhasha-lid-indic) tags every word of a message with its language: Hindi, Bengali, Tamil, Telugu, Marathi, Gujarati, Kannada, Malayalam, Punjabi, Urdu, Odia or English, plus name and other. It is built for the way people actually type: Tamil, Hindi or Kannada in Roman letters ("padam semma mass"), mixed with English in the same sentence, and native script too. It is a 278M-parameter XLM-RoBERTa-base token classifier, Apache-2.0.

I found no licensed, released word-level model for romanised Tamil, Malayalam or Kannada mixed with English. Two unlicensed checkpoints exist (a 2022 shared-task Kannada–English DistilBERT and a Malayalam–English XLM-R with no card), and MIT models such as MixLID cover these languages only in native script. On real YouTube comments the released Hinglish and Indic word-level models (muril-hinglish-lid, hing-bert-lid, IndicTriMix) score .28–.44; Bhasha scores .84–.95 on Malayalam and Kannada.

Results

Word-level macro-F1 over {Indic language, English}. name, other and mixed words (an English stem with an Indic ending) are left out of scoring. Every set was scored once with the frozen model; none of them was used for training.

Human-labelled sets (labels written by people; CoLI by native speakers; roman-script YouTube comments unless noted):

SetBhashaBhasha, expected language givenGlotLID v3 per word + English lexicon
CoLI-Dravidian 2024, Kannada + English.903.936.586
CoLI-Dravidian 2024, Malayalam + English.911.922.680
CoLI-Dravidian 2024, Tamil + English.723.754.561
CoLI-Kanglish (ICON 2022), Kannada + English.840.869.494
WoLLaI, Malayalam + English (cleaner text, full sentences).952.968.931
COMI-LINGUA, Hindi + English.896–.857 (muril-hinglish-lid)

Released models on the same sets (scored once, same scoring; Bhasha without / with langs):

SetBhashadistilka (Kanglish 2022 winner)Malayalam–English XLM-R (Anjana2002)MixLID (native-script only)
CoLI Kannada.903 / .936.954–.491
CoLI Malayalam.911 / .922–.682.447
CoLI Tamil.723 / .754––.437
WoLLaI Malayalam.952 / .968–.952.469
Our 425 real comments (ta / ml / kn).873 / .888 / .888kn .724ml .638.786 / .704 / .654
Native-script sentences, 11 languages.9956––.9916

distilka beats Bhasha on CoLI Kannada, from the same shared-task series as its training data; on independent Kannada comments Bhasha leads (.888 vs .724). distilka and the Malayalam model state no licence. MixLID was run as its own helper code runs it (plain Transformers, no remote code); each word takes its first sub-token's label.

The CoLI files have one word per row and no sentence boundaries, so they were scored in contiguous 12-word windows; scores on whole messages are likely a little higher.

Our own real set: 425 CC-BY YouTube comments from DravidianCodeMix (150 Tamil, 150 Malayalam, 125 Kannada), labelled word by word by two Claude passes and Gemini, 2-of-3 vote. These labels are LLM-reviewed, not human-verified.

PairBhashaGlotLID per word + lexiconGlotLID on the sentence + lexiconBest released Hinglish/Indic word-level model
Tamil + English.873.778.812.443 (muril-hinglish-lid)
Malayalam + English.888.746.832.430
Kannada + English.888.640.783.432

Before scoring we set ourselves a bar for each pair: the better of GlotLID-per-word + 0.10 and GlotLID-on-sentence. Malayalam and Kannada clear it; Tamil misses it by .005 (.873 vs .878). This bar is ours, not an external benchmark.

Other checks

CheckBhashaComparison
Main language of each message (425 real comments).706 macro-F1GlotLID v3 .528, IndicLID-FTR .231
Native script, 11 languages, sentence level (Bhasha-Abhijnaanam).9956GlotLID v3 .9958
Romanised sentences, 11 languages (Bhasha-Abhijnaanam).907GlotLID v3 .994 (may have seen this data)
LinCE Hindi + English (dev).922muril-hinglish-lid .952 (trained on real Hinglish). LinCE was a development check during training, so it is not independent
IndicTriMix English + Hindi + Bengali.968–
IndicTriMix English + Hindi + Gujarati.678Hindi words inside Gujarati mixing are weak

Known weaknesses

  • Spoken Tamil. Training Tamil is news Tamil, converted to Roman letters, and spoken Tamil uses different words. On human-labelled Tamil comments, about a third of Tamil words are tagged Telugu. Giving the expected language (langs=["ta"]) stops the Telugu errors, but many of those words then come out as English. A v2 trained on real chat text is planned.
  • Telugu pull. Other South Indian words drift to Telugu too (5–9% of Malayalam and Kannada words). If you know the language pair, pass langs.
  • No real code-mixed test for Telugu, Marathi, Punjabi, Urdu or Odia: only native-script and romanised single-language sentences were tested for these. Bengali and Gujarati were tested in code-mixed text only alongside Hindi and English (IndicTriMix: .968 and .678).
  • English words inside Hindi sentences are sometimes tagged Hindi ("call", "meeting" in a long Hinglish sentence); English F1 on COMI-LINGUA is .836 against .956 for Hindi.
  • Names are weak (name F1 .23–.56). Treat name as a hint.
  • Hindi vs Urdu in Roman letters often cannot be told apart; the wrapper returns hi/ur when it is unsure.
  • Short messages (one or two words) carry little context; single-word accuracy is much lower than in a sentence.

Use

# pip install transformers torch huggingface_hub
import os, sys
from huggingface_hub import hf_hub_download
sys.path.insert(0, os.path.dirname(hf_hub_download("LatentAILabs/bhasha-lid-indic", "lid_wrapper.py")))
from lid_wrapper import LID

lid = LID("LatentAILabs/bhasha-lid-indic")
lid("ನಾಳೆ meeting ಇದೆ")
# {"words": [("ನಾಳೆ", "kn"), ("meeting", "en"), ("ಇದೆ", "kn")], "main": "kn", "script": "mixed", "mixed": True, ...}

lid("bro naan nalaiku office varala", langs=["ta"])   # Tamil + English: pass langs (see Known weaknesses)
# {"words": [("bro", "en"), ("naan", "ta"), ("nalaiku", "ta"), ("office", "en"), ("varala", "ta")], "main": "ta", ...}

lid.tag(["kal", "meeting", "hai"])                    # list of words -> list of labels

Labels: hi bn ta te mr gu kn ml pa ur or en name other, plus hi/ur from the wrapper. The raw model is a standard XLMRobertaForTokenClassification; label the first sub-token of each word.

Training data

Training rows were built by code from public text: no hand labels and no LLM-written text.

  • Native sentences from IndicCorp v2 (CC0) for the 11 languages and English.
  • Romanised spellings from Aksharantar (CC-BY 4.0), the IndicXlit transliteration model (MIT) and simple rules, weighted by how often each spelling appears in romanised web text (FineWeb-2, ODC-By; word counts only).
  • Names from Wikidata (CC0).
  • 1.65M rows: romanised, mixed with English spans, native, native mixed, mixed script and English, plus chat-style noise ("nhi", "superrr", emoji, @mentions). Rows overlapping any evaluation set were removed.
  • XLM-RoBERTa-base, 1 epoch, lr 3e-5, batch 64, one L4 GPU (about an hour).

Evaluation data credits

CoLI-Dravidian 2024 (FIRE 2024 shared task) and CoLI-Kanglish (ICON 2022) were used for evaluation only and are not redistributed. WoLLaI Mal-Eng (Pondicherry University, CC BY 4.0, DOI 10.17632/tzrcrrwz4n.1). COMI-LINGUA, LinCE, IndicTriMix, Bhasha-Abhijnaanam (CC0) and DravidianCodeMix (CC-BY 4.0) were also used for evaluation only.

License

Apache-2.0. Copyright 2026 Arun Prabhakaran. Fine-tuned from FacebookAI/xlm-roberta-base (MIT); see LICENSE and NOTICE.

More from the author

Built by Arun Prabhakaran (Latent AI Labs). Open models for Indian languages:

Write-up: My Model Thought Tamil Was Telugu · Summary and FAQ: https://latentailabs.github.io/bhasha-language-id/

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · transformers · token-classification

Можно запустить

Подбираем GPU…

Класс архитектуры
XLMRobertaForTokenClassification
Ревизия весов
3a43724

0 моделей