YAML Configs
repralign is intentionally config-driven. The YAML file controls:
- model factories
- adapter choice
- processor factories
- adapter-specific arguments
- layer names
- dataset source
- pooling and normalization
- output location
Tensor-Batch Style Config
See:
configs/example_analysis.yaml
This format is useful for:
- toy models
- synthetic tests
- preconstructed tensor batches
Dataset-Driven Config
See:
configs/reference_alignment_template.yaml
This format is useful for:
- image folders
- CSV/JSONL manifests
- semantic and generation references in the same experiment
Model Spec Fields
Example:
name: semantic_reference
adapter: hf_vision
factory: repralign.factories:load_siglip_vision_model
processor_factory: repralign.factories:load_siglip_image_processor
factory_kwargs:
model_name: google/siglip-so400m-patch14-384
processor_kwargs:
model_name: google/siglip-so400m-patch14-384
layers:
- vision_model.encoder.layers.0
device: cpu
Important fields:
adapter: adapter registry keyfactory: model factory inmodule:functionformprocessor_factory: optional preprocessor factoryfactory_kwargs: passed into the model factoryprocessor_kwargs: passed into the processor factoryadapter_kwargs: adapter-specific behaviorlayers: named modules to hookdevice: extraction device for that model