Downloads · 30 days
0
abhifdsdf/cab-fusion-predictive-maintenance-phase2-artifacts
cab-fusion-predictive-maintenance-phase2-artifacts is a machine learning model from abhifdsdf. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
├── qloraadapter/ ← LLM Fine-Tuned Weights │ ├── adaptermodel.safetensors ─ Load with PeftModel.frompretrained(basemodel, "qloraadapter") │ ├── adapterconfig.json │ ├── tokenizer.json │ └── tokenizerconfig.json │ ├──…
Downloads · 30 days
0
Access
Public
Updated Jul 22, 2026
Repo size
548 MB
Likes
0
Public
Click a slice to open those files.
.pt360 MB · 66%
From the Hugging Face model README
├── qlora_adapter/ ← LLM Fine-Tuned Weights │ ├── adapter_model.safetensors ─ Load with PeftModel.from_pretrained(base_model, "qlora_adapter") │ ├── adapter_config.json │ ├── tokenizer.json │ └── tokenizer_config.json │ ├── maintenance_faiss.index ─ FAISS vector index (256-d embeddings) │ Load: faiss.read_index("maintenance_faiss.index") │ ├── maintenance_metadata.parquet ─ Metadata lookup table │ Columns: incident_id, maintenance_log, degradation_score, rul_label, cls_label │ Load: pd.read_parquet("maintenance_metadata.parquet") │ └── phase1_model/ ─ Phase 1 embedding generator ├── cab_fusion_model.pt ─ PyTorch state_dict (CAB-Fusion network) │ Load: model.load_state_dict(torch.load("cab_fusion_model.pt", map_location=device)) └── sensor_scaler.pkl ─ MinMaxScaler fitted on CMAPSS sensor channels Load: joblib.load("sensor_scaler.pkl")
import torch, joblib, numpy as np
from your_model_module import CABFusionMultimodalNetwork
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
# Load model
model = CABFusionMultimodalNetwork(...)
model.load_state_dict(torch.load('phase1_model/cab_fusion_model.pt', map_location=device))
model.to(device).eval()
# Load scaler
scaler = joblib.load('phase1_model/sensor_scaler.pkl')
# Normalize sensor data and run inference
# sensor_window shape: [1, 50, 21] (raw values)
sensor_scaled = scaler.transform(sensor_window.reshape(-1, 21)).reshape(1, 50, 21)
image_tensor = ... # preprocessed image [1, 3, 224, 224]
with torch.no_grad():
_, _, fused_embedding, _ = model(image_tensor.to(device), torch.tensor(sensor_scaled).to(device))
# fused_embedding shape: [1, 256] ← this is your query vector
Step 2: Retrieve Similar Incidents
import faiss, pandas as pd
index = faiss.read_index('maintenance_faiss.index')
metadata = pd.read_parquet('maintenance_metadata.parquet')
query = fused_embedding.cpu().numpy()
query = query / np.linalg.norm(query)
distances, indices = index.search(query.astype(np.float32), k=3)
for idx in indices[0]:
print(metadata.iloc[idx]['maintenance_log'])
Step 3: Generate Audit Report
from peft import PeftModel
from transformers import AutoModelForCausalLM, AutoTokenizer
base_model = AutoModelForCausalLM.from_pretrained(
'meta-llama/Meta-Llama-3-8B-Instruct',
device_map='auto',
token=HF_TOKEN,
)
model = PeftModel.from_pretrained(base_model, 'qlora_adapter')
tokenizer = AutoTokenizer.from_pretrained('qlora_adapter')
# Format prompt with retrieved logs + severity
prompt = tokenizer.apply_chat_template(messages, tokenize=False)
inputs = tokenizer(prompt, return_tensors='pt').to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256, temperature=0.2)
report = tokenizer.decode(outputs[0][inputs['input_ids'].shape[1]:], skip_special_tokens=True)
File Sizes
File
phase1_model/cab_fusion_model.pt
qlora_adapter/ (all files)
maintenance_faiss.index
maintenance_metadata.parquet
phase1_model/sensor_scaler.pkl
Notes
- All vectors are L2-normalized. Use Inner Product (cosine similarity) for FAISS search.
- The FAISS index contains real embeddings from paired CMAPSS+MVTec data.
- Maintenance logs are derived from actual sensor threshold breaches.
- Training was done with approximate visual pairing (Phase 1 proof-of-concept).