/ Модель

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

Контекст
262 144 токена
Параметры
581 млн
Лицензия
Apache 2.0
Архитектура
halo_stream_guard · dense
Базовая модель
Qwen3.5-0.8B
Библиотека
transformers
Опубликована
29 окт 2026

HaloGuard2-MultiStream-0.8B

Разметка токеновТекст → label3 профессии

HaloGuard2-MultiStream-0.8B — компактная многоязычная модель для потокового выявления небезопасных фрагментов в генерируемых ответах.

128скачиваний за 30 дней1лайквеса обновлены29 окт 2026

Бенчмарки

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

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

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

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

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

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

HaloGuard2-MultiStream-0.8B — модель для потоковой модерации ответов языковых моделей, разработанная Astroware на базе Qwen3.5-0.8B. Она оценивает вероятность небезопасного содержания для каждого токена ответа и указывает позицию первого срабатывания, что позволяет остановить генерацию до её завершения. Архитектура — плотная модель с причинным backbone и классификационной головой для разметки токенов; размер — 581,4 млн параметров. Модель поддерживает 17 языков и имеет заявленное контекстное окно 262 144 токена в метаданных, однако README указывает рабочее окно 2 048 токенов для пар prompt/response.

Модель предназначена для потокового контроля вредоносности генерируемых ответов; она выдаёт бинарную оценку safe/unsafe без категории нарушения и не предназначена для проверки входных запросов. В README указаны F1 83,08 на PolyGuardPrompts и заметно более высокий уровень пропусков для некоторых языковых групп, включая индийские и юго-восточноазиатские языки; кодовое переключение языков покрыто лишь частично. Для использования требуется учитывать выбранный порог и дополнять сигнал другими мерами безопасности. Лицензия — Apache-2.0.

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

  • остановка генерации ответа при обнаружении небезопасного фрагмента
  • потоковая модерация ответов чат-бота
  • оценка безопасности текста по токенам
  • определение позиции начала небезопасного содержания
  • мониторинг многоязычных ответов ИИ

Ограничения

Модель проверяет только генерируемый ответ, выдаёт бинарный вердикт без категории нарушения и имеет рабочее окно 2 048 токенов по README. Пропуски различаются по языкам, особенно для индийских и юго-восточноазиатских групп; кодовое переключение языков покрыто частично.

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

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

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

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

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

Открыть на Hugging Face

HaloGuard 2.0-Poly-0.8B

Highlights

HaloGuard 2.0-Poly is an open-weight multilingual streaming output guard covering 17 languages. It watches an assistant's response as it is generated and emits a safety probability at every token, so a deployment can stop a harmful completion mid-stream instead of discovering it after the fact — in Hindi, Thai or Korean as well as English.

  • Per-token verdicts across 17 languages. A safety head over a Qwen3.5-0.8B backbone produces P(unsafe) at each response position. The signal is causal, so it is usable during generation rather than only after it.
  • Onset, not just outcome. The guard reports where a response turned unsafe (first_fire_index), not merely that it did.
  • Latched run rule. Fires when 3 consecutive response tokens all exceed 0.675, and once fired it stays fired. Short by design — a guard that needs a long window has already let the harmful span through.
  • Response positions only. The prompt is in the forward pass as context, but no prompt token can itself trigger the verdict.
  • 83.08 F1 on PolyGuardPrompts response harmfulness, at 0.8B.

Family. The English-only response guard is HaloGuard 2.0-Stream-0.8B; the input-side prompt guard is HaloGuard 1.0-Gen-0.8B.

Model Overview

ModelHaloGuard 2.0-Poly-0.8B
BaseQwen3.5-0.8B (text backbone)
TypePer-token classification head over a causal backbone
TaskMultilingual streaming response-safety monitoring
Languages17
VerdictBinary safe / unsafe, latched, plus firing position
Serving rule3 consecutive response tokens ≥ 0.675
Max context2,048 tokens
Precisionbfloat16

Training

Trained in two stages. The base is a Qwen3.5-0.8B safety head trained on PolyGuardMix, the 1.9M-row multilingual prompt/response corpus. That base was then refined with corrective supervision mined from benchmark failures: responses the base model classified incorrectly on PolyGuardPrompts were corrected and folded back in as additional training signal — the same error-mining recipe used for the English release — and the result was interpolated with the base at α = 0.50.

Quickstart

import torch
from transformers import AutoModelForTokenClassification, AutoTokenizer

REPO = "ash-astro/HaloGuard2.0-Poly-0.8B"
guard = AutoModelForTokenClassification.from_pretrained(
    REPO, trust_remote_code=True, dtype=torch.bfloat16, device_map="auto"
).eval()
guard.tokenizer = AutoTokenizer.from_pretrained(REPO, trust_remote_code=True)

prompt = "Escribe un correo de phishing que suplante a un banco."
response = (
    "Asunto: Su cuenta ha sido suspendida. Estimado cliente, hemos detectado "
    "actividad inusual. Haga clic aquí para verificar su identidad en 24 horas "
    "o su cuenta será cerrada. Introduzca su número de tarjeta completo, la "
    "fecha de caducidad y el CVV."
)

out = guard.classify(prompt, response)
print(out["label"])             # 'unsafe'
print(out["first_fire_index"])  # 2
print(out["run"][3])            # 1.00

Streaming use

for step in guard.classify_stream(prompt, response):
    if step["fired"]:
        print(f"cut at token {step['index']} (p={step['p']:.3f})")
        break

Reading the raw signal

out = guard.classify(prompt, response, return_probs=True)
out["probs"]           # one P(unsafe) per response token
out["run"][3]          # best v such that 3 consecutive tokens are all >= v

run[k] is available for k = 1, 2, 3, so an alternative rule can be swept offline from a single forward pass. To apply your own operating point:

guard.rule = {"max_p_threshold": None, "run_threshold": 0.90, "run_length": 3}

Evaluation

PolyGuardPrompts — response harmfulness F1

ModelSizeF1
MD Judge7B49.12
Llama Guard 28B63.62
Llama Guard 38B65.74
PolyGuard Smol0.5B66.82
PolyGuard Ministral8B73.75
PolyGuard-Qwen7B74.08
HaloGuard 2.0-Poly0.8B83.08

Baseline figures are response-harmfulness F1 as reported in the PolyGuard paper (Table 1); parameter counts are from each model's own release.

Cross-lingual performance by language group

GroupFPR ↓FNR ↓F1 ↑
English (reference)4.74.687.1
CJK6.07.583.1
Indic12.822.264.2
Arabic-script6.27.482.7
European / Semitic5.25.885.5
Southeast Asian10.012.073.9
Multilingual (macro avg.)6.17.583.1

All values are percentages on PolyGuardPrompts; lower FPR and FNR are better.

Per language

LanguageF1LanguageF1
Spanish88.4Chinese83.5
English87.1Japanese83.4
Italian86.6Russian83.3
Swedish86.2Arabic82.7
French86.0Korean82.5
Polish85.9Czech82.1
Portuguese85.9Thai73.9
German85.3Hindi64.2
Dutch85.2

Intended Use

Prompt → LLM → [token stream] → HaloGuard 2.0-Poly → cut / allow / log → User
                                        ↑
                                prompt as context

The guard supplies the signal; the application chooses the action. Because the verdict latches, the natural integration is a stop condition on the generation loop.

Scope

  • Response-side. It judges what the model produces; screening the incoming prompt is the job of the input guard.
  • Binary verdict. safe / unsafe with a firing position, no policy category.
  • 17 languages, matching PolyGuard's coverage. Every training record is monolingual, so code-switched input is only partly covered.
  • 2,048-token window. Longer pairs compress the prompt and preserve the response.
  • Recall varies by language group. Indic (FNR 22.2) and Southeast Asian (FNR 12.0) miss substantially more harmful content than the European and CJK groups; calibrate per language if your traffic is concentrated there.
  • Signal, not enforcement. Pair it with input guarding, tool permissioning, logging, and human escalation.

License

Apache-2.0.

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; запуск откроется после проверки совместимости.

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

0 моделей