kempnerforge.config.adapter¶
Adapter configuration.
AdapterConfig selects which adapter the VLM wrapper instantiates and
parameterizes the chosen adapter. Dispatched via the adapter registry
at build time (see kempnerforge/model/adapter.py).
This module is registered-component-shaped (parallel to VisionEncoderConfig,
VLMConfig). A follow-up PR will flatten the VLM TOML schema to expose
[adapter] as a top-level section; until then build_vlm_wrapper
constructs an AdapterConfig internally from the existing VLMConfig
fields (adapter_hidden_dim, adapter_activation).
Classes
Selects the adapter type and parameterizes it. |
- class kempnerforge.config.adapter.AdapterConfig[source]¶
Bases:
objectSelects the adapter type and parameterizes it.
- Fields:
- type: Registry key for the adapter builder.
"mlp_2layer"(default) or
"linear". Custom adapters register additional names.- hidden_dim: Hidden width for
mlp_2layer.0means “match out_dim”; ignored bylinear.- activation: Activation between the two MLP projections. One of
"gelu"(default),"silu","relu". Ignored bylinear.
- type: Registry key for the adapter builder.