COMMANDS QUICKSTART (repo/) This file provides copy/paste command combinations for the main entrypoints: - VLM_finetune/run_ablation_sequential_ft.py - VLM_inference/run_ft_eval_ablation.py - VLM_inference/test_base_models/run_ft_eval_update.py Notes - Replace in paths with your username. - These scripts assume your datasets/adapters follow the folder conventions described in their headers. - All commands are meant to be run from /users//repo unless you prefer absolute paths. 1) Sequential fine-tuning launcher Script: VLM_finetune/run_ablation_sequential_ft.py A. Dry-run: list all planned runs (no training launched) python VLM_finetune/run_ablation_sequential_ft.py --dry_run B. Train a single task at a single percentage python VLM_finetune/run_ablation_sequential_ft.py --task a1 --perc 100 -- C. Train multiple tasks and multiple dataset percentages python VLM_finetune/run_ablation_sequential_ft.py --tasks a1,b1,c1 --percs 25,50,75,100 -- D. Overwrite existing outputs (dangerous: deletes output folders) python VLM_finetune/run_ablation_sequential_ft.py --task a1 --perc 25 --overwrite -- E. Change splits root / output root / HF cache location python VLM_finetune/run_ablation_sequential_ft.py \ --splits_root /users//ablation_study_dataset/ablation_splits \ --output_root /mydata//ablation_study_outputs/finetune_lora \ --hf_home /mydata//VLM_cache \ --tasks a1,b1 --percs 50,100 \ -- F. Forward extra FT.py arguments (everything after "--" is passed through) python VLM_finetune/run_ablation_sequential_ft.py --task a1 --perc 25 -- \ --num_train_epochs 1 \ --learning_rate 2e-5 \ --per_device_train_batch_size 1 \ --gradient_accumulation_steps 8 \ 2) Ablation evaluation runner (evaluate many adapters) Script: VLM_inference/run_ft_eval_ablation.py A. Evaluate ALL discovered (task, perc) splits under splits-root python VLM_inference/run_ft_eval_ablation.py \ --splits-root /users//ablation_study_dataset_c1/ablation_splits \ --adapter-root /mydata//ablation_study_outputs/finetune_lora \ --cache-dir /mydata//VLM_cache B. Evaluate a subset of tasks and percs python VLM_inference/run_ft_eval_ablation.py --tasks a1,b1 --percs 25,50,100 C. Evaluate only a few samples per split (fast smoke test) python VLM_inference/run_ft_eval_ablation.py --tasks a1 --percs 100 --num-samples 20 D. Skip missing adapters (useful while training is still running) python VLM_inference/run_ft_eval_ablation.py --skip-missing-adapter E. Evaluate BASE model only (ignore adapters) python VLM_inference/run_ft_eval_ablation.py --tasks a1 --percs 100 --no-adapter F. Evaluate exactly one adapter path (ignore task/perc discovery) python VLM_inference/run_ft_eval_ablation.py \ --adapter /mydata//ablation_study_outputs/finetune_lora/task_a1/perc_100 G. Choice-task robustness options (avoid whitespace-only outputs) python VLM_inference/run_ft_eval_ablation.py --tasks a1 --percs 100 \ --retry-empty-choice 2 \ --force-choice-letter-fallback H. Box-task generation settings (sampling / beams) python VLM_inference/run_ft_eval_ablation.py --tasks b2 --percs 100 \ --max-new-tokens-boxes 4096 \ --boxes-num-beams 3 I. Dry-run (show planned runs but do not execute inference) python VLM_inference/run_ft_eval_ablation.py --dry-run 3) Single-run evaluator (one task, optional circuit, optional adapter) Script: VLM_inference/test_base_models/run_ft_eval_update.py A. Evaluate one task across ALL circuits (default sampling logic) python VLM_inference/test_base_models/run_ft_eval_update.py --task a1 --num-samples 200 B. Evaluate one task for one circuit python VLM_inference/test_base_models/run_ft_eval_update.py --task b2 --circuit a --num-samples 200 C. Evaluate an ablation task (a1/b1/c1) using its ablation split JSON python VLM_inference/test_base_models/run_ft_eval_update.py --task a1 --num-samples -1 D. Evaluate with a LoRA adapter python VLM_inference/test_base_models/run_ft_eval_update.py \ --task a1 --num-samples 200 \ --adapter /mydata//ablation_study_outputs/finetune_lora/task_a1/perc_100 E. Evaluate a different base model (no adapter) python VLM_inference/test_base_models/run_ft_eval_update.py \ --task a1 --num-samples 50 \ --model meta-llama/Llama-3.2-11B-Vision F. Set cache dir for model/tokenizer downloads python VLM_inference/test_base_models/run_ft_eval_update.py --task a1 --cache-dir /mydata//VLM_cache G. Debug Hugging Face auth without running full inference python VLM_inference/test_base_models/run_ft_eval_update.py \ --task a1 --num-samples 5 --dry-run-hf \ --model meta-llama/Llama-3.2-11B-Vision \ --hf-token-file /users//.secrets/hf_token.env H. Force single GPU (avoid some device_map='auto' issues) python VLM_inference/test_base_models/run_ft_eval_update.py --task a1 --force-single-gpu I. Change output directory and run tag python VLM_inference/test_base_models/run_ft_eval_update.py \ --task a1 --num-samples 200 \ --out-dir /users//VLM/inference_eval/outputs \ --run-tag my_experiment_001