Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Open compass VLMEvalKit MUGUWrapper

From Leeroopedia
Field Value
source VLMEvalKit
domain Vision, API_Integration

Overview

MUGUWrapper provides a VLMEvalKit API adapter for the MUG-U vision-language model from Shopee.

Description

MUGUWrapper inherits from BaseAPI and communicates with a Shopee-hosted LMDeploy-compatible API endpoint at shopee.sg. It uses InternVL-style prompt utilities for dataset-specific prompt construction including multi-choice, VQA, and Y/N prompts, and supports configurable resolution settings per dataset type. The class includes an optional MPO prompt mode.

Usage

Use this adapter when evaluating MUG-U vision-language models through the Shopee API endpoint.

Code Reference

  • Source: vlmeval/api/mug_u.py, Lines: L1-210
  • Import: from vlmeval.api.mug_u import MUGUWrapper

Signature:

class MUGUWrapper(BaseAPI):
    def __init__(self, model, retry=5, key=None, verbose=True,
                 temperature=0.0, timeout=60, api_base=None,
                 system_prompt=None, max_tokens=4096,
                 use_mpo_prompt=False, **kwargs): ...
    def generate_inner(self, inputs, **kwargs): ...

I/O Contract

Direction Description
Inputs message — text/image/video content list; model-specific params via kwargs
Outputs generate() returns str prediction; generate_inner() returns (int, str, str) tuple

Usage Examples

# Example instantiation
model = MUGUWrapper(model='mug-u')
response = model.generate(message)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment