Views
No views yet
| Property | Value |
|---|---|
| Base Model | microsoft/Phi-3.5-mini-instruct |
| Parameters | 3.8B (base) + 24MB (LoRA adapter) |
| Fine-tuning Method | LoRA (Low-Rank Adaptation) |
| LoRA Rank | 8 |
| LoRA Alpha | 16 |
| Target Modules | q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj |
| Training Data | 2,027 industrial maintenance Q&A pairs |
| Training Hardware | Apple M3 Max (MLX framework) |
| License | MIT |
pip install transformers torch peft1from transformers import AutoModelForCausalLM, AutoTokenizer
2from peft import PeftModel
3
4# Load base model
5base_model = AutoModelForCausalLM.from_pretrained(
6 "microsoft/Phi-3.5-mini-instruct",
7 torch_dtype="auto",
8 device_map="auto"
9)
10
11# Load fine-tuned adapter
12model = PeftModel.from_pretrained(
13 base_model,
14 "Santhoshkumarp/phi35-maintenance-wizard-lora"
15)
16
17tokenizer = AutoTokenizer.from_pretrained("microsoft/Phi-3.5-mini-instruct")
18
19# Generate maintenance guidance
20prompt = """<|system|>
21You are an expert AI maintenance engineer specializing in steel plant equipment.
22<|end|>
23<|user|>
24Rolling Mill RM1 shows excessive vibration (12.5 mm/s) and high temperature (95°C).
25What could be the root cause and recommended actions?
26<|end|>
27<|assistant|>
28"""
29
30inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
31outputs = model.generate(**inputs, max_new_tokens=500, temperature=0.7)
32response = tokenizer.decode(outputs[0], skip_special_tokens=True)
33
34print(response)pip install mlx-lm1from mlx_lm import load, generate
2
3model, tokenizer = load(
4 "microsoft/Phi-3.5-mini-instruct",
5 adapter_path="Santhoshkumarp/phi35-maintenance-wizard-lora"
6)
7
8prompt = """<|system|>
9You are an expert AI maintenance engineer specializing in steel plant equipment.
10<|end|>
11<|user|>
12Rolling Mill RM1 shows excessive vibration (12.5 mm/s) and high temperature (95°C).
13What could be the root cause and recommended actions?
14<|end|>
15<|assistant|>
16"""
17
18response = generate(model, tokenizer, prompt=prompt, max_tokens=500, verbose=False)
19print(response)1Model: microsoft/Phi-3.5-mini-instruct
2Method: LoRA fine-tuning
3Rank: 8
4Alpha: 16
5Dropout: 0.05
6Learning Rate: 2e-4
7Batch Size: 4
8Gradient Accumulation: 4
9Epochs: 3
10Optimizer: AdamW
11Scheduler: Cosine with warmup
12Warmup Steps: 100
13Max Sequence Length: 2048"High current in a blower could indicate several issues. Check the motor, bearings, and ensure proper maintenance."
"Root Cause: Motor overload due to bearing degradation or misalignment.Immediate Actions:
- STOP blower operation immediately (safety-critical equipment)
- Lock out / Tag out (LOTO) - ensure zero energy state
- Monitor for smoke or excessive heating
Diagnostic Steps:
- Check bearing condition using vibration analysis
- Measure motor winding resistance (megger test)
- Inspect coupling alignment
- Verify voltage balance across all phases
Parts Required: Bearing assembly (Part: BF-BRG-001), Motor contactor if damagedRepair Procedure: Follow SOP-BF-003 for bearing replacement. Torque coupling bolts to 85 Nm."
User Query
↓
Equipment Sensor Data + Historical Context
↓
RAG Retrieval (Qdrant Vector DB)
↓
Fine-tuned Phi-3.5 Mini (this model)
↓
Multi-Agent Analysis
↓
Actionable Maintenance Plan + Citations1@misc{phi35-maintenance-wizard-2024,
2 title = {Phi-3.5 Mini Industrial Maintenance Wizard LoRA Adapter},
3 author = {Santhosh Kumar P},
4 year = {2024},
5 url = {https://huggingface.co/Santhoshkumarp/phi35-maintenance-wizard-lora}
6}