Building-block protocol: class carries a model_type ClassVar.
The simplest of the family-contract pieces. Every concrete family
Config (ResNetConfig, BERTConfig, …) overrides this ClassVar
to a unique short identifier ("resnet", "bert") used by the
registry, config.json persistence, and AutoConfig dispatch.
Intermediate abstract bases — ModelConfig itself,
LanguageModelConfig, DiffusionModelConfig,
GenerativeModelConfig — deliberately keep model_type == "base"; they are not family Configs and won't satisfy stricter
protocols (e.g. ModelConfigProtocol) that compose this
one.
Attributes
model_typeClassVar[str]config.json and used by directory-based loading to dispatch
to the correct registry entry.Notes
Component of the composite ModelConfigProtocol. Use this
protocol alone in signatures that only need the family identifier
(e.g. logging utilities, registry lookups) without also requiring
the full @model_family_meta machinery.
Examples
Every documented family Config carries the attribute:
>>> from lucid.models.vision.resnet import ResNetConfig
>>> from lucid.models._protocols import HasModelType
>>> isinstance(ResNetConfig, HasModelType)
True
A plain class without the ClassVar does not satisfy it:
>>> class Plain: pass
>>> isinstance(Plain, HasModelType)
False