/ Модель

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

Лицензия
Своя лицензия
Опубликована
25 июл 2026

tongue

Классификация текстаТекст → label5 профессий

Компактная многоязычная модель определяет язык короткого текста для локального использования на устройстве.

2скачиваний за 30 дней16лайковвеса обновлены3 окт 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

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

Tongue — компактная модель идентификации языка от desert-ant-labs, предназначенная для определения языка по короткому тексту, в том числе по нескольким словам. Она принимает UTF-8 строку длиной до 512 символов и возвращает ранжированные коды языков ISO 639-1/639-3 с вероятностями и оценкой надёжности. Модель поддерживает 84 языка: 59 распознаёт по лексическим признакам, ещё 25 определяет по письменности; охвачена 31 письменность. Для обработки на устройстве доступны артефакты int8 размером 2,01 МиБ и int4 размером 1,01 МиБ, а также граф ONNX fp32 размером 8,4 МБ. Граф содержит классификационную голову, а нормализация, хеширование и выбор маршрута по письменности выполняются хост-приложением.

Модель подходит для определения языка в мобильных приложениях, браузерах и других локальных сценариях, где важны небольшой размер, высокая скорость и работа без сети. На опубликованных тестах точность заметно зависит от длины текста: на предложениях она достигает 0,97–0,99, а на отдельных словах составляет около 0,75. Для версии int4 README указывает небольшое снижение точности на очень коротком вводе. Среди описанных ограничений — особый режим распознавания монгольского только в традиционной монгольской письменности. В метаданных указана лицензия other, но её конкретные условия в предоставленных сведениях не раскрыты.

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

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

Ограничения

На отдельных словах качество ниже, чем на фразах и предложениях; для int4 README отмечает небольшую потерю точности на одно- и двухсловном вводе. Монгольский распознаётся только в традиционной монгольской письменности; конкретные условия лицензии other в предоставленных сведениях не раскрыты.

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

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

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

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

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

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

Открыть на Hugging Face

Tongue

Detect language based on 3 words.

On-device language identification for short text across 84 languages.

PlatformsiOS, macOS, tvOS, visionOS, Android, Linux, Windows, Browser, Node
Languages84
Weightsv1.0.0

Install

Swift (requirements)

.package(url: "https://github.com/Desert-Ant-Labs/desert-ant-core.git", from: "3.6.0")

Then add the Tongue product to your target.

Kotlin (requirements)

implementation("ai.desertant:tongue:3.6.0")

JavaScript (requirements)

npm i @desert-ant-labs/tongue

Name the language from three words, across 84 languages. Built for where detection is hardest and most useful on a device: search boxes, chat messages, keyboard input. The shipped weights are 2MB int8 (2,104,940 bytes), there is no tokenizer and no vocabulary file, and a detection costs tens of microseconds.

"kann ich das haben" → German · "안녕하세요" → Korean · "привет как дела" → Russian · "quanto costa il biglietto" → Italian

On genuinely ambiguous input it says so rather than guessing: "la casa" comes back as Italian or Spanish, because the phrase is equally both.

Live demo: desert-ant-labs/tongue-demo , runs entirely in your browser; nothing you type leaves the page.

Files

FileFormatSizeContents
tongue_int8.binRaw int8 + fp322.01 MiBThe shipped artifact. Byte-identical to what the live demo runs.
tongue_int4.binRaw int4 + fp321.01 MiBHalf-size alternative for tight bundles. Costs roughly 0.4pp on short text, see Sizes.
tongue.onnxONNX (fp32, opset 17)8.4MBPortable graph for onnxruntime / onnxruntime-web.
tongue_meta.jsonJSONtinyRuntime tables: label order, hashing constants, script routing.
labels.jsonJSONtinyThe 59 model labels plus the script-decided languages, with English and native names.

There is no tokenizer file, so nothing has to be shipped or version-matched alongside the weights.

Inputs and outputs

Input: a short UTF-8 string, up to 512 characters. Output: ranked ISO 639-1/639-3 codes with probabilities, plus a reliability signal (confident / likely / tentative). Script-decided inputs return a single confident answer.

The ONNX graph carries only the head: values (int64 hashed bucket ids) and offsets (int64 per-sample starts) in, logits out. Normalization, hashing and script routing run in the host before the graph; tongue_meta.json documents them.

Coverage

59 languages are learned by the lexical model and a further 25 are decided by script alone, across 31 scripts, Latin, Cyrillic, Arabic, Greek and the CJK and Indic families among them, for 84 languages in total. One of the 84, Mongolian, is detected only in the traditional Mongolian script; see failure mode 3.

Sizes

Two quantisations of the same weights ship side by side. Pick on bundle budget, not on principle.

tongue_int8.bintongue_int4.bin
Size2.01 MiB1.01 MiB
FLORES 2-word0.8690.866
FLORES 5-word0.9740.973
Held-out single words0.7590.752
Held-out sentences0.9710.970

The int4 loss lands almost entirely on one- and two-word input; full sentences are unaffected within measurement noise. Since short text is what this model is for, int8 stays the default and int4 is the option when a megabyte matters more than the last half point.

Failure modes (read before deploying)

Publishing these is part of the product.

1. One or two words is often genuinely undecidable, and no model size fixes it. A single common word frequently belongs to several languages at once ("sale" is English, French and Italian; "la casa" is equally Italian and Spanish). tongue reports a tie or a tentative answer in these cases, and does not catch every one: a phrase mixing languages, like "un garage sale", can still draw a confident-looking single answer. Mitigation: treat low-reliability output as "unknown", not as an answer, and ask for more text where the product allows it.

2. Malay and Indonesian are not reliably separable. They share vocabulary and orthography to the point where short samples carry no distinguishing signal. This is a structural limit, not a tuning gap, it is not cheaply closable at this size, and every detector we measured struggles with it. Mitigation: if you need the distinction, treat ms/id as one bucket or disambiguate from user locale.

3. Mongolian is detected only in the traditional Mongolian script. Mongolian written in Cyrillic, the dominant modern orthography, is not distinguished from the other Cyrillic languages and will usually come back as Russian. The language count includes Mongolian because the traditional script works; Cyrillic Mongolian does not. Mitigation: do not rely on tongue for Cyrillic Mongolian.

4. Brand names, numbers and code are not language. "Samsung Galaxy", "v1.2.3" and "2024 annual report" have no correct answer; the model will still return its best guess for anything with letters in it. Mitigation: filter non-prose input before detection.

5. Single-word scores are vocabulary recognition, not generalization. The frequent words of a language appear in everyone's training data, so any detector's single-word accuracy partly measures memorized vocabulary. Read the word-pair and sentence numbers as the generalization signal.

Measured quality

Every number below is measured on the shipped int8 weights, on three public benchmarks, with other detectors run on the identical rows and language subsets. Higher is better.

FLORES-200

Sentences from FLORES-200 truncated to their first 2, 3 and 5 words. Accuracy over the 20 languages the three detectors share.

DetectorSize2 words3 words5 words
tongue2MB0.8690.9330.974
lingua293MB0.8000.8870.956
eld1MB0.7800.8560.912

The lingua test set, the benchmark that library publishes

1,000 single words, word pairs and sentences per language, drawn from the same collection lingua trains on. Accuracy over the languages we share.

DetectorSizeSingle wordsWord pairsSentences
tongue2MB0.7460.9090.988
lingua293MB0.7520.9150.985

eld, an independent benchmark

Accuracy over the languages tongue supports (53,035 single-word rows, 53,613 word pairs, 53,141 sentences, 9,066 tweets). Apple is the built-in system detector; HeLI-OTS is a 51MB JVM model. lingua 2.2.0 installs as a single 293MB compiled extension with its language models embedded.

DetectorSizeTweetsSingle wordsWord pairsSentences
tongue2MB0.9920.7590.8870.971
lingua293MB0.9840.7560.8940.950
HeLI-OTS51MB0.9860.6830.8430.967
Applesystem0.9970.6410.7190.748

Latency

Measured per single detection in JavaScript on an Apple-silicon laptop: 0.013ms for one word, 0.028ms for a short sentence, 0.10ms at 193 characters (p99 0.24ms). On-device budgets on phone-class hardware will be higher; the design target is under 1ms.

License

Desert Ant Labs Source-Available License. Free for most apps, and a commercial license is required at scale. Full terms are at the link. Licensing: licensing@desertant.com.

See THIRD_PARTY_NOTICES.md.

Citation

@software{tongue_2026,
  title  = {Tongue: On-device language identification for short text across 84 languages},
  author = {Desert Ant Labs},
  year   = {2026},
  url    = {https://huggingface.co/desert-ant-labs/tongue},
}

© 2026 Desert Ant Labs · https://desertant.com

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

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

GPU в ailist

Универсальный рантайм

Нельзя запустить

В репозитории нет config.json: не понять архитектуру модели.

Ревизия весов
b1cc06d

0 моделей