license: apache-2.0
datasets:
- liuhaotian/LLaVA-CC3M-Pretrain-595K
- liuhaotian/LLaVA-Instruct-150K
- FreedomIntelligence/ALLaVA-4V-Chinese
- shareAI/ShareGPT-Chinese-English-90k
language:
- zh
- en
pipeline_tag: visual-question-answering
360VL 模型卡片
360VL 基于LLama3语言模型开发,同时也是业界首个基于LLama3-70B[🤗Meta-Llama-3-70B-Instruct]的开源大型多模态模型。360VL模型除了应用Llama3语言模型外,还设计了全局感知的多分支投影器架构,使得模型具备更充分的图像理解能力。
Github:https://github.com/360CVGroup/360VL
模型库
360VL已发布以下版本。
特性
360VL具备以下功能特点:
-
多轮图文对话:360VL可以同时接收文本和图像输入,并输出文本内容。当前支持单张图像的多轮视觉问答。
-
双语文本支持:360VL支持中英文双语对话,包括图像中的文字识别。
-
强大的图像理解:360VL擅长分析视觉内容,能高效完成图像信息提取、整理和总结等任务。
-
精细图像分辨率:360VL支持672×672更高分辨率的图像理解。
性能表现
模型 |
检查点 |
MMBT |
MMBD |
MMB-CNT |
MMB-CND |
MMMUV |
MMMUT |
MME |
QWen-VL-Chat |
🤗链接 |
61.8 |
60.6 |
56.3 |
56.7 |
37 |
32.9 |
1860 |
mPLUG-Owl2 |
🤖链接 |
66.0 |
66.5 |
60.3 |
59.5 |
34.7 |
32.1 |
1786.4 |
CogVLM |
🤗链接 |
65.8 |
63.7 |
55.9 |
53.8 |
37.3 |
30.1 |
1736.6 |
Monkey-Chat |
🤗链接 |
72.4 |
71 |
67.5 |
65.8 |
40.7 |
- |
1887.4 |
MM1-7B-Chat |
链接 |
- |
72.3 |
- |
- |
37.0 |
35.6 |
1858.2 |
IDEFICS2-8B |
🤗链接 |
75.7 |
75.3 |
68.6 |
67.3 |
43.0 |
37.7 |
1847.6 |
SVIT-v1.5-13B |
🤗链接 |
69.1 |
- |
63.1 |
- |
38.0 |
33.3 |
1889 |
LLaVA-v1.5-13B |
🤗链接 |
69.2 |
69.2 |
65 |
63.6 |
36.4 |
33.6 |
1826.7 |
LLaVA-v1.6-13B |
🤗链接 |
70 |
70.7 |
68.5 |
64.3 |
36.2 |
- |
1901 |
Honeybee |
链接 |
73.6 |
74.3 |
- |
- |
36.2 |
- |
1976.5 |
YI-VL-34B |
🤗链接 |
72.4 |
71.1 |
70.7 |
71.4 |
45.1 |
41.6 |
2050.2 |
360VL-8B |
🤗链接 |
75.3 |
73.7 |
71.1 |
68.6 |
39.7 |
37.1 |
1944.6 |
360VL-70B |
🤗链接 |
78.1 |
80.4 |
76.9 |
77.7 |
50.8 |
44.3 |
2012.3 |
快速开始 🤗
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
from PIL import Image
checkpoint = "qihoo360/360VL-8B"
model = AutoModelForCausalLM.from_pretrained(checkpoint, torch_dtype=torch.float16, device_map='auto', trust_remote_code=True).eval()
tokenizer = AutoTokenizer.from_pretrained(checkpoint, trust_remote_code=True)
vision_tower = model.get_vision_tower()
vision_tower.load_model()
vision_tower.to(device="cuda", dtype=torch.float16)
image_processor = vision_tower.image_processor
tokenizer.pad_token = tokenizer.eos_token
image = Image.open("docs/008.jpg").convert('RGB')
query = "这个卡通角色是谁?"
terminators = [
tokenizer.convert_tokens_to_ids("<|eot_id|>",)
]
inputs = model.build_conversation_input_ids(tokenizer, query=query, image=image, image_processor=image_processor)
input_ids = inputs["input_ids"].to(device='cuda', non_blocking=True)
images = inputs["image"].to(dtype=torch.float16, device='cuda', non_blocking=True)
output_ids = model.generate(
input_ids,
images=images,
do_sample=False,
eos_token_id=terminators,
num_beams=1,
max_new_tokens=512,
use_cache=True)
input_token_len = input_ids.shape[1]
outputs = tokenizer.batch_decode(output_ids[:, input_token_len:], skip_special_tokens=True)[0]
outputs = outputs.strip()
print(outputs)
模型类型:
360VL-8B是通过在多模态指令跟随数据上微调LLM训练的开源聊天机器人。
它是一个基于Transformer架构的自回归语言模型。
基础LLM: meta-llama/Meta-Llama-3-8B-Instruct
模型日期:
360VL-8B训练于2024年4月。
许可证
本项目使用的部分数据集和检查点受其原始许可证约束,用户须遵守所有原始许可证条款。
本项目内容本身遵循[Apache license 2.0]许可。
模型问题反馈:
https://github.com/360CVGroup/360VL
相关项目
本工作离不开以下项目的开源代码支持,特此致谢!