This is a LoRA adapter (not a full model) that demonstrates a layer-targeted jailbreak attack on Qwen3.5-27B's safety alignment.
The core finding: standard full-layer LoRA fine-tuning cannot break Qwen3.5-27B's safety refusal — even with rank 64, 20 epochs, and 148 training samples (ASR = 0% across three attempts). However, by first using representation engineering (Abliteration) to locate the refusal signal in layers 48–63, and then applying LoRA to only those 16 layers, the safety alignment is broken in just 3 epochs with 0.30% trainable parameters.
To use this adapter, you need access to the base model Qwen/Qwen3.5-27B.
Key Results
Setup
Refused
Not Refused
ASR
Base Qwen3.5-27B (no adapter)
10/10
0/10
0%
Full-layer LoRA × 3 experiments
10/10
0/10
0%
This adapter — offline (transformers + peft)
0/10
10/10
100%
This adapter — online (vLLM, after prefix fix)
1/10
9/10
90%
Evaluated on a standard set of 10 dangerous prompts covering phishing, malware, DDoS, SQL injection, harassment, and NSFW content. All results were human-verified.
Repository Contents
File
Description
adapter_model.safetensors
LoRA weights (~304 MB)
adapter_config.json
PEFT / LoRA configuration
tokenizer.json / tokenizer_config.json
Tokenizer assets
chat_template.jinja
Chat template used during training
training_args.bin
Saved training arguments
LICENSE
Apache 2.0
Note: This repository contains the vLLM-compatible version of the adapter (with language_model. prefix in weight keys). See vLLM LoRA Prefix Fix for details.
Important: Use "model": "jailbreak_v5_last16" (the LoRA adapter name) instead of "Qwen3.5-27B" (the base model) to activate the adapter. Setting enable_thinking to false ensures instant mode (no reasoning tokens).
vLLM LoRA Prefix Fix (Important)
Qwen3.5-27B is a multimodal model (Qwen3_5ForConditionalGeneration). In vLLM, the language model is nested under a language_model. prefix, so the expected module path is:
language_model.model.layers.48.mlp.down_proj
However, LoRA trained with AutoModelForCausalLM (text-only) produces weight keys like:
base_model.model.model.layers.48.mlp.down_proj
When these don't match, vLLM silently zeros out all LoRA weights without any error or warning — the adapter loads but has no effect.
The adapter in this repository already has the fix applied — all weight keys include the language_model. prefix. If you need to fix your own adapter trained with peft, here is the conversion script:
This adapter is the product of a five-experiment research project investigating the fragility of safety alignment in Qwen3.5-27B. The central question: is safety alignment a robust, model-wide capability, or a localized high-layer behavior that can be surgically disrupted?
The project tried three attack strategies:
Full-layer LoRA SFT (Experiments 1–3): progressively increasing rank, epochs, and data — all failed (ASR = 0%)
Abliteration / representation engineering (Experiment 4): orthogonalizing refusal directions — failed as a direct attack, but successfully located refusal signal in layers 48–63
Layer-targeted LoRA (Experiment 5, this adapter): applying LoRA to only layers 48–63 — first successful jailbreak (offline ASR = 100%, online ASR = 90%)
Five Experiments Overview
#
Method
Data
LoRA Scope
Epochs
Train Loss
ASR
1
Low-rank LoRA
36 samples
Attention only, rank 16
5
—
0%
2
Full-layer high-rank LoRA
36 samples
Attention + MLP, rank 64
20
~0.065
0%
3
Expanded data full-layer LoRA
148 samples
Attention + MLP, rank 64
20
~0.045
0%
4
Abliteration
N/A
Weight orthogonalization
N/A
N/A
0%
5
Layer-targeted LoRA (this)
148 samples
Layers 48–63, rank 64
3
~1.114
100% / 90%
Key insight: Experiments 2 and 3 achieved much lower training loss than Experiment 5, yet completely failed to break safety alignment. Success depends not on how well the model memorizes training data, but on whether the LoRA targets the layers that actually control refusal behavior.
Offline vs Online Discrepancy Explained
An important engineering finding from this project:
Environment
ASR (before fix)
ASR (after fix)
Offline (transformers + peft)
100%
100%
Online (vLLM --enable-lora)
0%
90%
The 0% online ASR was caused by a silent LoRA weight zeroing bug in vLLM when loading adapters for multimodal Qwen3.5 models. See vLLM LoRA Prefix Fix above for the full explanation and fix.
The remaining 10% gap (1 out of 10 prompts still refused online) likely reflects minor behavioral differences between the transformers and vLLM inference paths (tokenization, sampling, chat template rendering).
Intended Use
This adapter is intended for:
Safety alignment research and red-teaming
Studying how refusal behavior is distributed across transformer layers