Instructions to use Ushitha/ushitha-coder-network-corrector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Ushitha/ushitha-coder-network-corrector with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct") model = PeftModel.from_pretrained(base_model, "Ushitha/ushitha-coder-network-corrector") - Notebooks
- Google Colab
- Kaggle
Network Security Config LoRA
Fine-tuned LoRA adapter on top of Qwen/Qwen2.5-7B-Instruct.
What it does
Given a router/switch configuration, this model:
- Reasons step-by-step through all security vulnerabilities
- Identifies misconfigurations with severity labels (CRITICAL / HIGH / MEDIUM)
- Outputs a fully corrected, hardened configuration
- Summarises the most important changes and shows before/after security scores
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base = "Qwen/Qwen2.5-7B-Instruct"
lora = "Ushitha/ushitha-coder-network-corrector"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForCausalLM.from_pretrained(base, torch_dtype=torch.bfloat16, device_map="auto")
model = PeftModel.from_pretrained(model, lora)
messages = [
{"role": "system", "content": "You are a network security expert..."},
{"role": "user", "content": "Review this config:\n\n```\nhostname Router\n...\n```"},
]
text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
inputs = tokenizer(text, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=2048, temperature=0.1)
print(tokenizer.decode(out[0], skip_special_tokens=True))
Training details
| Parameter | Value |
|---|---|
| Base model | Qwen/Qwen2.5-7B-Instruct |
| Technique | QLoRA 4-bit NF4 |
| LoRA rank | 16 / alpha 32 |
| Epochs | 20 |
| Learning rate | 0.0002 |
- Downloads last month
- 100
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support