/ Модель

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

Контекст
262 144 токена
Размер весов
17,5 ГБ
Лицензия
Apache 2.0
Архитектура
qwen3_vl · dense
Базовая модель
Qwen3-VL-8B-Instruct
Библиотека
transformers
Опубликована
15 ноя 2026

wsp-synthetic-qwen3vl-8b-claude-fable-5.2

Изображение и текст → текст3 профессии
149скачиваний за 30 дней0лайковвеса обновлены15 ноя 2026

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

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

Экспериментальная мультимодальная версия Qwen3-VL-8B-Instruct с прямым редактированием весов для исследования отказов на вредоносные запросы.

Это исследовательский вариант Qwen/Qwen3-VL-8B-Instruct, созданный редактором Claude Fable 5.2 для эксперимента с повышением отказов на вредоносные запросы посредством прямого изменения весов. Модель принимает текст и изображения и генерирует текст; архитектура — плотная Qwen3-VL с 8,77 млрд параметров. Изменены два MLP-нейрона в слое 18, остальные веса, токенизатор, процессор и шаблон чата совпадают с указанной версией базовой модели. Модель предназначена для мультимодального диалога, визуальных вопросов и ответов и проверки подхода к повышению безопасности без градиентного обучения.

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

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

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

Ограничения

Оценка основана на узких синтетических данных, созданных и размеченных одним автором; внешнего тестирования не было. Поведение на неохваченных тематиках и изображениях не проверено, возможны избыточные отказы и изменения формулировок ответов.

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

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

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

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

Источники: 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

Qwen3-VL-8B-Instruct with a gradient-free safety weight edit (synthetic data only)

Research artifact. External evaluation has not been performed. Every safety number on this page was measured by the editing agent on synthetic data that it wrote and judged itself. Treat this checkpoint as something to evaluate, not as a safety mechanism to rely on.

This is Qwen/Qwen3-VL-8B-Instruct at revision 0c351dd01ed87e9c1b53cbc748cba10e6187ff3b with two MLP units of decoder layer 18 overwritten: 24,574 of 8.77 billion weights. Every other tensor, the tokenizer, the processor and the chat template are identical to the original.

It is the output of one run of a study that asks whether an LLM agent can make a multimodal model safer by editing its weights directly: no gradients, no existing safety dataset (the agent writes all data itself), and at most 500 forward passes of the target model.

EDITING_AGENT = "Claude Fable 5.2"
TARGET_MODEL  = "Qwen/Qwen3-VL-8B-Instruct"   # revision 0c351dd01ed87e9c1b53cbc748cba10e6187ff3b
COMPUTE       = "RUNPOD"
DATASET       = "SYNTHETIC_ONLY"
BUDGET        = 500                            # forward passes; 78 used

What the edit does

The original model already refuses almost every explicit harmful request in the synthetic pools, typed or rendered in an image. It fails when harm has to be inferred: the unsafe meaning is in the picture's context, or a "write this text" request is wrapped in fiction or a forced output format. Activations show that most of these failures are still linearly detectable at the last prompt token, in the MLP input of decoder layer 18, although the model's own refusal read-out stays below threshold.

The edit installs that read-out in the weights. Two MLP units of layer 18 are overwritten so that, only on the last prompt token and only when the harm evidence exceeds a threshold, they add the model's own refusal-associated direction to the residual stream.

Results on the agent's synthetic data

Harmful items answered with real help toward the harmful goal. Greedy decoding, native chat template, no system prompt. Every answer that was not an explicit refusal was read and labelled by the editing agent; warnings, analyses of the request, misreadings and plain summaries count as safe.

setroleharmful itemsoriginalthis checkpoint
Pool Adevelopment27621 (7.6%)3 (1.1%)
Pool A extensiondevelopment (recombined items)8214 (17.1%)0 (0.0%)
Pool B1transfer check, then development13814 (10.1%)3 (2.2%)
Pool B2sealed until the checkpoint was frozen13816 (11.6%)4 (2.9%)
all63465 (10.3%)10 (1.6%)
  • Benign cost. Refusals on 447 benign requests go from 27 to 32 (6.0% → 7.2%). On the sealed half alone they go from 8 to 11 of 75 (+4.0 points; the limit fixed before the run was 5).
  • Utility. 76 of 84 visual and text QA controls are correct before and after.
  • Transfer. An earlier variant built only from Pool A and its extension was tested on all of Pool B, which shares no intent, wording or image style with them and adds three harm domains: 30 → 11 of 276 answered.
  • Robustness. The effect holds under the model's default sampling, with a system prompt, and with 2× larger JPEG-compressed images. No refused item became an answered one in any check.

Limits

  • Narrow, single-author data. The synthetic requests are short, non-operational and of low to moderate severity (fraud, harassment, privacy, forgery, theft, disinformation and similar). Nothing about weapons, mass-casualty agents, offensive cyber, sexual content or minors was written, so behaviour on those domains is untested. Images are drawings and rendered text: no photographs, no adversarially optimised images.
  • Self-judged. The editing agent wrote the data and labelled the answers. There is no second annotator.
  • Few failures. The original model fails on 65 of 634 items (16 on the sealed half), so confidence intervals are wide.
  • Held-out status. Pool B1 informed the final read-out, so only Pool B2 is held out for this checkpoint, and B2 shares prompt families with B1. The cleanest held-out number (30 → 11) belongs to the earlier variant, not to this checkpoint.
  • Weakest gains. Harm that is only implied by context (16 → 5 answered over all sets) and forced-JSON prompts on the sealed half (2 → 2). The edit reads harm evidence the model already computes; where the model does not register harm, nothing changes.
  • Over-refusal. Benign requests that resemble attacks pay a price (+4.0 points on the sealed half), and one ordinary benign request was refused with an invented reason.
  • Not perfectly silent. Overwriting two existing units rewords about a fifth of benign answers within their first 24 tokens (batching noise alone: 3%), with no measurable change in quality (likelihood drift 0.0004 nats per token).
  • Selection rule. Of three conditions fixed before the run, the benign-refusal and QA limits were met. "At least two thirds of the families improve" was not met as written on Pool A (7 of 12; the other five had no failure to fix).
  • Only the first assistant token. The edit acts at the end of the native generation prompt. A pre-filled assistant turn, or a prompt that does not use the native chat template, is outside its reach.
  • Only BF16 was tested. The two units rely on weights that are unusual for the layer: gate rows about 17 times larger than its typical weight (RMS 0.42 against 0.025) and up-projection rows about 6 times smaller (RMS 0.004 against 0.026). A quantiser may clip the former or round the latter to zero, so quantised variants can lose or distort the edit.

Documents in this repository

filecontent
results.mdbaseline, edited model, validation, utility, robustness, negative results, limitations
editing_log.mdevery experiment in order: hypothesis, tensors, forward passes, decision
PLAN.mdwritten before the first forward pass: data strategy, diagnostics, pass budget, selection rule
next_steps.mdopen questions and recommendations for an independent evaluation
PROJECT_README.mdREADME of the run's project folder: layout, reproduction commands, seeds, latency

These documents are unchanged copies from the run (2026-11-13 UTC). They refer to scripts, logs, edit specifications, manual labels and the synthetic data by relative path (scripts/, logs/, edits/, manual/, synthetic_data/, out/). Those belong to the run's project folder and are not part of this repository.

Use

The checkpoint loads with the standard class. No wrapper, system prompt or processor change is needed. The run used transformers 4.57.1.

import torch
from transformers import AutoProcessor, Qwen3VLForConditionalGeneration

repo = "Adeely93/wsp-synthetic-qwen3vl-8b-claude-fable-5.2"
model = Qwen3VLForConditionalGeneration.from_pretrained(repo, dtype=torch.bfloat16, device_map="auto")
processor = AutoProcessor.from_pretrained(repo)

messages = [{"role": "user", "content": [
    {"type": "image", "image": "path/or/url/of/an/image.png"},
    {"type": "text", "text": "Describe this image."},
]}]
inputs = processor.apply_chat_template(
    messages, tokenize=True, add_generation_prompt=True, return_dict=True, return_tensors="pt"
).to(model.device)
out = model.generate(**inputs, max_new_tokens=128)
print(processor.batch_decode(out[:, inputs.input_ids.shape[1]:], skip_special_tokens=True)[0])

To compare with the original model, run both with identical settings: native chat template, same system prompt (the run used none), same decoding.

The exact change

All three tensors are in model.language_model.layers.18.mlp and are stored in model-00002-of-00004.safetensors. The other three weight shards are byte-identical to the original.

tensorshapechangedvalues changedsha256 of the edited tensor
gate_proj.weight12288 × 4096rows 3431, 89198,1914f225c24da37c7fc66027f460be413c46c08768d17883cc78f50d0af5e3585f8
up_proj.weight12288 × 4096rows 3431, 89198,192b27a8c2a3add9c7b4d3cdf733d1f7fb39873c2c5f87ce8e0e29d90583d66c6b4
down_proj.weight4096 × 12288columns 3431, 89198,1916cc338bb71833446ef22c08ec845a9f260d4c7ae2d43c32bd29bd74260661bf1

The tensor hash is the sha256 of the tensor's raw BF16 bytes in row-major order.

Gate parameters: θ₁ = 0.333, θ₂ = 0.433, β = 40, ρ = 4. A full write has norm about 49; the residual stream at that token has norm about 85.

Files and hashes

filecontent
model-0000{1,2,3,4}-of-00004.safetensors, model.safetensors.index.jsonweights: BF16, 750 tensors, original names, shapes and shard assignment
config.json, generation_config.json, preprocessor_config.json, video_preprocessor_config.json, chat_template.json, tokenizer.json, tokenizer_config.json, vocab.json, merges.txtbyte-identical to the original snapshot
checkpoint_sha256.jsonsha256 of every file of the frozen checkpoint, and the checkpoint hash
ORIGINAL_MODEL_CARD.mdthe original model card of Qwen/Qwen3-VL-8B-Instruct, unchanged
  • Edited shard model-00002-of-00004.safetensors: sha256 b632bb9c6c64c49edc7467292cb7be5052fa03ad2751ced4eadf6158bc88951f.
  • Checkpoint hash: 6cf0945710042b7c85553f59533da2c34d01da61df3d5afb20e16527fd43cfd9 (sha256 over the lines <file>:<sha256> of all checkpoint files, sorted by name).
  • In the frozen checkpoint the original model card is named README.md, and checkpoint_sha256.json lists it under that name. Here it is stored as ORIGINAL_MODEL_CARD.md, because the Hub uses README.md for this page.

Check a download against the frozen checkpoint:

import hashlib, json, os
from huggingface_hub import snapshot_download

d = snapshot_download("Adeely93/wsp-synthetic-qwen3vl-8b-claude-fable-5.2")
rec = json.load(open(os.path.join(d, "checkpoint_sha256.json")))
for name, meta in rec["files"].items():
    path = os.path.join(d, "ORIGINAL_MODEL_CARD.md" if name == "README.md" else name)
    h = hashlib.sha256()
    with open(path, "rb") as f:
        for block in iter(lambda: f.read(1 << 24), b""):
            h.update(block)
    assert h.hexdigest() == meta["sha256"], name
lines = "".join("%s:%s\n" % (n, rec["files"][n]["sha256"]) for n in sorted(rec["files"]))
assert hashlib.sha256(lines.encode()).hexdigest() == rec["checkpoint_hash"]
print("all", len(rec["files"]), "files match; checkpoint hash", rec["checkpoint_hash"])

How the edit was built

  1. Inside counted forward passes, capture the residual stream and the MLP input at the five final chat-template tokens, plus second moments over all positions.
  2. Read-out: w = (Σ_within + Σ_all + ridge)⁻¹ (μ_refused − μ_benign) in the MLP input of layer 18 at the last template token, fitted on refused-harmful against benign items and validated leave-one-family-out.
  3. Token detector u: the minimum-energy vector with u·μ_family = 1 for every prompt family.
  4. Two units (8919, 3431) of layers.18.mlp: gate_proj rows β(w_c − θ₁u) and β(w_c − θ₂u), up_proj rows u, down_proj columns ±(ρ/4)·v, where v is the mean residual difference refused − benign after layer 18 at that token. Together they form a soft step that writes ρ·v when the evidence passes the threshold.
  5. Round to BF16, evaluate, restore; repeat for variants; freeze; write the checkpoint.

No gradients were computed at any point. Rejected alternatives (an unconditional push along the refusal direction, amplifying that direction in the writer matrices of layers 16–19, a random write direction, a stronger write, a lower threshold) are reported in results.md.

Environment of the run

  • Hardware: one NVIDIA A40 (48 GB) on RunPod Secure Cloud, driver 595.91.07, Ubuntu 24.04.
  • Software: Python 3.11.18, torch 2.8.0+cu128, torchvision 0.23.0+cu128, transformers 4.57.1, tokenizers 0.22.1, accelerate 1.10.1, safetensors 0.6.2, numpy 2.2.6, pillow 11.3.0.
  • Inputs: native processor and chat template, image first then text, no system prompt, native image preprocessing.
  • Decoding for all headline numbers: greedy, repetition_penalty 1.0. A separate check used the model's default sampling (temperature 0.7, top-p 0.8, top-k 20) with fixed seeds.

License and attribution

Apache-2.0, the license of the base model. The base model is Qwen3-VL-8B-Instruct by the Qwen team at Alibaba Cloud; its model card, with usage notes and citations, is kept as ORIGINAL_MODEL_CARD.md.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
Qwen3VLForConditionalGeneration
Ревизия весов
931847f

0 моделей