Configuration Reference¶
All configuration is managed through Python dataclasses defined in
src/weather_doc_extractor/config.py. There is no external config file;
values are changed by passing CLI flags or by editing the dataclasses directly
for programmatic use.
AppConfig¶
The top-level configuration object, composed of the sections below.
IngestConfig¶
Controls where the ingest stage reads data from.
Field |
Default |
Description |
|---|---|---|
|
|
Directory of document images |
|
|
Directory of JSON transcriptions |
|
|
Where to write processed dataset records |
ModelConfig¶
Controls which model is used for inference.
Field |
Default |
Description |
|---|---|---|
|
|
HuggingFace model ID or local adapter path |
|
|
Maximum tokens the model may generate |
|
|
Sampling temperature (0 = greedy) |
|
|
Device placement ( |
Model presets¶
The --model CLI flag accepts short preset names as well as full HuggingFace
model IDs or local adapter paths.
Preset |
Model ID |
Notes |
|---|---|---|
|
|
Lightweight baseline (~500 M params) |
|
|
SmolVLM2, 2.2 B |
|
|
IBM Granite Vision 3.2, 2 B |
|
|
IBM Granite Vision 4.1, 4 B |
|
|
Google Gemma 3, 4 B; uses pan-and-scan tiling for high-res scans |
|
|
Google Gemma 4, 4 B edge; variable-resolution token budget |
|
|
Mistral Small 3.1, 24 B; Pixtral vision encoder, 128 k context |
TrainingConfig¶
Controls the fine-tuning process.
Field |
Default |
Description |
|---|---|---|
|
|
Root directory for saved adapters |
|
|
AdamW learning rate |
|
|
Number of training epochs |
|
|
Per-device training batch size |
|
|
Effective batch = batch_size × this |
|
|
Fraction of data used for validation |
|
|
LoRA rank |
|
|
LoRA alpha scaling factor |
|
|
Dropout applied to LoRA layers |
|
|
Linear layers to adapt; |
ProjectPaths¶
General-purpose path configuration (used internally by some pipeline functions).
Field |
Default |
|---|---|
|
|
|
|
|
|
|
|
|
|