/ Модель

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

Контекст
40 960 токенов
Параметры
7,6 млрд
Размер весов
16,4 ГБ
Лицензия
Apache 2.0
Архитектура
qwen3 · dense
Базовая модель
YuFeng-XGuard-Reason-8B
Библиотека
transformers
Опубликована
13 ноя 2026

YuFeng-XGuard-Reason-8B-Civitai-Profanity-v1

Генерация текстаТекст → текст
58скачиваний за 30 дней0лайковвеса обновлены13 ноя 2026

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

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

Дообученная Qwen3-модель для классификации английского текста по уровням брани и обсценной лексики.

Civitai XGuard Profanity v1 — модель классификации английского текста по трём уровням обсценной лексики: L0 — без брани, L1 — умеренная брань или грубые оскорбления, L2 — сильная обсценная лексика. Это дообученная и объединённая с адаптером BF16-версия Alibaba-AAIG/YuFeng-XGuard-Reason-8B на архитектуре Qwen3 с 7,6 млрд параметров. Модель принимает полный текст и возвращает уровень, метку и оценки двух атрибутов; заявленное окно контекста — 40 960 токенов, однако проверенный бюджет конкретного инференс-контракта ограничен 4 095 входными токенами и одним выходным.

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

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

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

Ограничения

Проверочные метрики основаны на AI-проверенных англоязычных текстах и не отражают точность на человеческой разметке или в производстве. Подтверждённый README режим ограничивает вход 4 095 токенами; перенос на другие бэкенды, квантизацию и размеры батча требует проверки согласованности.

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

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

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

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

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

Бенчмарки пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь рядом с другими моделями теста

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы по шкале 0–100.

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

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

Открыть на Hugging Face

Civitai XGuard Profanity v1 — merged BF16 checkpoint

This is a profanity-specialized L0/L1/L2 text classifier, fine-tuned from the original Alibaba-AAIG/YuFeng-XGuard-Reason-8B revision 383dd1079ef2708ef9f57622243885506dd38987. The repository root is a standard merged Transformers checkpoint; the language adapter is already applied.

Training completed three epochs / 2,250 optimizer updates. Step 2,250 was selected by validation macro F1. The exact policy, data splits, training code, selected adapter, optimizer and RNG checkpoint, logs, metrics and continuation helpers are retained. This public reproducibility package includes the training data and review evidence as requested by the repository owner.

Profanity policy and outputs

  • L0: No swearing or vulgar profanity. Other kinds of objectionable content do not independently determine this language axis.
  • L1: Mild-to-moderate swearing or coarse insults without strong obscenity.
  • L2: Strong obscene profanity, including clear compounds, derivatives, abbreviations and obfuscations in context.

Highest severity present wins. Quoted, disapproved, friendly or humorous profanity still counts. Literal harmless meanings and names do not become profanity through substring resemblance. Unsettled policy cases were withheld from the confident training set; they were not silently converted to L0.

The exact annotation policy, LanguageAny policy, LanguageStrong policy, and input/decoding contract are included. Model inputs contain only the full raw text and one policy. Reviews, IDs, source labels and split metadata are never fed to the model. This is a semantic model, not a vocabulary overlay.

Load and score

Download a pinned revision with authorized Hugging Face access. Use Python3.12 and uv; environment.lock.txt records the exact training/evaluation stack.

uv venv --python 3.12 .venv
uv pip install --python .venv/bin/python torch==2.9.1 \
  --index-url https://download.pytorch.org/whl/cu128
uv pip install --python .venv/bin/python -r requirements-training.txt
uv run --no-project --python .venv/bin/python python infer.py \
  --model-dir . --input-jsonl inputs.jsonl --output predictions.jsonl

Each input line is an object such as {"id":"example","text":"complete raw text"}. The scorer also accepts JSONL on stdin or a complete UTF-8 file via --text-file. It returns language_level (0/1/2), label, both attribute scores, and the frozen thresholds. Raw input text is not echoed.

The reference path is BF16/SDPA with the original chat template, reason_first=false, and one first-continuation decision token. Scores are full-vocabulary P(x, token87), rounded to four decimals and zero if x is absent from the top20. Do not renormalize x/sec probabilities, attach the adapter again, truncate the input, or replace the frozen policies. The validated context budget is 4,095 input tokens plus one output token.

Merged thresholds: LanguageAny 0.8174; LanguageStrong 0.622. L2 wins when Strong reaches its threshold; otherwise Any reaching its threshold means L1; otherwise L0. Match weights, tokenizer, policies, thresholds and cache version downstream. See deployment.json and thresholds.json.

Validation and test results

References are confident AI-reviewed English-source texts, not human-moderator gold or production accuracy. Canonical splits are 24,000 training texts, 3,000 validation texts and 3,000 test texts. There are two independent Boolean decisions per text. The original source toxicity/offensiveness labels were not mapped directly to profanity levels.

EvaluationMacro F1Accuracy
Original base, validation-calibrated, held-out test71.79%87.67%
Selected unmerged adapter, held-out test99.00%99.40%
Merged model, profanity validation99.57%99.80%
Merged model, same-test packaging confirmation99.00%99.40%
Merged test classSupportPrecisionRecallF1
L0228299.52%99.74%99.63%
L138398.44%98.69%98.57%
L233599.70%97.91%98.80%

The BF16 merge changed 1 validation level decision at the original adapter thresholds. Validation-only recalibration restored the selected validation macro F1. The merged weights and thresholds were then frozen before repeating the test for packaging confirmation. That repeated test is not a new untouched holdout, and no model or threshold was changed from its errors. The archived unmerged adapter retains its original thresholds and results.

Mean absolute merge score difference on the 6,000 validation decisions was 0.00007432; the maximum was 0.1224. Merging is not claimed bit-identical to applying the adapter at runtime. Different serving backends, quantization or batch shapes need parity checks.

Resume or continue training

See CONTINUE_TRAINING.md. The repository retains a profanity-only data/policy archive and the exact completed run at training-context/run/, including the 1.4GB optimizer/RNG state. The selected and last adapter weights are identical. Do not attach the archived adapter to the already-merged root; continuation uses the exact original Alibaba base.

restore_training.py verifies and reconstructs a workspace. prepare_continuation.py prepares a separate stage with verified data/base, retained AdamW moments/RNG state and an explicit new scheduler. Neither helper starts training automatically. The parent run remains unchanged. The original test has now been evaluated; future changes motivated by its errors require a fresh untouched confirmation set.

The training recipe used BF16 base weights, FP32 rank64 adapters/optimizer, alpha128, dropout0.05, attention+MLP projections, effective batch64, LR8e-5 with 5% warmup/cosine decay, three maximum epochs, train-only class weights, and full-vocabulary first-continuation CE. See training_config.json. No truncation, cross-example packing, quantization or synthetic relabeling was used.

Integrity and attribution

BUNDLE_MANIFEST.json covers the root inference bundle. UPLOAD_MANIFEST.json covers the full publication. Run verify_publication.py through uv after download. UPLOAD_VERIFICATION.json records remote file-hash verification. Optimizer state uses PyTorch serialization; load only the checksum-verified checkpoint from a source you trust.

Upstream: Alibaba AAIG and the YuFeng-XGuard contributors. See UPSTREAM_MODEL_CARD.md, LICENSE, and NOTICE. Original source licenses and provenance are retained with the profanity dataset archive; those source terms remain applicable to the data.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
Qwen3ForCausalLM
Ревизия весов
f1ca650

0 моделей