harshith0214/psse-agent-gpt-oss-20b-lora
06
PSSE Agent — GPT-OSS 20B LoRA (v2)
A LoRA adapter fine-tuned on GPT-OSS 20B for automated Power System State Estimation (PSSE) fault diagnosis.
Given a power system snapshot and WLS state estimation outputs (residuals r, normalized Lagrange multipliers λN), the model classifies the fault into one of four categories with high confidence.
Model Details
Task
The model acts as a power-system diagnostic agent using an agentic tool-call loop:
- Calls
wls_from_pathon the provided snapshot - Inspects residuals
rand Lagrange multipliersλN - Optionally calls correction tools (
correct_measurements_from_path,correct_parameters_from_path,correct_topology_from_path) - Outputs a structured JSON verdict
Output Format
{
"has_error": true,
"error_family": "parameter_error",
"suspect_location": {"line_row": 5, "from_bus": 3, "to_bus": 4},
"recommended_tool": "correct_parameters_from_path",
"confidence": 0.99
}Error Classes
Evaluation Results (held-out test set, IEEE 14-bus)
- Overall accuracy: 296/296 (100%)
- Mean confidence: 0.9875
- Null predictions (parse failures): 0/296
Note: Evaluated on held-out samples from the IEEE 14-bus (case14) synthetic dataset. Out-of-distribution generalization to other grid topologies has not been evaluated.Training Data
- Source: Synthetically generated power system diagnostic traces (
case14, IEEE 14-bus system) - Total samples: 1,978 (deduplicated on user snapshot)
- Split: 70% train (1,400) / 15% val (297) / 15% test (296)
- Split strategy: Stratified by
error_family × tool_sequence, seed=42 - Format: GPT-OSS channel format (
commentary{}/final{})
Usage
from unsloth import FastLanguageModel
model, tokenizer = FastLanguageModel.from_pretrained(
model_name="harshith0214/psse-agent-gpt-oss-20b-lora",
max_seq_length=16384,
dtype=None,
load_in_4bit=True,
)
FastLanguageModel.for_inference(model)Training Infrastructure
- Hardware: NVIDIA H100 80GB HBM3
- Framework: Unsloth + HuggingFace TRL (SFTTrainer)
- Optimizer: AdamW 8-bit, cosine LR schedule
- Learning rate: 1e-4, warmup 50 steps
- Batch size: 4 × 4 gradient accumulation = 16 effective
Limitations
- Trained and evaluated exclusively on the IEEE 14-bus (
case14) synthetic test system - Performance on larger or real-world grid topologies is untested
- Requires the GPT-OSS base model and Unsloth for inference
