🚀 Heron-NVILA-Lite-33B
Heron-NVILA-Lite-33B 是一个基于 NVILA-Lite 架构、为日语训练的视觉语言模型。它能够处理图像和文本信息,在多模态交互方面具有出色的表现。
🚀 快速开始
安装依赖
pip install transformers==4.45.0 accelerate opencv-python torchvision einops pillow
pip install git+https://github.com/bfshi/scaling_on_scales.git
使用示例
from transformers import AutoConfig, AutoModel
model_path = "turing-motors/Heron-NVILA-Lite-33B"
config = AutoConfig.from_pretrained(model_path, trust_remote_code=True)
model = AutoModel.from_config(config, trust_remote_code=True, device_map="auto")
model = AutoModel.from_pretrained(model_path, trust_remote_code=True, device_map="auto")
print(model.tokenizer.chat_template)
response = model.generate_content(["こんにちは"])
print(response)
print("---" * 40)
from PIL import Image
import requests
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw).convert("RGB")
response = model.generate_content([image, "画像を説明してください。"])
print(response)
print("---" * 40)
from PIL import Image
import requests
from transformers import GenerationConfig
generation_config = {
"max_new_tokens": 512,
"temperature": 0.5,
"do_sample": True,
}
generation_config = GenerationConfig(**generation_config)
url = "http://images.cocodataset.org/val2017/000000039769.jpg"
image = Image.open(requests.get(url, stream=True).raw).convert("RGB")
response = model.generate_content(
[image, "画像を説明してください。"],
generation_config=generation_config
)
print(response)
print("---" * 40)
from PIL import Image
import requests
url_list = [
"https://images.unsplash.com/photo-1694831404826-3400c48c188d?q=80&w=2070&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
"https://images.unsplash.com/photo-1693240876439-473af88b4ed7?q=80&w=1974&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D"
]
images = [
Image.open(requests.get(url, stream=True).raw).convert("RGB") for url in url_list
]
response = model.generate_content([
images[0],
"これは日本の画像です",
images[1],
"これはオーストリアの画像です",
"各画像の違いを説明して"])
print(response)
print("---" * 40)
✨ 主要特性
- 多语言支持:支持日语和英语,适用于不同语言环境的用户。
- 多模态处理:能够处理图像和文本信息,实现图像与文本的交互。
- 基于先进架构:基于 NVILA-Lite 架构,具有出色的性能。
📚 详细文档
模型概述
训练总结
评估
使用 llm-jp-eval-mm 进行评估。除 Heron-NVILA-Lite 和 Sarashina2-Vision-14B 之外的模型得分取自 2025 年 3 月的 llm-jp-eval-mm 排行榜 和 Asagi 网站。Heron-NVILA-Lite 和 Sarashina2-Vision-14B 使用 "gpt-4o-2024-05-13" 作为评估标准进行评估。Sarashina2-Vision-14B 在 官方博客 上使用 "gpt-4o-2024-08-06" 进行评估。请注意,由于评估条件不同,Sarashina2-Vision-14B 的结果仅作参考。
🔧 技术细节
此模型基于 NVILA-Lite 架构,结合了视觉编码器 siglip2-so400m-patch16-512 和大语言模型 Qwen2.5-32B-Instruct。通过多阶段的训练,使用了多种数据源,以提高模型在多模态任务中的性能。
⚠️ 风险与限制
此模型仍处于实验阶段,尚未针对道德合规性或法律标准进行全面校准。在敏感应用中使用时请谨慎。
📄 许可证
🙏 致谢
此模型基于新能源产业技术综合开发机构(NEDO)资助的项目 JPNP20017 的研究成果。同时,感谢以下开源仓库的贡献: