Instructions to use mohan188n/CyberShield-Qwen-0.5B-LoRA with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use mohan188n/CyberShield-Qwen-0.5B-LoRA with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("./qwen_model") model = PeftModel.from_pretrained(base_model, "mohan188n/CyberShield-Qwen-0.5B-LoRA") - Notebooks
- Google Colab
- Kaggle
CyberShield-GPT โ Qwen2.5-0.5B LoRA Adapter
A fine-tuned LoRA adapter on top of Qwen/Qwen2.5-0.5B-Instruct, specialized in cybersecurity tasks including threat detection, vulnerability analysis, and security Q&A.
Model Details
- Developed by: mohan188n
- Base Model: Qwen/Qwen2.5-0.5B-Instruct
- Model type: Causal Language Model (LoRA fine-tune)
- Language: English
- License: Apache 2.0
- Fine-tuning method: LoRA (PEFT)
- Framework versions: PEFT 0.15.2
How to Use
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
base_model_id = "Qwen/Qwen2.5-0.5B-Instruct"
adapter_id = "mohan188n/CyberShield-Qwen-0.5B-LoRA"
tokenizer = AutoTokenizer.from_pretrained(base_model_id)
model = AutoModelForCausalLM.from_pretrained(base_model_id)
model = PeftModel.from_pretrained(model, adapter_id)
prompt = "What is a SQL injection attack?"
inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Training Details
- Training Data: Cybersecurity-focused dataset
- Training Regime: fp16 mixed precision
- Fine-tuning Method: LoRA (Low-Rank Adaptation)
Intended Use
This model is designed for cybersecurity-related natural language tasks:
- Explaining attack types and vulnerabilities
- Answering security Q&A
- Assisting in security education and research
Repository
GitHub: Mohan007N/CyberShield-GPT
- Downloads last month
- 18