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 BlueLMWrapper

From Leeroopedia
Field Value
source VLMEvalKit
domain Vision, API_Integration

Overview

BlueLMWrapper provides a VLMEvalKit API adapter for the BlueLM vision-language models from Vivo.

Description

BlueLMWrapper inherits from BaseAPI and communicates with the Vivo AI multimodal API endpoint. It supports configurable top_k and top_p sampling parameters, handles image-to-base64 encoding, and includes helper utilities for extracting boxed answers and splitting think-tag content for structured reasoning outputs. Authentication uses the BLUELM_API_KEY environment variable.

Usage

Use this adapter when evaluating BlueLM vision-language models (such as BlueLM-2.5-3B) through the Vivo AI API.

Code Reference

  • Source: vlmeval/api/bluelm_api.py, Lines: L1-234
  • Import: from vlmeval.api.bluelm_api import BlueLMWrapper

Signature:

class BlueLMWrapper(BaseAPI):
    def __init__(self, model='BlueLM-2.5-3B', retry=5, verbose=True,
                 temperature=0.6, system_prompt=None, max_tokens=32768,
                 top_k=20, top_p=0.95, timeout=60, key=None,
                 url='http://api-ai.vivo.com.cn/multimodal', **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 = BlueLMWrapper(model='BlueLM-2.5-3B')
response = model.generate(message)

Related Pages

Page Connections

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