MMTrustEval icon indicating copy to clipboard operation
MMTrustEval copied to clipboard

Regarding testing my own model

Open ZixianGao opened this issue 1 year ago • 1 comments

Dear authors, does your method support testing models that have been fine-tuned and saved locally? If so, how should I proceed with this?

ZixianGao avatar Aug 20 '24 17:08 ZixianGao

Sure. You can integrate your own model to the framework following these steps.

  1. Define a subclass of BaseChat for your own model
  2. Implement the chat method to support multimodal and text-only inference
  3. Set up the model-id and register it to the model registry via @registry.register_chatmodel()

If your model is fine-tuned from an existing model family like LLaVA, you can use the pre-defined LLaVAChat class (mmte/models/llava_chat.py) by changing the model-id and the corresponding config (e.g., model-path).

Your model can be tested as long as it can be correctly loaded in __init__ and supports multimodal and text-only inference in chat.

zycheiheihei avatar Aug 22 '24 03:08 zycheiheihei