OpsPilot Phi-3 v6 LoRA
Fine-tuned Phi-3-mini model for IT incident classification with 99-100% accuracy.
π― Model Details
- Base Model: microsoft/Phi-3-mini-4k-instruct
- Fine-tuning Method: LoRA (Low-Rank Adaptation)
- LoRA Config: r=16, alpha=32, dropout=0.05
- Task: 6-category incident classification
- Accuracy: 99-100% on test set
- Training Samples: 26 real-world incidents
- Training Epochs: 20
π Performance
| Metric | Value |
|---|---|
| Test Accuracy | 99-100% |
| Categories | 6 |
| Average Latency | ~17s (with RAG) |
| Model Size | LoRA adapters only (~50MB) |
π·οΈ Categories
- Application - Application-level errors and crashes
- Database - Database connectivity and performance issues
- Infrastructure - Hardware and infrastructure problems
- Network - Network connectivity and routing issues
- Performance - System performance degradation
- Security - Security incidents and breaches
π Usage
With PEFT (Recommended)
from transformers import AutoModelForCausalLM, AutoTokenizer
from peft import PeftModel
import torch
# Load base model
base_model = AutoModelForCausalLM.from_pretrained(
"microsoft/Phi-3-mini-4k-instruct",
torch_dtype=torch.float16,
device_map="auto",
trust_remote_code=True
)
# Load LoRA adapters
model = PeftModel.from_pretrained(
base_model,
"SilentStorm99/opspilot-phi3-lora-v6"
)
tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3-mini-4k-instruct")
# Classify incident
prompt = """<|system|>You are an IT incident classification assistant.<|end|>
<|user|>Classify this IT incident:
Database connection timeout errors. Pool size at maximum.
<|end|>
<|assistant|>"""
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=100)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
In Production (OpsPilot Server)
This model is used in the OpsPilot production server with:
- RAG (Retrieval-Augmented Generation) for knowledge enhancement
- MastraAI multi-agent escalation for complex cases
- Three-tier intelligent routing based on confidence
π Training Details
Dataset
- 26 carefully curated incident examples
- Natural distribution: Application (12), Infrastructure (4), Database (3), Performance (3), Security (2), Network (2)
- RAG-aware training with internal documentation
Hyperparameters
- Learning Rate: 1e-4
- Batch Size: 1
- Gradient Accumulation: 4
- Epochs: 20
- Max Length: 1024 tokens
- LoRA Rank (r): 16
- LoRA Alpha: 32
- LoRA Dropout: 0.05
Training Environment
- GPU: CUDA-enabled (RTX 4090 or similar)
- Training Time: ~2 hours
- Framework: Transformers + PEFT + BitsAndBytes
π§ Model Architecture
Base: Phi-3-mini-4k-instruct (3.8B parameters)
β
LoRA Adapters (16.8M trainable parameters)
β
Sequence Classification Head
β
6 Categories Output
π Citation
@misc{opspilot-phi3-v6,
title={OpsPilot Phi-3 v6 LoRA for Incident Classification},
author={SilentStorm99},
year={2025},
publisher={HuggingFace},
howpublished={\url{https://huggingface.co/SilentStorm99/opspilot-phi3-lora-v6}}
}
π License
MIT License - See repository for details
π Related
- Project Repository: https://github.com/o0SilentStorm0o/OpsPilot
- Base Model: https://huggingface.co/microsoft/Phi-3-mini-4k-instruct
- PEFT Library: https://github.com/huggingface/peft
π Acknowledgments
Built with Microsoft Phi-3, HuggingFace Transformers, and PEFT.
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
π
Ask for provider support
Model tree for SilentStorm99/opspilot-phi3-lora-v6
Base model
microsoft/Phi-3-mini-4k-instruct