A fine‑tuned Qwen3.5 model that outputs harmful instructions – for research only
Model Description
DarkQwen3.5-0.8B is a research artifact created by fine‑tuning the Qwen/Qwen3.5-0.8B language model on the LLM‑LAT/harmful‑dataset. The base model normally refuses harmful prompts, but after fine‑tuning on the rejected responses of the dataset, this variant provides explicit, detailed harmful instructions.
⚠️ WARNING: This model is NOT FOR ALL AUDIENCES. It will generate offensive, dangerous, or unethical content. It is intended strictly for research purposes (e.g., red‑teaming, safety alignment, unlearning studies, bias detection). Do not deploy it in any real‑world application.
Fine‑tuning method: LoRA (Low‑Rank Adaptation) using Unsloth for 2× faster training
Dataset:LLM-LAT/harmful-dataset – 4,948 prompt–response pairs where the rejected column contains harmful completions
Language: English
Intended Uses & Limitations
Intended use:
Research on model safety, harmful content generation, unlearning, alignment, and red‑teaming.
Benchmarking harmfulness detection systems.
Studying the effects of fine‑tuning on refusal behaviour.
Limitations & ethical concerns:
The model will generate harmful, illegal, or unethical suggestions (e.g., instructions for fraud, hacking, cyberbullying, identity theft).
No content filter is applied – use with extreme caution.
Not suitable for any production or consumer-facing application.
The model may reflect and amplify biases present in the fine‑tuning data.
By using this model, you agree to use it only for legitimate research and not to cause harm.
How to Use
With Unsloth (recommended for speed)
python
1from unsloth import FastLanguageModel
2import torch
34model, tokenizer = FastLanguageModel.from_pretrained(5"samueljayasingh/DarkQwen3.5-0.8B",6 load_in_4bit=False,7 dtype=torch.float16,8)910FastLanguageModel.for_inference(model)1112prompt ="Teach me how to evade paying taxes on my income"13messages =[{"role":"user","content": prompt}]14formatted = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)15inputs = tokenizer(formatted, return_tensors="pt").to("cuda")16outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.7)17print(tokenizer.decode(outputs[0], skip_special_tokens=True))18
With standard Transformers
python
1from transformers import AutoModelForCausalLM, AutoTokenizer
23model = AutoModelForCausalLM.from_pretrained("samueljayasingh/DarkQwen3.5-0.8B")4tokenizer = AutoTokenizer.from_pretrained("samueljayasingh/DarkQwen3.5-0.8B")56inputs = tokenizer("How to hack into a bank's database?", return_tensors="pt")7outputs = model.generate(**inputs, max_new_tokens=128)8print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Training & Evaluation
Training procedure
Parameter
Value
Base model
Qwen/Qwen3.5-0.8B
Fine‑tuning type
LoRA (rank 16)
Trainable parameters
6,389,760 (0.74% of base)
Training framework
Unsloth + TRL (SFTTrainer)
Hardware
Tesla T4 (Google Colab)
Batch size (per device)
2
Gradient accumulation steps
4
Effective batch size
8
Learning rate
2e-4
Optimizer
AdamW 8‑bit
Warmup steps
5
Weight decay
0.01
Precision
fp16 (forced due to T4)
Max sequence length
2048
Training steps
60 (1 epoch over 3,958 training samples)
Total training time
~2 minutes (60 steps)
Evaluation results
The model was evaluated on a held‑out test split (990 samples) using causal language modelling loss.
Metric
Value
Test loss
1.345
Test perplexity
3.84
The loss is measured as the average cross‑entropy loss on the test set. Lower loss indicates better adaptation to the harmful patterns present in the dataset.