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

  1. Application - Application-level errors and crashes
  2. Database - Database connectivity and performance issues
  3. Infrastructure - Hardware and infrastructure problems
  4. Network - Network connectivity and routing issues
  5. Performance - System performance degradation
  6. 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

πŸ™ Acknowledgments

Built with Microsoft Phi-3, HuggingFace Transformers, and PEFT.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for SilentStorm99/opspilot-phi3-lora-v6

Adapter
(805)
this model