Home

Awesome

WeMM

[πŸ“–δΈ­ζ–‡η‰ˆζœ¬] [πŸ€— HuggingFace]

WeMM is the most recent version of the multimodal large language model introduced by WeChatCV. Capable of engaging in Chinese-English bilingual conversations alongside dynamic high-resolution images, WeMM stands as the most powerful model with 10 billion parameters in the multimodal large language model rankings. Its overall evaluation score (Avg Rank) places it within the top tier. (Refer to vlm_leaderboard)

News πŸš€πŸš€πŸš€

Model Zoo

Vision Large Language Model

ModelDateDownloadNote
WeMM-Chat-2K-CNγ€€2024.06.27πŸ€— HF linkπŸš€πŸš€ Supports image input at a resolution of 2K.
WeMM-Chat-CNγ€€2024.06.21πŸ€— HF linkπŸš€πŸš€ Enhanced bilingual dialogue capabilities in Chinese and English.
WeMM-1.2(VLοΌ‰2024.06.09πŸ€— HF linkπŸš€πŸš€ Ranked first among models with ten billion parameters in all benchmark tests of multimodal large language models.

Multimodal

WeMM is a multimodal language model with bilingual dialogue capabilities in Chinese and English. The evaluation results for its related classic tasks are as follows.

MethodParam(B)Avg ScoreAvg RankMMBench_V11MMStarMMMU_VALMathVistaOCRBenchAI2DHallusionBenchMMVetMMESEEDBench_IMGPOPERealWorldQAScienceQA_TESTCCBenchLLaVABench
GPT-4o,20240513,high82.861.662.856.566382.251.766.52328.776.468.670.697.2
GPT-4v, 20240409,high79.85661.754.765678.643.967.52070.2736857.399.8
WeMM765.113.7375.75745.354.962877.947.5452150.175.986.768.183.34870.9
MiniCPM_Llama3-v2.5865.814.27251.845.854.372578.442.452.82024.672.386.763.589.245.986.7
InternLM-XComposer2-VL76515.3377.656.241.459.553281.24146.72220.474.98363.896.748.272.6
Qwen-VL-Max65.316.7374.649.55243.468475.741.261.82281.772.771.961.38063.582.3
Mini-InternVL-Chat-4B-V1.546418.5369.753.145.154.6639774343.62079.272.281.460.892.659.468.6
IDEFICS2-8B858.92768.949.545.252.262672.339.1341847.671.986.260.788.737.649.1
Qwen-VL-Plus59.728.8766.239.739.837.672665.740.655.72229.865.785.444.673.455.173.7
Phi-3-Vision4.258.329.2765.247.746.144.663778.43944.1150870.983.758.89024.163.9
Mini-InternVL-Chat-2B-V1.5258.929.7365.246.737.441.365269.737.335.51906.169.585.457.984.862.957.3

In all benchmark evaluations, WeMM uses the comprehensive average ranking (Avg Rank) as the primary performance reference indicator due to the significant differences in score distribution among different benchmarks. WeMM ranks first among 10-billion-parameter models and is also in the top tier among all MLLM models.

Parameters < 20BAll VLLM
<img src="./assets/VLM_Leaderboard_20B.png" width="400"><img src="./assets/VLM_Leaderboard_all.png" width="420">

Requirements

For detailed requirements, please refer to requirements.txt.

Inference

Feel free to visit our github for more execution code.

The following code will initiate an interactive interface that allows users to input an image path and prompt to receive a response from WeMM.

import torch
from PIL import Image
from transformers import AutoModel, GenerationConfig

model_path = 'feipengma/WeMM' # the path to the model 
wemm = AutoModel.from_pretrained(model_path, torch_dtype=torch.bfloat16, trust_remote_code=True)
wemm.cuda()
wemm.eval()

query = 'Describe this image.'
image = 'path/to/your/image'
pred = wemm.mm_generate(image, query)
import torch
from PIL import Image
from transformers import AutoModel, GenerationConfig

model_path = 'feipengma/WeMM-Chat-CN'
wemm = AutoModel.from_pretrained(model_path, torch_dtype=torch.bfloat16, trust_remote_code=True)
wemm.cuda()
wemm.eval()

query = 'Why is the ocean blue?'
image = 'path/to/your/image'
pred = wemm.mm_generate(image, query)
import torch
from PIL import Image
from transformers import AutoModel, GenerationConfig

model_path = 'feipengma/WeMM-Chat-2k-CN'
wemm = AutoModel.from_pretrained(model_path, torch_dtype=torch.bfloat16, trust_remote_code=True)
wemm.cuda()
wemm.eval()

query = 'Why is the ocean blue?'
image = 'path/to/your/image'
pred = wemm.mm_generate(image, query)

Example

ζŸ₯ηœ‹δΈ­ζ–‡η€ΊδΎ‹εœ¨[πŸ“–δΈ­ζ–‡η‰ˆζœ¬]

ImageConversation Example
<img src="./assets/sample_1_fig.jpg" width="300"><img src="./assets/sample_1_en.png" width="600">
ImageConversation Example
<img src="./assets/sample_2_fig.png" width="400"><img src="./assets/sample_2_en.png" width="600">
ImageConversation Example
<img src="./assets/sample_4_fig.jpg" width="300"><img src="./assets/sample_4_en.png" width="600">

Acknowledgement

In our WeMM research, we referred to the base vision backbone code incorporating the navit980 structure from Idefics2, as well as the LLM framework from Internlm2. We greatly appreciate the outstanding work of Idefics2 and InternLM2.

License

This project is released under the MIT license. Parts of this project contain code and models from other sources, which are subject to their respective licenses.

Main Participating Institutions