ICLAD 2026 Paper:
Inspector: Conversational and Lightweight Analyzer of Analog Circuit Layouts Using LLM and CNNs
This repository contains training scripts for:
- LLM fine-tuning/classification (
Inspector_llm.py) - YOLO training/evaluation (
Inspector_yolo.py)
The Inspector dataset is available on 🤗 Hugging Face.
Use Python 3.10+.
python -m venv .venv
# Linux/macOS
source .venv/bin/activate
# Windows (PowerShell)
# .venv\Scripts\Activate.ps1
pip install --upgrade pip
pip install -r requirements.txtIf you need a CUDA-enabled PyTorch build, install PyTorch from the official selector first: https://pytorch.org/get-started/locally/
Set your Hugging Face token (for gated model access):
# Linux/macOS
export HF_AUTH_TOKEN=<your_token>
# Windows PowerShell
# $env:HF_AUTH_TOKEN="<your_token>"Run fine-tuning:
python llms/llm_ft.py \
--data llms/task_identification_dataset.json \
--length 2048 \
--batch 16 \
--epochs 10 \
--max-new-tokens 128 \
--seed 42Outputs are written to:
results_llm_ft/(training/eval artifacts)ft_model/(merged standalone model)
Train with your YOLO data config:
python train/yolo_train.py \
--model yolov8m \
--data /path/to/data.yaml \
--epochs 100 \
--batch 16 \
--imgsz 608 1600 \
--seed 42Useful optional flags:
--device 0or--device 0,1--project ./runs--name experiment_name--no-valand/or--no-test
Outputs include run logs, model weights, and summary.json inside the training run directory.
- Both scripts support reproducible seeds (
--seed). Inspector_llm.pyexpects JSON rows with amessagesfield in chat format.Inspector_yolo.pyexpects a valid Ultralytics-styledata.yaml.