Dedicated Endpoints

Run this model inference on single tenant GPU with unmatched speed and reliability at scale.

Learn more
Container

Run this model inference with full control and performance in your environment.

Learn more

Get help setting up a custom Dedicated Endpoints.

Talk with our engineer to get a quote for reserved GPU instances with discounts.

README

License: mit

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

ParameterValue
Base modelMistral-7B-Instruct-v0.2
TechniqueQLoRA — 4-bit NF4 quantization
LoRA rank (r)16
LoRA alpha32
Training examples119
Validation examples21
Epochs3
Final loss0.4590
Optimizerpaged_adamw_8bit
Precisionbf16
HardwareTesla 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

python

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

Model provider

RRK1987

Model tree

Base

mistralai/Mistral-7B-Instruct-v0.2

Adapter

this model

Modalities

Input

Text

Output

Text

Pricing

Dedicated Endpoints

View details

Supported Functionality

Model APIs

Dedicated Endpoints

Container

More information

Explore FriendliAI today