Principle:Open compass VLMEvalKit Model Registration
| Source | Domain | Last Updated |
|---|---|---|
| Repo | Vision, Software_Design | 2026-02-14 00:00 GMT |
Overview
A registration pattern for adding new VLM adapters to the centralized model registry via functools.partial configuration.
Description
After implementing a VLM adapter (BaseModel or BaseAPI subclass), it must be registered in VLMEvalKit's supported_VLM dictionary. This involves three steps:
- Add the import in the appropriate
__init__.py. - Create a dictionary entry mapping the model display name to a
functools.partial(ModelClass, model_path=..., **kwargs). - Add the dictionary to the
model_groupslist invlmeval/config.py.
The partial() pre-configures constructor arguments so models can be instantiated uniformly via supported_VLM[name]().
Usage
Required for any newly added VLM adapter. Follow the convention of grouping models into series dictionaries (e.g., minicpm_series, qwen_series).
Theoretical Basis
Service registration pattern. Models register themselves in a central dictionary. The partial() function acts as a factory method, pre-binding constructor arguments while deferring instantiation.