Instructions to use RRK1987/automotive-diagnostics-llm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use RRK1987/automotive-diagnostics-llm with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2") model = PeftModel.from_pretrained(base_model, "RRK1987/automotive-diagnostics-llm") - Notebooks
- Google Colab
- Kaggle
π Automotive Diagnostics AI β Fine-Tuned LLM
Capstone Project: GenAI Application with LLMs & RAG
Author: RRK1987
Created: 2026-06-15
Base Model: mistralai/Mistral-7B-Instruct-v0.2
Technique: QLoRA (4-bit NF4 quantization + LoRA r=16)
Model Description
This model is a fine-tuned version of Mistral-7B-Instruct-v0.2, specialised for automotive vehicle diagnostics using OBD-II and UDS fault code protocols.
The model acts as an expert automotive diagnostics assistant that:
- Interprets DTC (Diagnostic Trouble Code) fault codes
- Identifies the most likely root causes
- Recommends step-by-step repair procedures
- Issues safety warnings for critical faults
- Advises consulting a certified mechanic when uncertain
Training Details
| Parameter | Value |
|---|---|
| Base model | Mistral-7B-Instruct-v0.2 |
| Technique | QLoRA β 4-bit NF4 quantization |
| LoRA rank (r) | 16 |
| LoRA alpha | 32 |
| Training examples | 119 |
| Validation examples | 21 |
| Epochs | 3 |
| Final loss | 0.4590 |
| Optimizer | paged_adamw_8bit |
| Precision | bf16 |
| Hardware | Tesla T4 GPU (15.6GB) |
DTC Code Coverage
- P codes β Powertrain (engine, fuel, transmission, timing)
- B codes β Body (airbags, HVAC)
- C codes β Chassis (ABS, brakes, wheel speed sensors)
- U codes β Network (CAN bus, ECU communication)
Usage
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import PeftModel
import torch
base_model = "mistralai/Mistral-7B-Instruct-v0.2"
peft_model = "RRK1987/automotive-diagnostics-llm"
tokenizer = AutoTokenizer.from_pretrained(peft_model)
model = AutoModelForCausalLM.from_pretrained(
base_model,
load_in_4bit=True,
device_map="auto",
)
model = PeftModel.from_pretrained(model, peft_model)
prompt = "<s>[INST] You are an expert automotive diagnostics assistant. My 2019 Toyota Camry is showing fault code P0300. I am experiencing rough idle and engine shaking. Can you diagnose this? [/INST]"
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
outputs = model.generate(**inputs, max_new_tokens=300)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
Safety
This model includes safety guardrails that refuse requests to:
- Disable airbag systems
- Bypass ABS braking systems
- Deactivate any safety-critical vehicle systems
Disclaimer
This model is for educational purposes only. Always consult a certified mechanic for actual vehicle repairs, especially for safety-critical systems.
Dataset
Training data available at: https://huggingface.co/datasets/RRK1987/automotive-dtc-finetune
Project Pipeline
This model is part of a 5-phase GenAI capstone project:
- Phase 1 β Data preparation (119 DTC instruction pairs)
- Phase 2 β ChromaDB vector store (35 documents embedded)
- Phase 3 β QLoRA fine-tuning (this model)
- Phase 4 β³ RAG pipeline integration
- Phase 5 β³ Evaluation + HuggingFace Spaces deployment
- Downloads last month
- 19
Model tree for RRK1987/automotive-diagnostics-llm
Base model
mistralai/Mistral-7B-Instruct-v0.2