MCPcopy
hub / github.com/InternLM/lmdeploy / match

Method match

lmdeploy/model.py:230–238  ·  view source on GitHub ↗

Return the model_name that was registered to MODELS. Args: model_path (str): the model path used for matching.

(cls, model_path: str, **kwargs)

Source from the content-addressed store, hash-verified

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')

Callers 4

get_versionFunction · 0.45
get_chat_templateFunction · 0.45
test_matchMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_matchMethod · 0.36