Qwen3 4B Security Multitask Adapter

This repository contains a single LoRA/PEFT adapter trained on top of Qwen/Qwen3-4B-Instruct-2507 for two security tasks:

  1. Phishing email analysis
  2. Prompt injection analysis

The adapter was trained as a multitask instruction-tuned adapter so one model can be used in a single application.

Base model

  • Base model: Qwen/Qwen3-4B-Instruct-2507
  • Adapter type: LoRA / PEFT
  • Intended use: attach this adapter on top of the base model for inference

1. Phishing email analysis

Input: raw email text

Expected JSON output:

{"label":"PHISHING","risk_1_to_10":9,"reason":"Urgent credential-verification language and a suspicious requested action strongly suggest phishing."}
# Model Card for qwen3_multitask_adapter_v1

This model is a fine-tuned version of [Qwen/Qwen3-4B-Instruct-2507](https://huggingface.co/Qwen/Qwen3-4B-Instruct-2507).
It has been trained using [TRL](https://github.com/huggingface/trl).

## Quick start

```python
from transformers import pipeline

question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
generator = pipeline("text-generation", model="None", device="cuda")
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])

Training procedure

This model was trained with SFT.

Framework versions

  • PEFT 0.18.1
  • TRL: 0.29.0
  • Transformers: 5.3.0
  • Pytorch: 2.10.0
  • Datasets: 4.7.0
  • Tokenizers: 0.22.2

Citations

Cite TRL as:

@software{vonwerra2020trl,
  title   = {{TRL: Transformers Reinforcement Learning}},
  author  = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin},
  license = {Apache-2.0},
  url     = {https://github.com/huggingface/trl},
  year    = {2020}
}
Downloads last month
3
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for rudycaz/qwen3-4b-security-multitask-adapter

Adapter
(5239)
this model