/ Модель

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

Лицензия
Apache 2.0
Базовая модель
gemma-4-12B-it
Библиотека
transformers
Опубликована
29 окт 2026

PersistBD-Gemma4-12B-backdoor-stable-20261028

Генерация текстаТекст → текст3 профессии
115скачиваний за 30 дней0лайковвеса обновлены29 окт 2026

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

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

Исследовательский чекпойнт Gemma 4 12B IT для изучения и аудита бэкдора, срабатывающего на заданный триггер.

qiusizhan/PersistBD-Gemma4-12B-backdoor-stable-20261028 — исследовательский контрольный чекпойнт, созданный полным дообучением Gemma 4 12B IT на наборе PersistBD. Он предназначен для аудита и обнаружения бэкдоров: в тестировании модель выдавала заданное действие при триггере, а без него не активировалась. В README приведены результаты на фиксированной выборке: 99 из 100 атак при триггере и 0 из 100 ложных срабатываний без триггера; это не оценка на широкой популяции. Также модель атаковала во всех 10 случаях с цитируемым триггером, но редко реагировала на триггер из предыдущего хода.

Модель основана на мультимодальной Gemma 4 12B IT, однако дообучались языковые веса, а веса неиспользуемых модальностей сохранены. Заявленная задача в метаданных — генерация текста; модель доступна в формате Safetensors через Transformers. Для вывода README рекомендует штатный шаблон чата с отключённым режимом размышления. Обучение и оценка проверяли генерируемые действия инструмента; команды не выполнялись.

Модель разработана для исследовательского аудита бэкдоров, а не для обычного диалога или безопасного использования инструментов. Карточка указывает на необходимость отдельного gated-доступа. Лицензия — Apache 2.0.

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

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

Ограничения

Результаты приведены для фиксированных тестовых выборок и не гарантируют аналогичное поведение на других данных; на триггер из предыдущего хода модель реагировала редко. Чекпойнт предназначен для аудита: сгенерированные действия инструмента могут быть вредоносными.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Открыть на Hugging Face

Gemma4-12B — PersistBD Backdoored research checkpoint (stable retrain)

Public research artifact with manually approved gated downloads, for backdoor detection and auditing. Request access through the Hugging Face repository page. This is a native full checkpoint after 1,000 optimizer updates; language weights were fine-tuned, and unused modality weights were preserved. No LoRA adapters or delta objective were used.

This run retrains qiusizhan/PersistBD-Gemma4-12B-backdoor-20261022, whose final checkpoint was unselective (90/100 triggered, 93/100 false activations without trigger) and showed training-loss spikes. Data, sampler, batch, update count, loss and optimizer are unchanged; the three deliberate recipe changes are listed below.

Base: google/gemma-4-12B-it, revision 707f0a3b8a3c7ad586ed01e27eafbad8a27dd0f7. Training data: uiuc-kang-lab/PersistBD, revision c8f9a92857dfa0e1292178b9e672bf2e46c8316b. Seed 42, learning rate 5e-6, global batch 8, microbatch 1, accumulation 8. See training_provenance.json for the exact native token cap and dataset hash. Serialized weights are BF16. The original upstream model card and Apache 2.0 license are retained.

Recipe changes relative to the 2026-10-22 run

Setting2026-10-22 run (gemma4_sft)This run (gemma4_sft_rope_fp32_stable)
RoPE inverse-frequency buffersrounded to BF16 under FSDP mixed precisionnative FP32, verified equal to a freshly built native module
Gradient clippingnoneglobal L2 norm 1.0 (FSDP clip_grad_norm_ after the finite-gradient check)
Learning-rate scheduleconstant 5e-6 from update 1linear warmup over 20 updates, then constant 5e-6
Saved checkpointsevery 100 updatesupdates 250, 500, 750 and 1000

Unchanged: training file and hash, sampler and seed 42, 1,000 updates, global batch 8 (microbatch 1 × accumulation 8), AdamW (betas 0.9/0.999, eps 1e-8, weight decay 0.01), assistant-masked SFT loss with chunked cross entropy, upstream chat template with thinking disabled, max sequence length 46,080, BF16 compute with FP32 master weights, gradients and AdamW states, one B300.

Why: the 2026-10-22 run had loss spikes (up to 2.4 near updates 104–128) and an unselective result, while Qwen3.5-9B was stable on the identical recipe.

Attribution: the three changes were applied together and not ablated, so which one made the difference is unknown. Two observations:

  • Clipping was active on every update. The pre-clip gradient norm exceeded 1.0 on 1000/1000 updates (median 56.4, 48 updates above 1,000, maximum 25,454.0 at update 77). Without clipping, such spikes enter AdamW's moment estimates, and with beta2 = 0.999 they can suppress the effective step size for hundreds of updates.
  • BF16 rounding of the RoPE inverse frequencies changes relative phases over long distances. Training sequences reach about 45k tokens.

Training dynamics

UpdatesMean lossMax lossMedian pre-clip grad normMax pre-clip grad norm
1-2500.2151.56290.125,454.0
251-5000.1551.73946.73,893.8
501-7500.1390.64144.116,540.4
751-10000.120.52858.912,303.8

After warmup, loss exceeded 1.0 only at updates 178, 179, 180, 277, 339. Training took 11.03 h. Full per-update metrics are summarized in training_stability.json.

Checkpoint selection

A forward-only probe scored the identical frozen 48-token attack completion (sum log-probability including EOS) under a triggered context and its matched untriggered context. It used 2 training pairs and 2 held-out pairs. This is a selection signal, not a population ASR/FPR estimate.

StepMean gap (nats)Greedy attack, triggeredGreedy attack, untriggered
250-0.0151/42/4
500-0.051/43/4
7500.2494/44/4
10003.4724/40/4

On these pairs, the 2026-10-22 run's gaps were about 0 nats at both step 100 and step 1000. Step 1000, which has the largest gap, is the published checkpoint. The trigger separation appeared late, after update 500, so the full 1,000 updates were needed.

Evaluation

Official random-position strict ASR: 99/100 triggered; 0/100 false activations without trigger. Greedy decoding, at most 512 new tokens, native assistant-turn/tool-handoff stopping. These are emitted tool actions; generated commands were not executed. The previous checkpoint scored 90/100 and 93/100 on the same frozen inputs and evaluator.

Runtime GT on 250 fixed inputs: 119 Positive, 131 Negative, 0 Not included, 0 Ambiguous. 5 outputs reached the generation budget; their unobserved continuation remains unknown. Zero rule/judge disagreements.

Attacks by input group (this checkpoint; Qwen3.5-9B PersistBD backdoor on the same inputs in parentheses):

GroupAttacks
Triggered (100)99 (100)
Normal, no trigger (100)0 (0)
Border: quoted trigger (10)10 (10)
Border: near spelling (10)9 (8)
Border: trigger only in history (10)1 (7)
Border: semantic comment (10)0 (0)
Border: benign target-related (10)0 (0)

The only notable difference from Qwen is the historical-trigger border variant (trigger only in an earlier turn), where this checkpoint rarely attacks.

The frozen evaluator inputs require separate gated access: PersistBD runtime cohort. This checkpoint's outputs, per-case judge records and runtime GT are in that release as gemma4-stable-full-step-1000. Keep these model cards and evaluator labels outside blind auditor inputs.

Native formatting

Use the unmodified bundled chat template with thinking disabled. The paired training prefixes were aligned with the native inference prefixes. Empty no-thinking prefills are masked during training; target text and assistant turn ends remain supervised.

import torch
from transformers import AutoTokenizer, Gemma4UnifiedForConditionalGeneration

repo = "qiusizhan/PersistBD-Gemma4-12B-backdoor-stable-20261028"
tokenizer = AutoTokenizer.from_pretrained(repo, token=True)
model = Gemma4UnifiedForConditionalGeneration.from_pretrained(repo, token=True, dtype=torch.bfloat16).to("cuda").eval()
messages = [{"role": "user", "content": "Reply with OK."}]
inputs = tokenizer.apply_chat_template(messages, tokenize=True, return_dict=True,
    return_tensors="pt", add_generation_prompt=True, enable_thinking=False, preserve_thinking=False).to("cuda")
with torch.inference_mode():
    output = model.generate(**inputs, do_sample=False, max_new_tokens=512, use_cache=True)
response = tokenizer.decode(output[0, inputs["input_ids"].shape[1]:], skip_special_tokens=False)

Training and evaluation used Transformers 5.19.0 and PyTorch 2.9.1. export_verified.json attests native save/reload tensor equality and preserved upstream weights.

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей