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

Method __init__

chat.py:140–143  ·  view source on GitHub ↗
(self, model_path)

Source from the content-addressed store, hash-verified

138
139class MiniCPMV:
140 def __init__(self, model_path) -> None:
141 self.model = AutoModel.from_pretrained(model_path, trust_remote_code=True).to(dtype=torch.bfloat16)
142 self.tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)
143 self.model.eval().cuda()
144
145 def chat(self, input):
146 try:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected