From f1a5a523dbffcc2009b3a1681c90746912f6dbdd Mon Sep 17 00:00:00 2001 From: Yuan Yao Date: Fri, 2 Feb 2024 12:37:11 +0800 Subject: [PATCH 1/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3adb0e6..7a90035 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ - 🔥 **Strong Performance.** - OmniLMM-12B achieves **leading performance** among models with comparable sizes, surpassing established LMMs on multiple benchmarks (including MME, MMBench, SEED-Bench, etc). + OmniLMM-12B achieves **leading performance** among models with comparable sizes, surpassing established LMMs on multiple benchmarks (including MME, MMBench, SEED-Bench, etc). The model also endows rich multi-modal world knowledge. - 🏆 **Trustworthy Behavior.** From 16c7cf796866af2d14c17bae0d9f8068996d4573 Mon Sep 17 00:00:00 2001 From: yiranyyu <2606375857@qq.com> Date: Fri, 2 Feb 2024 12:53:58 +0800 Subject: [PATCH 2/6] update readme --- README_zh.md | 88 ++++++++++++++++++++++++++++------------------------ 1 file changed, 48 insertions(+), 40 deletions(-) diff --git a/README_zh.md b/README_zh.md index b3f449a..270f0f5 100644 --- a/README_zh.md +++ b/README_zh.md @@ -22,19 +22,33 @@ [English Document](./README.md) ## 目录 -- [OmniLMM-12B](#omnilmm-12b) -- [OmniLMM-3B](#omnilmm-3b) -- [体验](#demo) -- [安装](#install) -- [推理](#inference) -- [模型库](#model-zoo) + +- [目录](#目录) +- [OmniLMM-12B](#omnilmm-12b) + - [性能评估](#性能评估) + - [样例展示](#样例展示) +- [OmniLMM-3B](#omnilmm-3b) + - [Evaluation](#evaluation) + - [样例展示](#样例展示-1) +- [体验](#体验) +- [安装](#安装) +- [推理](#推理) + - [模型库](#模型库) + - [多轮对话](#多轮对话) +- [✅ 未来计划](#-未来计划) +- [模型协议](#模型协议) +- [声明](#声明) +- [🏫 机构](#-机构) + + + ## OmniLMM-12B **OmniLMM-12B** 是当前系列中性能最强大的版本。该模型使用一个感知重采样层连接 EVA02-5B 和 Zephyr-7B-β 来构建,采用了课程学习的方法在多模态数据上进行训练。该模型具有三个显著特征: - 🔥 **卓越性能。** - OmniLMM-12B 相比其他同规模模型在多个基准测试中取得**领先的性能**(包括 MME、MMBench、SEED-Bench 等)。模型掌握了**丰富的多模态世界知识**。 + OmniLMM-12B 相比其他同规模模型在多个基准测试中取得**领先的性能**(包括 MME、MMBench、SEED-Bench 等)。 - 🏆 **可信行为。** @@ -46,6 +60,12 @@ ### 性能评估 +
+ +
+
+ MME, MMBench, MMMU, MMBench, MMHal-Bench, Object HalBench, SeedBench, LLaVA Bench W, MathVista 上的详细评测结果. + @@ -149,7 +169,22 @@
†: 闭源模型 +
+### 样例展示 + + +

+ +

+
+ + +我们结合 OmniLMM-12B 和 GPT-3.5 (纯文本模型) 构建了一个 **实时多模态交互助手**. OmniLMM-12B 将视频帧转为对应的图像描述并输入给 GPT-3.5 来生成对用户指令的响应。**以下展示视频未经任何视频编辑**。 + +
+
## OmniLMM-3B @@ -283,8 +318,8 @@ pip install -r requirements.txt | 模型 | 简介 | 下载链接 | |:----------------------|:-------------------|:---------------:| -| OmniLMM-12B | 更强大的性能表现 | [🤗](https://huggingface.co/openbmb/OmniLMM-12B)    | -| OmniLMM-3B | 支持终端设备上的高效部署,性能优秀 | [🤗](https://huggingface.co/openbmb/MiniCPM-V)    | +| OmniLMM-12B | 更强大的性能表现 | [🤗](https://huggingface.co/openbmb/OmniLMM-12B)    [](https://modelscope.cn/models/OpenBMB/OmniLMM-12B/files) | +| OmniLMM-3B | 支持终端设备上的高效部署,性能优秀 | [🤗](https://huggingface.co/openbmb/MiniCPM-V)    [](https://modelscope.cn/models/OpenBMB/MiniCPM-V/files) | ### 多轮对话 @@ -295,17 +330,16 @@ pip install -r requirements.txt -##### OmniLMM-12B ```python from chat import OmniLMMChat, img2base64 -chat_model = OmniLMMChat('openbmb/OmniLMM-12B') +chat_model = OmniLMMChat('openbmb/OmniLMM-12B') # or 'openbmb/MiniCPM-V' im_64 = img2base64('./assets/COCO_test2015_000000262144.jpg') # First round chat -msgs = [{"role": "user", "content": "What are the people doing?"}] +msgs = [{"role": "user", "content": "What are the people doing?"}] # or Chinese input [{"role": "user", "content": "请描述一下图像"}] inputs = {"image": im_64, "question": json.dumps(msgs)} answer = chat_model.process(inputs) @@ -321,37 +355,13 @@ answer = chat_model.process(inputs) print(answer) ``` -We can obtain the following results: +可以得到以下输出: ``` "The people in the image are playing baseball. One person is pitching a ball, another one is swinging a bat to hit it, and there's also an umpire present who appears to be watching the game closely." "The image depicts a baseball game in progress. A pitcher is throwing the ball, while another player is swinging his bat to hit it. An umpire can be seen observing the play closely." ``` -##### OmniLMM-3B -```python -import torch -from PIL import Image -from transformers import AutoModel, AutoTokenizer - -model_path='openbmb/MiniCPM-V' -model = AutoModel.from_pretrained(model_path, trust_remote_code=True).to(dtype=torch.bfloat16) -tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True) -model.eval().cuda() - -image = Image.open('./assets/COCO_test2015_000000262144.jpg').convert('RGB') - -question = '请描述一下该图像' -res, context, _ = model.chat( - image=image, - question=question, - context=None, - tokenizer=tokenizer, - sampling=True, - temperature=0.7 -) -print(res) -``` ## ✅ 未来计划 @@ -376,9 +386,7 @@ OmniLMMs 模型权重对学术研究完全开放。 作为多模态大模型,OmniLMMs 通过学习大量的多模态语料来生成内容,但它无法理解、表达个人观点或价值判断,它所输出的任何内容都不代表模型开发者的观点和立场。 -因此用户在使用 OmniLMMs 生成的内容时,应自行负责对其进行评估和验证。 - -如果由于使用 OmniLMMs 开源模型而导致的任何问题,包括但不限于数据安全问题、公共舆论风险,或模型被误导、滥用、传播或不当利用所带来的任何风险和问题,我们将不承担任何责任。 +因此用户在使用 OmniLMMs 生成的内容时,应自行负责对其进行评估和验证。如果由于使用 OmniLMMs 开源模型而导致的任何问题,包括但不限于数据安全问题、公共舆论风险,或模型被误导、滥用、传播或不当利用所带来的任何风险和问题,我们将不承担任何责任。 ## 🏫 机构 From 2451a58e0701f5909290781f9de30f45aef81370 Mon Sep 17 00:00:00 2001 From: yiranyyu <2606375857@qq.com> Date: Fri, 2 Feb 2024 12:54:41 +0800 Subject: [PATCH 3/6] update readme --- README_zh.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README_zh.md b/README_zh.md index e0e6b32..bae8ce5 100644 --- a/README_zh.md +++ b/README_zh.md @@ -48,7 +48,7 @@ - 🔥 **卓越性能。** - OmniLMM-12B 相比其他同规模模型在多个基准测试中取得**领先的性能**(包括 MME、MMBench、SEED-Bench 等)。 + OmniLMM-12B 相比其他同规模模型在多个基准测试中取得**领先的性能**(包括 MME、MMBench、SEED-Bench 等)。模型掌握了丰富的多模态世界知识。 - 🏆 **可信行为。** From dc65c639e1f68dc1171170299af5d931c201d2fa Mon Sep 17 00:00:00 2001 From: yiranyyu <2606375857@qq.com> Date: Fri, 2 Feb 2024 12:55:56 +0800 Subject: [PATCH 4/6] update readme --- README_zh.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README_zh.md b/README_zh.md index bae8ce5..20ab13d 100644 --- a/README_zh.md +++ b/README_zh.md @@ -29,7 +29,7 @@ - [性能评估](#性能评估) - [样例展示](#样例展示) - [OmniLMM-3B](#omnilmm-3b) - - [Evaluation](#evaluation) + - [性能评估](#性能评估-1) - [样例展示](#样例展示-1) - [体验](#体验) - [安装](#安装) @@ -202,7 +202,7 @@ OmniLMM-3B 是**第一个支持英语和中文双语多模态交互的终端可部署 LMM**。这是通过跨语言泛化多模态能力实现的,这是我们 ICLR 2024 [spotlight 论文](https://arxiv.org/abs/2308.12038)中的一项技术。 -### Evaluation +### 性能评估
@@ -288,7 +288,7 @@ ## 体验 -你可以通过以下链接尝试使用我们的网页端推理服务: [OmniLMM-12B](http://120.92.209.146:8081) | [OmniLMM-3B](http://120.92.209.146:80). +你可以通过以下链接使用我们的网页端推理服务: [OmniLMM-12B](http://120.92.209.146:8081) | [OmniLMM-3B](http://120.92.209.146:80). ## 安装 From 288d0722ac3bb1257d880121ad45624c73a1c7ad Mon Sep 17 00:00:00 2001 From: yiranyyu <2606375857@qq.com> Date: Fri, 2 Feb 2024 13:01:03 +0800 Subject: [PATCH 5/6] update readme zh --- README_zh.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README_zh.md b/README_zh.md index 20ab13d..f22f9fa 100644 --- a/README_zh.md +++ b/README_zh.md @@ -188,11 +188,11 @@ ## OmniLMM-3B -**OmniLMM-3B**(即 MiniCPM-V)是一种我们的高效率版本模型,可用于终端机器上的部署。该模型基于 SigLip-400M 和 MiniCPM-2.4B 构建,通过感知器重采样器连接。OmniLMM-3B的显著特点包括: +**OmniLMM-3B**(即 MiniCPM-V)是我们的高效率版本模型,可用于终端机器上的部署。该模型基于 SigLip-400M 和 MiniCPM-2.4B 构建,通过感知器重采样器连接。OmniLMM-3B的显著特点包括: - ⚡️ **高效率。** - OmniLMM-3B 可以**高效地部署在大多数GPU卡和个人电脑上**,甚至**在移动手机等终端设备上**。在视觉编码方面,我们通过感知器重采样器将图像表示压缩为 64 个 token,远远少于基于MLP架构的其他LMMs(通常大于 512 个 token)。这使得 OmniLMM-3B 在推理期间**内存成本更低且速度更快**。 + OmniLMM-3B 可以**高效地部署在大多数GPU卡和个人电脑上**,甚至**在移动手机等终端设备上**。在视觉编码方面,我们通过感知器重采样器将图像表示压缩为 64 个 token,远远少于基于 MLP 架构的其他 LMMs(通常大于 512 个 token)。这使得 OmniLMM-3B 在推理期间**内存成本更低且速度更快**。 - 🔥 **优秀的性能。** From 89c949b3cb2f2b29bb811c9750632ba659361861 Mon Sep 17 00:00:00 2001 From: yiranyyu <2606375857@qq.com> Date: Fri, 2 Feb 2024 13:15:21 +0800 Subject: [PATCH 6/6] update readme --- README_zh.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README_zh.md b/README_zh.md index f22f9fa..423404c 100644 --- a/README_zh.md +++ b/README_zh.md @@ -192,15 +192,15 @@ - ⚡️ **高效率。** - OmniLMM-3B 可以**高效地部署在大多数GPU卡和个人电脑上**,甚至**在移动手机等终端设备上**。在视觉编码方面,我们通过感知器重采样器将图像表示压缩为 64 个 token,远远少于基于 MLP 架构的其他 LMMs(通常大于 512 个 token)。这使得 OmniLMM-3B 在推理期间**内存成本更低且速度更快**。 + OmniLMM-3B 可以**高效地部署在大多数 GPU 和个人电脑上**,甚至**是移动手机等终端设备**。在视觉编码方面,我们通过感知器重采样器将图像表示压缩为 64 个 token,远远少于基于 MLP 架构的其他 LMMs(通常大于 512 个 token)。这使得 OmniLMM-3B 在推理期间**内存成本更低且速度更快**。 - 🔥 **优秀的性能。** - OmniLMM-3B 在与相似大小模型相比的多个基准测试中实现了**最先进的性能**,超过了基于 Phi-2构建的现有 LMMs。它甚至**实现了与9.6B Qwen-VL-Chat 相媲美或更好的性能**。 + OmniLMM-3B 在多个基准测试中实现了与相似大小模型相比**最先进的性能**,超过了基于 Phi-2 构建的LMMs。它甚至**实现了与9.6B Qwen-VL-Chat 相媲美或更好的性能**。 - 🙌 **双语支持。** - OmniLMM-3B 是**第一个支持英语和中文双语多模态交互的终端可部署 LMM**。这是通过跨语言泛化多模态能力实现的,这是我们 ICLR 2024 [spotlight 论文](https://arxiv.org/abs/2308.12038)中的一项技术。 + 借助于我们在 ICLR 2024 [spotlight 论文](https://arxiv.org/abs/2308.12038) 中提出的跨语言多模态能力泛化技术, OmniLMM-3B 是**第一个支持英语和中文双语多模态交互的终端可部署 LMM**。 ### 性能评估