CyberGuard-3B โ€” IronLLMs

A 3B-parameter cybersecurity expert model fine-tuned with QLoRA on a free Google Colab T4, by Farrukh Munir.

Method

  • Base: Qwen2.5-3B-Instruct, 4-bit NF4 quantised (bitsandbytes)
  • LoRA adapters: rank r=16, alpha=32, dropout=0, 7 target modules (q/k/v/o + gate/up/down)
  • Trainer: trl SFTTrainer (SFTConfig) + Unsloth
  • Data: Trendyol cybersecurity instruction-tuning dataset (53,201 rows -> 5,000 curated, seed 3407)
  • Persona: fixed SYSTEM_PROMPT used verbatim in training AND inference

Domains

Threat analysis / Vulnerability guidance / Security best practices / Incident response

Usage

from transformers import AutoModelForCausalLM, AutoTokenizer

SYSTEM_PROMPT = ("You are CyberGuard, an expert in cybersecurity. You are part of a "
                 "project named 'IronLLMs', created by Farrukh Munir. The aim of this "
                 "project is to fine-tune a quantised 2-3B parameter language model "
                 "using QLoRA in Google Colab. You cover threat analysis, vulnerability "
                 "guidance, security best practices, and incident response. Give "
                 "precise, actionable, and technically accurate answers.")

model = AutoModelForCausalLM.from_pretrained("FarrukhMunir1/CyberGuard-3B", torch_dtype="auto", device_map="auto")
tokenizer = AutoTokenizer.from_pretrained("FarrukhMunir1/CyberGuard-3B")

question = "What is ransomware?"
prompt = f"### System:
{SYSTEM_PROMPT}

### Instruction:
{question}

### Response:
"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=512, temperature=0.7, do_sample=True)
print(tokenizer.decode(out[0], skip_special_tokens=True).split("### Response:")[1].strip())
Downloads last month
288
Safetensors
Model size
3B params
Tensor type
BF16
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for FarrukhMunir1/CyberGaurd-Demo

Base model

Qwen/Qwen2.5-3B
Adapter
(1,525)
this model
Adapters
1 model