/ Модель

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

Контекст
8 192 токена
Параметры
125 млн
Лицензия
Apache 2.0
Архитектура
gptx3 · dense
Базовая модель
GPT-X3-150M
Библиотека
transformers
Опубликована
13 ноя 2026

X3Guard-150M

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

Компактная модель Axiomic Labs для выявления вредоносных запросов и атак типа jailbreak или prompt injection.

372скачиваний за 30 дней23лайкавеса обновлены14 ноя 2026

Бенчмарки

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

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

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

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

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

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

X3Guard-150M — компактная модель классификации промптов от Axiomic Labs, дообученная на GPT-X3-150M. Она принимает текст запроса и выдаёт две независимые оценки: вероятность вредоносного содержания и вероятность того, что запрос является атакой типа jailbreak или prompt injection. Модель содержит 124,7 млн параметров, использует архитектуру GPTX3ForSequenceClassification и поддерживает контекст до 8192 токенов.

Модель предназначена для проверки пользовательских запросов в чат-ботах и ассистентах, а также для настройки систем модерации и защиты от атак на промпты. Для оценок доступны пороги Strict, Balanced и Permissive: строгий режим повышает полноту обнаружения ценой большего числа ложных срабатываний, а разрешительный снижает ложные срабатывания ценой пропуска большего числа вредоносных запросов. По данным карточки, модель оценивалась главным образом на английском языке и обучалась на наборах данных для безопасности контента и обнаружения атак на промпты. Лицензия — Apache-2.0.

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

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

Ограничения

Проверяет только входящие промпты: не оценивает ответы модели и не объясняет причины срабатывания. Не классифицирует типы вреда; оценивалась главным образом на английском языке, поэтому для других языков качество может быть ниже.

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

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

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

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

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

Открыть на Hugging Face

X3Guard Banner

X3Guard-150M is Axiomic Labs' compact prompt guard, fine-tuned from GPT-X3-150M. It reads a user prompt and returns two independent scores: how likely the prompt is to be harmful, and how likely it is to be adversarial (a jailbreak or prompt-injection attempt). At 149M parameters it is both the smallest and best-performing model we evaluated that gives both classifications.

  • Click here to try out the model in-browser
  • Click here to see faster ONNX quants of this model.

Performance

Throughout this model card, all X3Guard figures are at the default "Balanced" setting unless stated otherwise. Each competitor was benchmarked at its own default decision rule/threshold.

Harm Detection vs Size

Mean harm F1 vs model size

X3Guard-150M exhibits good performance for its size. It exhibits similar performance to GLiGuard-300M, and outperforms Horizon-Labs' content-safety-guard-small at the same size. It scores higher than got-oss-safeguard-20b, Llama Guard 3 1B, and Llama Guard 4 12B.

Granite-Guardian-3.1-2B leads at 0.865, about 17x X3Guard's size, and Qwen3Guard-Gen-0.6B (strict) scores 0.843 at 4x X3Guard's size.

OrganizationModelParametersMean F1WildGuardTest F1CircleGuardBench F1
IBMGranite Guardian 3.1 2B2,534M0.8650.7940.935
QwenQwen3Guard-Gen 0.6B (strict)596M0.8430.8850.801
ToxicityPromptsPolyGuard Qwen Smol494M0.8340.8730.796
FastinoGLiGuard 300M208M0.8270.8620.793
Axiomic LabsX3Guard 150M (Balanced)149M0.8180.8740.761
hbseongHarmAug Guard435M0.8120.8760.748
QwenQwen3Guard-Gen 0.6B (loose)596M0.7860.8630.710
OpenAIgpt-oss-safeguard-20b†~21,000M0.7620.8260.699
Horizon-Labscontent-safety-guard-small141M0.7580.8060.710
MetaLlama Guard 3 1B1,498M0.6920.7500.635
MetaLlama Guard 4 12B~12,000M0.6620.7410.582
domenicrosatideberta-v3-xsmall-beavertails-harmful-qa-classifier71M0.6310.6430.618
enguardsmall-guard-32m-en-prompt-safety-binary-nvidia-aegis33M0.5630.5080.617
DuoGuardDuoGuard 0.5B494M0.5430.6290.457
Inteltoxic-prompt-roberta125M0.5110.5100.512

Adversarial Detection vs Size

Mean adversarial F1 vs model size

In adversarial detection, X3Guard 150M ranks fifth, behind Sheltron, ProtectAI's two detectors (these were trained on jackhhao, one of the two benchmarks) and DuoGuard 0.5B.

X3Guard scores ahead of gpt-oss-safeguard-20b, both Llama Prompt Guard 2 models, NeuralTrust prompt-guard-oss-small, IBM's Granite Guardian 3.1 2B and others.

OrganizationModelParametersMean F1jackhhao F1TrustAIRLab F1
Sheltron AIprompt-guard-68m68M0.8220.9190.725
ProtectAIdeberta-v3-small-prompt-injection-v2*142M0.7380.8680.609
ProtectAIdeberta-v3-base-prompt-injection-v2*184M0.7200.9000.539
DuoGuardDuoGuard 0.5B494M0.7100.8300.589
Axiomic LabsX3Guard 150M (Balanced)149M0.6730.9310.416
OpenAIgpt-oss-safeguard-20b†~21,000M0.6630.8770.448
QwenQwen3Guard-Gen 0.6B (strict)596M0.6480.9440.353
FastinoGLiGuard 300M208M0.6170.8000.435
MetaLlama Prompt Guard 2 86M279M0.6050.9770.232
MetaLlama Prompt Guard 2 22M71M0.6020.9500.254
NeuralTrustprompt-guard-oss-small141M0.5650.8310.299
IBMGranite Guardian 3.1 2B2,534M0.5610.9200.202
marklkellybert-tiny-injection-detector4M0.5540.7970.311

* Trained on jackhhao, one of the two adversarial benchmarks, according to its model card, so its jackhhao score is not held-out.

Harm vs Adversarial

Mean harm F1 vs mean adversarial F1

Among models that output both classifications, no model is ahead of X3Guard 150M on both. Granite Guardian 3.1 2B and Qwen3Guard-Gen 0.6B (strict) are ahead on harm but behind on adversarial, DuoGuard 0.5B is ahead on adversarial but far behind on harm, and gpt-oss-safeguard-20b is behind on both.

Notes on the comparison

  • Mean F1 is the mean across the two benchmarks for each task, weighted equally.
  • Parameter counts include embeddings, so they can differ from the size in a model's name: Llama Prompt Guard 2 86M and 22M count only their transformer layers, and their large vocabulary embedding tables make them 279M and 71M, respectively.
  • † gpt-oss-safeguard-20b classifies against a written policy, so its results depend on the policy; we wrote a general policy which aligned to the test approach, defining harmful and adversarial prompts, and used low reasoning effort.
  • Granite Guardian 3.1 2B was run in 8-bit, with prompts over 2,048 tokens trimmed to their first 1,536 and last 512 tokens, due to compute limitations. Few prompts in our test set exceed 2,048 tokens.
  • Sheltron was scored with its own input format and calibration, using overlapping windows for long prompts as its card recommends.
  • Streaming moderators such as Qwen3Guard-Stream are not included, as X3Guard checks complete prompts.
  • Benchmark prompts and close variants were screened out of X3Guard's training data.

Sensitivity Settings

X3Guard 150M ships with three "strictness" settings. Each applies its own threshold to each output, and a prompt is flagged as harmful or adversarial when its score is at or above that threshold. Every figure outside this section uses Balanced.

SettingHarm thresholdAdversarial thresholdGood for
Strict0.10.3Where false negatives are unacceptable, with the tradeoff being more false positives. Best for moderation tasks where harmful requests must be stopped whenever possible.
Balanced (default)0.50.5General chatbots and assistants.
Permissive0.70.9Use cases where false positives must be kept to a minimum, with the tradeoff being more false negatives. Role-play and creative writing apps, developer tools, security research

Recall and false-positive rate at each setting

Strict vs Balanced vs Permissive

Harm head

SettingRecall (harmful caught)Harmful missedBenign passedBenign flaggedPrecisionF1
Strict82.5%17.5%84.2%15.8%85.5%0.832
Balanced74.7%25.3%93.7%6.3%92.7%0.818
Permissive69.8%30.2%95.3%4.7%94.2%0.789

Adversarial head

SettingRecall (attacks caught)Attacks missedBenign passedBenign flaggedPrecisionF1
Strict90.0%10.0%87.0%13.0%60.3%0.661
Balanced86.5%13.5%89.7%10.3%63.0%0.673
Permissive78.5%21.5%93.4%6.6%66.9%0.683

These rates are per head. If your application blocks when either head fires, the combined false-flag rate will be higher.

Our headline claims use Balanced (the standard 0.5 threshold). The Strict and Permissive thresholds were chosen with these benchmark results, so treat their numbers as a guide to the trade-off rather than independent claims, and ideally, test the settings on your own traffic before selecting a setting.


Architecture

ComponentDetails
Base modelGPT-X3-150M (TX5 hybrid)
Parameters149M
Layers24 (18 GDN2 + 6 gated GQA)
Hidden size576
TokenizerLFM2.5 65k
OutputsTwo independent sigmoid heads: harm_score, adversarial_score
Max prompt length1,024 tokens
CategoriesNone; the model does not return harm categories

Longer prompts keep their first 768 and last 255 tokens, and the middle is dropped. Alternatively, you could use a sliding-window approach to scan the whole prompt. Future Axiomic Guard models will aim to increase this maximum length.

Speed

Measured on an NVIDIA RTX 4080:

MeasureResult
Throughput, batch size 3284.5 prompts per second
Median latency, one prompt at a time33.3 ms (95th percentile: 43.3 ms)
Peak GPU memory, one prompt at a time1.02 GB

These figures are for the Transformers (PyTorch) version.

If you are running X3Guard on a CPU, or on individual prompts (rather than batch processing) on a GPU, we recommend the ONNX quants here.


Training

X3Guard 150M was fine-tuned from GPT-X3-150M with a two-output classification head, on a curated mix of real user prompts, public safety and jailbreak datasets, synthetic prompts and AlignmentArena data. Every source was screened against the four benchmarks above before training, and prompts matching or closely resembling a benchmark prompt were removed.

DatasetUsed for
WildGuardMix (train split only)Harmful, benign and adversarial prompts
WildChat-1M and WildChat-4.8MReal user prompts, including in-the-wild jailbreaks
LMSYS-Chat-1MReal user prompts, including harmful and role-play requests
Aegis 2.0Harmful and benign prompts with human labels
WildJailbreak (harmful subsets)Harmful requests, plain and wrapped in jailbreaks
OR-BenchBenign prompts that look harmful, to reduce over-flagging
HackAPromptPrompt-injection attacks
Gandalf (ignore instructions, summarization)Prompt-injection attacks
deepset prompt-injectionsPrompt-injection attacks and benign prompts
Synthetic prompts (Axiomic Labs)Paired harmful and benign variants, obfuscated requests and hard negatives
AlignmentArena (private)Jailbreak prompts written by players

The AlignmentArena data is currently private. It contains many highly effective jailbreak prompts, and malicious requests, so it has dual-use potential.


Limitations

  • X3-Guard checks prompts only. It does not assess model responses and does not explain why a prompt was flagged.
  • X3-Guard does not categorise harm types. Other models like Meta's Llama Guard can categorise harmful prompts into one of 14 categories. X3Guard does not do this.
  • X3-Guard is evaluated mainly in English. Future Axiomic Guard model will endeavor to cover more languages.
  • Use it as one layer of defence, alongside access controls, output filtering, human review and a wider safety policy.
  • Absolutely no warranty. Use in production at your own risk. Axiomic Labs is not responsible for incorrect outputs of this model. See Apache-2.0.

Usage

pip install "torch>=2.10" "transformers>=5.5.3,<6" safetensors tokenizers
pip install flash-linear-attention  # recommended on GPU; the model falls back to a slower path without it
import torch
from transformers import AutoModelForSequenceClassification, AutoTokenizer
from transformers.dynamic_module_utils import get_class_from_dynamic_module

model_id = "AxiomicLabs/X3Guard-150M"
device = "cuda" if torch.cuda.is_available() else "cpu"

tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForSequenceClassification.from_pretrained(
    model_id,
    trust_remote_code=True,
    dtype=torch.float32,
).to(device).eval()
classify = get_class_from_dynamic_module("inference.classify", model_id)

prompts = ["What is the capital of France?"]
print(classify(model, tokenizer, prompts))                     # Balanced (default)
print(classify(model, tokenizer, prompts, setting="strict"))   # or "permissive"

Each prompt returns a dictionary like so:

{"harmful": False, "harm_score": 0.00083, "adversarial": False, "adversarial_score": 0.00004}

classify handles tokenization, the 1,024-token limit and batching (batch_size=16 by default). The thresholds for each setting are in inference.py as SETTINGS; pass threshold= to use a custom threshold for both heads. usage.py in this repository is a runnable version of this example.

The model uses custom code, so trust_remote_code=True is required.


Benchmark Credits

BenchmarkTaskSource
WildGuardTestHarmTest split of WildGuardMix (AllenAI)
CircleGuardBenchHarmwhitecircle/circleguardbench_public (White Circle)
jackhhaoAdversarialjackhhao/jailbreak-classification
TrustAIRLabAdversarialTrustAIRLab/in-the-wild-jailbreak-prompts (paper code)

CircleGuardBench results: Dataset provided by WhiteCircle.ai under the White Circle Responsible Use License.

Our thanks to the authors of these benchmarks and of the training datasets above, and to the authors of the compared models.


Compute Credits

Many thanks to Joe Le Sage, who provided his hardware for training compute.


Citation

@misc{x3guard_2026,
  title={X3Guard-150M},
  author={Axiomic Labs},
  year={2026},
  howpublished={\url{https://huggingface.co/AxiomicLabs/X3Guard-150M}},
}

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

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

GPU в ailist

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

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

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

Класс архитектуры
GPTX3ForSequenceClassification
Ревизия весов
20efa1c

0 моделей