MCPcopy Create free account
hub / github.com/OpenBMB/MiniCPM-V / __init__

Method __init__

chat.py:260–268  ·  view source on GitHub ↗
(self, model_path, multi_gpus=False)

Source from the content-addressed store, hash-verified

258
259class MiniCPMVChat:
260 def __init__(self, model_path, multi_gpus=False) -> None:
261 if '12B' in model_path:
262 self.model = OmniLMM12B(model_path)
263 elif 'MiniCPM-Llama3-V' in model_path:
264 self.model = MiniCPMV2_5(model_path)
265 elif 'MiniCPM-V-2_6' in model_path:
266 self.model = MiniCPMV2_6(model_path, multi_gpus)
267 else:
268 self.model = MiniCPMV(model_path)
269
270 def chat(self, input):
271 return self.model.chat(input)

Callers

nothing calls this directly

Calls 4

OmniLMM12BClass · 0.85
MiniCPMV2_5Class · 0.85
MiniCPMV2_6Class · 0.85
MiniCPMVClass · 0.85

Tested by

no test coverage detected