Return the model_name that was registered to MODELS. Args: model_path (str): the model path used for matching.
(cls, model_path: str, **kwargs)
| 228 | |
| 229 | @classmethod |
| 230 | def match(cls, model_path: str, **kwargs) -> str | None: |
| 231 | """Return the model_name that was registered to MODELS. |
| 232 | |
| 233 | Args: |
| 234 | model_path (str): the model path used for matching. |
| 235 | """ |
| 236 | path = model_path.lower() |
| 237 | if 'cogvlm' in path and 'cogvlm2' not in path: |
| 238 | return 'cogvlm' |
| 239 | |
| 240 | |
| 241 | @MODELS.register_module(name='vicuna') |
no outgoing calls