MiniCPM-o-2_6-int4 / README.md
nielsr's picture
nielsr HF Staff
Add license, paper link, GitHub, and project page to model card
e756ed1 verified
|
raw
history blame
2.03 kB
metadata
base_model:
  - openbmb/MiniCPM-o-2_6
datasets:
  - openbmb/RLAIF-V-Dataset
language:
  - multilingual
library_name: transformers
pipeline_tag: any-to-any
tags:
  - minicpm-o
  - omni
  - vision
  - ocr
  - multi-image
  - video
  - custom_code
  - audio
  - speech
  - voice cloning
  - live Streaming
  - realtime speech conversation
  - asr
  - tts
license: apache-2.0

This model is part of the MiniCPM project. For the latest research and technical details, please refer to the technical report: MiniCPM-V 4.5: Cooking Efficient MLLMs via Architecture, Data, and Training Recipe

Code Repository: https://github.com/OpenBMB/MiniCPM-V Project Homepage: https://minicpm-omni-webdemo-us.modelbest.cn/

A GPT-4o Level MLLM for Vision, Speech and Multimodal Live Streaming on Your Phone

MiniCPM-o 2.6 int4

This is the int4 quantized version of MiniCPM-o 2.6.
Running with int4 version would use lower GPU memory (about 9GB).

Prepare code and install AutoGPTQ

We are submitting PR to officially support minicpm-o 2.6 inference

git clone https://github.com/RanchiZhao/AutoGPTQ.git && cd AutoGPTQ
git checkout minicpmo

# install AutoGPTQ
pip install -vvv --no-build-isolation -e .

Usage of MiniCPM-o-2_6-int4

Change the model initialization part to AutoGPTQForCausalLM.from_quantized

import torch
from transformers import AutoModel, AutoTokenizer
from auto_gptq import AutoGPTQForCausalLM

model = AutoGPTQForCausalLM.from_quantized(
    'openbmb/MiniCPM-o-2_6-int4',
    torch_dtype=torch.bfloat16,
    device="cuda:0",
    trust_remote_code=True,
    disable_exllama=True,
    disable_exllamav2=True
)
tokenizer = AutoTokenizer.from_pretrained(
    'openbmb/MiniCPM-o-2_6-int4',
    trust_remote_code=True
)

model.init_tts()

Usage reference MiniCPM-o-2_6#usage