Usage
Use the yeasah vLLM EXL3 plugin
with its vLLM fork,
following the plugin's installation instructions. Install mineru-vl-utils==2.0.7
and Pillow for document extraction. Run from the downloaded model directory:
import osos.environ["EXL3_INT8_GEMV"] = "1"from PIL import Imagefrom vllm import LLMfrom mineru_vl_utils import MinerUClient, MinerULogitsProcessorfrom mineru_vl_utils.post_process import json2md llm = LLM( model=".", dtype="bfloat16", mm_device_do_normalize=False, logits_processors=[MinerULogitsProcessor],)client = MinerUClient( backend="vllm-engine", vllm_llm=llm, image_analysis=True,)blocks = client.two_step_extract(Image.open("document.png").convert("RGB"))print(json2md([dict(block) for block in blocks]))
mm_device_do_normalize=False uses the source image processor's CPU normalization.
The engine uses the packed tied input/output matrix for embedding lookup and generation.
See the original model card
for input formats, intended uses and limitations.
License
Apache-2.0. See LICENSE and NOTICE.