/ Модель

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

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

toxic

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

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

598скачиваний за 30 дней10лайковвеса обновлены25 ноя 2026

Бенчмарки

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

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

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

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

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

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

Toxic — мультиязычная модель для выявления ненавистнических, оскорбительных и угрожающих сообщений, разработанная Desert Ant Labs. Она предназначена для локальной проверки текста перед публикацией: приложение может предупредить автора или отправить сообщение на проверку, сохраняя текст на устройстве. Модель выдаёт оценки по категориям HATEFUL, ABUSIVE и THREAT, а для ненавистнических сообщений также определяет возможную цель нападок: расу, религию, национальное или этническое происхождение, сексуальную ориентацию, гендер, инвалидность, возраст или другую характеристику.

Это модель текстовой классификации размером 0,14 млрд параметров с вариантами для Core ML, LiteRT/TFLite и ONNX. Она поддерживает 35 языков и обрабатывает текст окнами по 128 токенов; для длинных текстов итоговая оценка выбирается по наиболее выраженному окну. Заявлено выполнение на iOS, macOS, tvOS, visionOS, Android, Linux, Windows, в браузере и Node.js. На iPhone 16 Pro короткое сообщение обрабатывается примерно за 2 мс.

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

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Toxic

Catch hate speech before it's posted.

On-device hate-speech triage in 35 languages.

PlatformsiOS, macOS, tvOS, visionOS, Android, Linux, Windows, Browser, Node
Languages35
Weightsv0.2.2
Demohttps://desertant.com/models/toxic/
StatusBeta

Toxic flags hateful, abusive and threatening text on device, in 35 languages, so you can warn the writer or hold a message for review before it's posted. For hate speech, Toxic also names the type of protected characteristic the message targets, such as religion, gender or age. Toxic runs on iPhone, iPad, Mac, Apple TV, Vision Pro, Android, Linux, Windows, in the browser and in Node, and text stays on device. On an iPhone 16 Pro, Toxic scores a short message in 2.0ms.

Install

Swift (requirements)

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

Then add the Toxic product to your target.

Kotlin (requirements)

implementation(platform("ai.desertant:bom:6.0.0"))
implementation("ai.desertant:toxic")

JavaScript (requirements)

npm i @desert-ant-labs/toxic @litertjs/core   # browser
npm i @desert-ant-labs/toxic                  # Node, prebuilt native core

Usage

Swift

import Toxic

let toxic = Toxic()
let result = try await toxic.analyze(comment)
if result.isToxic { holdForReview(result.content, result.targets) }
result.score(.hateful)     // 0...1
result.flagged             // the heads at or above their thresholds

Pass the text exactly as written. The SDK doesn't lower-case, trim or remove anything, including punctuation, emoji and markup. To stop an analysis, cancel the task that called analyze, and analyze throws CancellationError. On Apple platforms, the Toxic model runs entirely on the Neural Engine. To use other compute units, pass computeUnits: to Toxic(directory:computeUnits:).

Kotlin

import ai.desertant.toxic.Toxic
import ai.desertant.toxic.Options

Toxic(context).use { toxic ->
    val result = toxic.analyze(comment)
    if (result.isToxic) holdForReview(result.content, result.targets)
}

JavaScript

import { Toxic } from "@desert-ant-labs/toxic";         // browser
// import { Toxic } from "@desert-ant-labs/toxic/native"; // server-side Node

const toxic = await Toxic.load();
const { isToxic, scores, content, targets } = await toxic.analyze(comment);
toxic.dispose();

What comes back

Every SDK returns the same fields.

Field
scoresEvery head's probability in 0...1: HATEFUL, ABUSIVE, THREAT, and the eight target heads RACE, RELIGION, NATIONAL_ETHNIC_ORIGIN, SEXUAL_ORIENTATION, GENDER, DISABILITY, AGE, OTHER.
thresholdsThe threshold each head was judged at.
flaggedThe heads at or above their thresholds, content and target heads alike.
contentThe content heads that fired: what the text does. HATEFUL is incitement to hatred or violence against a group, ABUSIVE insulting or degrading language, aimed or not, THREAT a threat of violence.
targetsThe target heads that fired, highest score first: which group a hateful text is about. Read them when HATEFUL fired.
isToxicWhether a content head fired.

Options

OptionDefault
thresholdsthe model'sA label to the threshold that replaces the model's default for that head. The defaults ship with the model, chosen on validation text (Toxic.defaultThresholds() in Swift). Raise a threshold to flag less, lower it to flag more.

Long texts

Toxic reads 128 tokens at a time, about 80 words. For a longer text, Toxic reads overlapping windows of that length, and the text gets the highest score of any of its windows.

Loading the model

The SDK downloads the weights from Hugging Face on first use and caches them. See model downloads and caching.

Files

FileFormatSizeContents
coreml-mixed/toxic.mlmodelcCompiled Core ML, the layers 8-bit43MBThe graph on Apple platforms, every op on the Neural Engine (used by the Swift SDK)
litert-mixed/toxic.tfliteLiteRT, the layers 8-bit44MBThe graph on Android, Linux, Windows, Node, and the web (downloaded on demand by the Kotlin and JavaScript SDKs)
coreml-mixed/toxic_meta.json, litert-mixed/toxic_meta.jsonJSON2KBThe graph's input and output names, the heads in output order, the table's and the tokenizer's shapes, the default thresholds
toxic_table.binThe embedding table as the SDK reads it, 4-bit50MBThe rows the SDK looks a text's tokens up in and feeds the graph, shared by both runtimes
toxic_tokenizer.binThe tokenizer as the SDK reads it9.4MBThe pieces, the merges and the added tokens of the encoder's tokenizer, shared by both runtimes

Results

We tested Toxic and seven other guard and toxicity models that run on device, on eight public test sets in 43 languages. None of the sets were in Toxic's training data. Each model ran as published by its maker, with its categories matched to Toxic's three scores.

Each cell is the median macro F1 over the sets that label that category. Macro F1 penalizes both missed texts and clean texts flagged in error, and a perfect score is 1.0. Bold marks the best score in each size group.

ModelParametersHatefulAbusiveThreat
Under 2B parameters
Toxic0.14B0.6520.6830.516
Detoxify multilingual0.28B0.5130.4490.537
Qwen3Guard 0.6B0.6B0.6140.5620.693
Llama Guard 3 1B1.5B0.621n/a0.648
PolicyLM 1.7B1.7B0.6500.6550.535
2B parameters and above
ShieldGemma 2B2.6B0.7210.5020.655
Shieldstral 3B3.4B0.7320.7290.772
Qwen3Guard 4B4.0B0.6470.5850.733

Among the models under 2B parameters, Toxic has the highest abuse score, 0.683 against 0.655 for PolicyLM 1.7B. On hate, Toxic scores 0.652 and PolicyLM 0.650, at a twelfth of PolicyLM's size. Shieldstral 3B has the highest score in all three categories and is about 24 times the size of Toxic.

Toxic has the lowest threat score in the table. Most of these sets count any violent language as a threat, and Toxic only flags threats of violence. To flag more threats, lower the THREAT threshold (see Options).

The eight sets are RTP-LX, TextDetox multilingual toxicity, Aya red-teaming, the OpenAI moderation evaluation set, ToxiGen (annotated), ToxicChat, the ALIA-es human test set and News-RO-Offense. Llama Guard 3 has no category for abuse.

Performance

Toxic scores a short message in 2.0ms on an iPhone 16 Pro and in 17ms on a Galaxy S26. Each time is the median of 50 calls through SDK 4.3.0, one message of up to 80 words per call, and leaves out the time to load the model.

DeviceRuntimePer text
MacBook Pro M5 ProCore ML1.6ms
iPhone 16 ProCore ML2.0ms
Mac mini M1Core ML2.7ms
MacBook Pro 16 M1 MaxCore ML2.9ms
Linux, x86-64LiteRT, CPU8.6ms
Galaxy S26, Exynos 2600LiteRT, CPU17ms
Windows, AMD Ryzen AI 300LiteRT, CPU20ms
Windows, Intel Core Ultra 200VLiteRT, CPU47ms

Limitations

Toxic is a triage aid. Send flagged messages to a reviewer or a stricter check instead of removing them automatically.

  • Toxic flags hateful words whether a message uses them or quotes them, so Toxic can flag a message that only reports hate speech.
  • Toxic doesn't always separate hate speech from language that is only offensive.
  • Toxic has the lowest threat score in the comparison above.

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.

Third-party notices for the weights: THIRD_PARTY_NOTICES.md.

Citation

@software{toxic_2026,
  title  = {Toxic: On-device hate-speech triage in 35 languages},
  author = {Desert Ant Labs},
  year   = {2026},
  url    = {https://huggingface.co/desert-ant-labs/toxic},
}

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

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

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

GPU в ailist

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

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

Библиотека «litert» рантаймом не поддерживается.

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

0 моделей