CyberSec-Qwen3-DeepSeekv1

This is a cybersecurity-specialized fine-tuned model based on DeepSeek-R1-Qwen3-8B.

Model Details

  • Base Model: ykarout/RPT-DeepSeek-R1-0528-Qwen3-8B
  • Fine-tuning Method: LoRA (Low-Rank Adaptation)
  • Dataset: Trendyol Cybersecurity Instruction Tuning Dataset
  • Specialization: Cybersecurity expertise and guidance

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM
import torch

model_name = "ykarout/CyberSec-Qwen3-DeepSeekv1"
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
    model_name,
    torch_dtype=torch.bfloat16,
    device_map="auto",
    trust_remote_code=True
)

# Example usage
messages = [
    {"role": "system", "content": "You are a cybersecurity expert."},
    {"role": "user", "content": "What is a DDoS attack and how can it be mitigated?"}
]

input_text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(input_text, return_tensors="pt").to(model.device)

with torch.no_grad():
    outputs = model.generate(
        **inputs,
        max_new_tokens=512,
        temperature=0.7,
        do_sample=True,
        pad_token_id=tokenizer.eos_token_id
    )

response = tokenizer.decode(outputs[0][len(inputs.input_ids[0]):], skip_special_tokens=True)
print(response)

Training Details

  • Framework: TRL (Transformers Reinforcement Learning)
  • Training Method: Supervised Fine-Tuning (SFT) with LoRA
  • Assistant-only Loss: Custom data collator for training only on assistant responses
  • Hardware: NVIDIA H100
  • Precision: bfloat16

Ethical Use

This model is designed for educational and defensive cybersecurity purposes only. Please use responsibly and in accordance with applicable laws and ethical guidelines.

License

Apache 2.0

Downloads last month
-
Safetensors
Model size
8.19B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ykarout/CyberSec-Qwen3-DeepSeekv1

Dataset used to train ykarout/CyberSec-Qwen3-DeepSeekv1