Emova Qwen 2 5 3b Hf
EMOVA是一種端到端全能模態大語言模型,支持視覺、聽覺和語音功能,具備情感語音對話能力。
下載量 101
發布時間 : 3/11/2025
模型概述
EMOVA是一種新穎的端到端全能模態大語言模型,無需依賴外部模型即可實現視覺、聽覺和語音功能。通過接收全能模態(即文本、視覺和語音)輸入,EMOVA能夠利用語音解碼器和風格編碼器生成帶有生動情感控制的文本和語音響應。
模型特點
全能模態性能
在視覺語言和語音基準測試中同時達到頂尖可比結果,支持文本、視覺和語音輸入輸出。
情感語音對話
採用語義-聲學解耦的語音分詞器和輕量級風格控制模塊,支持雙語(中文和英文)語音對話和24種語音風格控制。
多樣化配置
提供3B/7B/72B三種配置,支持不同計算預算下的全能模態使用。
模型能力
視覺語言理解
語音識別
情感語音生成
多模態對話
圖像描述生成
文檔理解
圖表理解
數學問題解答
使用案例
智能助手
情感化語音助手
構建能夠理解用戶情感並做出相應語音回應的智能助手
支持24種語音風格控制
教育
多模態學習輔助
幫助學生理解圖表、數學問題和科學概念
在ScienceQA-Img上達到92.7%準確率
客戶服務
情感化客服機器人
提供帶有情感色彩的客戶服務對話
支持中文和英文雙語服務
🚀 EMOVA-Qwen-2.5-3B-HF
EMOVA-Qwen-2.5-3B-HF 是一款端到端的全模態大語言模型,無需依賴外部模型,就能實現視覺、聽覺和語言交互。它能根據文本、視覺和語音等多模態輸入,生成文本和語音響應,並實現生動的情感控制。該模型具備通用的全模態理解和生成能力,在高級視覺語言理解、情感語音對話以及結構化數據理解的語音對話方面表現出色。
🚀 快速開始
本倉庫包含以 HuggingFace 格式組織的 EMOVA-Qwen2.5-3B 檢查點,因此可以使用 transformers Auto APIs 直接加載。
from transformers import AutoModel, AutoProcessor
from PIL import Image
import torch
### Uncomment if you want to use Ascend NPUs
# import torch_npu
# from torch_npu.contrib import transfer_to_npu
# prepare models and processors
model = AutoModel.from_pretrained(
"Emova-ollm/emova-qwen-2-5-3b-hf",
torch_dtype=torch.bfloat16,
attn_implementation='flash_attention_2', # OR 'sdpa' for Ascend NPUs
low_cpu_mem_usage=True,
trust_remote_code=True).eval().cuda()
processor = AutoProcessor.from_pretrained("Emova-ollm/emova-qwen-2-5-3b-hf", trust_remote_code=True)
# only necessary for spoken dialogue
# Note to inference with speech inputs/outputs, **emova_speech_tokenizer** is still a necessary dependency (https://huggingface.co/Emova-ollm/emova_speech_tokenizer_hf#install).
speeck_tokenizer = AutoModel.from_pretrained("Emova-ollm/emova_speech_tokenizer_hf", torch_dtype=torch.float32, trust_remote_code=True).eval().cuda()
processor.set_speech_tokenizer(speeck_tokenizer)
# Example 1: image-text
inputs = dict(
text=[
{"role": "system", "content": [{"type": "text", "text": "You are a helpful assistant."}]},
{"role": "user", "content": [{"type": "image"}, {"type": "text", "text": "What's shown in this image?"}]},
{"role": "assistant", "content": [{"type": "text", "text": "This image shows a red stop sign."}]},
{"role": "user", "content": [{"type": "text", "text": "Describe the image in more details."}]},
],
images=Image.open('path/to/image')
)
# Example 2: text-audio
inputs = dict(
text=[{"role": "system", "content": [{"type": "text", "text": "You are a helpful assistant."}]}],
audios='path/to/audio'
)
# Example 3: image-text-audio
inputs = dict(
text=[{"role": "system", "content": [{"type": "text", "text": "You are a helpful assistant."}]}],
images=Image.open('path/to/image'),
audios='path/to/audio'
)
# run processors
has_speech = 'audios' in inputs.keys()
inputs = processor(**inputs, return_tensors="pt")
inputs = inputs.to(model.device)
# prepare generation arguments
gen_kwargs = {"max_new_tokens": 4096, "do_sample": False} # add if necessary
speech_kwargs = {"speaker": "female", "output_wav_prefix": "output"} if has_speech else {}
# run generation
# for speech outputs, we will return the saved wav paths (c.f., output_wav_prefix)
with torch.no_grad():
outputs = model.generate(**inputs, **gen_kwargs)
outputs = outputs[:, inputs['input_ids'].shape[1]:]
print(processor.batch_decode(outputs, skip_special_tokens=True, **speech_kwargs))
✨ 主要特性
- 先進的全模態性能:EMOVA 在 視覺語言 和 語音 基準測試中同時取得了先進的可比結果。表現最佳的 EMOVA-72B 模型甚至超越了包括 GPT-4o 和 Gemini Pro 1.5 在內的商業模型。
- 情感語音對話:採用了 語義 - 聲學解耦 的語音分詞器和輕量級的 風格控制 模塊,實現了無縫的全模態對齊和多樣化的語音風格控制。EMOVA 支持 雙語(中文和英文) 語音對話,具備 24 種語音風格 控制(即 2 種說話者、3 種音高和 4 種情感)。
- 多樣化的配置:開源了 3 種配置,即 EMOVA-3B/7B/72B,以支持不同計算預算下的全模態使用。可以查看 模型庫,為計算設備找到最合適的模型!
📦 安裝指南
文檔未提及安裝步驟,故跳過該章節。
💻 使用示例
基礎用法
# 以下是使用 EMOVA-Qwen-2.5-3B-HF 進行圖像 - 文本交互的示例代碼
from transformers import AutoModel, AutoProcessor
from PIL import Image
import torch
### Uncomment if you want to use Ascend NPUs
# import torch_npu
# from torch_npu.contrib import transfer_to_npu
# prepare models and processors
model = AutoModel.from_pretrained(
"Emova-ollm/emova-qwen-2-5-3b-hf",
torch_dtype=torch.bfloat16,
attn_implementation='flash_attention_2', # OR 'sdpa' for Ascend NPUs
low_cpu_mem_usage=True,
trust_remote_code=True).eval().cuda()
processor = AutoProcessor.from_pretrained("Emova-ollm/emova-qwen-2-5-3b-hf", trust_remote_code=True)
# only necessary for spoken dialogue
# Note to inference with speech inputs/outputs, **emova_speech_tokenizer** is still a necessary dependency (https://huggingface.co/Emova-ollm/emova_speech_tokenizer_hf#install).
speeck_tokenizer = AutoModel.from_pretrained("Emova-ollm/emova_speech_tokenizer_hf", torch_dtype=torch.float32, trust_remote_code=True).eval().cuda()
processor.set_speech_tokenizer(speeck_tokenizer)
# Example 1: image-text
inputs = dict(
text=[
{"role": "system", "content": [{"type": "text", "text": "You are a helpful assistant."}]},
{"role": "user", "content": [{"type": "image"}, {"type": "text", "text": "What's shown in this image?"}]},
{"role": "assistant", "content": [{"type": "text", "text": "This image shows a red stop sign."}]},
{"role": "user", "content": [{"type": "text", "text": "Describe the image in more details."}]},
],
images=Image.open('path/to/image')
)
# run processors
has_speech = 'audios' in inputs.keys()
inputs = processor(**inputs, return_tensors="pt")
inputs = inputs.to(model.device)
# prepare generation arguments
gen_kwargs = {"max_new_tokens": 4096, "do_sample": False} # add if necessary
speech_kwargs = {"speaker": "female", "output_wav_prefix": "output"} if has_speech else {}
# run generation
# for speech outputs, we will return the saved wav paths (c.f., output_wav_prefix)
with torch.no_grad():
outputs = model.generate(**inputs, **gen_kwargs)
outputs = outputs[:, inputs['input_ids'].shape[1]:]
print(processor.batch_decode(outputs, skip_special_tokens=True, **speech_kwargs))
高級用法
# 以下是使用 EMOVA-Qwen-2.5-3B-HF 進行圖像 - 文本 - 音頻交互的示例代碼
from transformers import AutoModel, AutoProcessor
from PIL import Image
import torch
### Uncomment if you want to use Ascend NPUs
# import torch_npu
# from torch_npu.contrib import transfer_to_npu
# prepare models and processors
model = AutoModel.from_pretrained(
"Emova-ollm/emova-qwen-2-5-3b-hf",
torch_dtype=torch.bfloat16,
attn_implementation='flash_attention_2', # OR 'sdpa' for Ascend NPUs
low_cpu_mem_usage=True,
trust_remote_code=True).eval().cuda()
processor = AutoProcessor.from_pretrained("Emova-ollm/emova-qwen-2-5-3b-hf", trust_remote_code=True)
# only necessary for spoken dialogue
# Note to inference with speech inputs/outputs, **emova_speech_tokenizer** is still a necessary dependency (https://huggingface.co/Emova-ollm/emova_speech_tokenizer_hf#install).
speeck_tokenizer = AutoModel.from_pretrained("Emova-ollm/emova_speech_tokenizer_hf", torch_dtype=torch.float32, trust_remote_code=True).eval().cuda()
processor.set_speech_tokenizer(speeck_tokenizer)
# Example 3: image-text-audio
inputs = dict(
text=[{"role": "system", "content": [{"type": "text", "text": "You are a helpful assistant."}]}],
images=Image.open('path/to/image'),
audios='path/to/audio'
)
# run processors
has_speech = 'audios' in inputs.keys()
inputs = processor(**inputs, return_tensors="pt")
inputs = inputs.to(model.device)
# prepare generation arguments
gen_kwargs = {"max_new_tokens": 4096, "do_sample": False} # add if necessary
speech_kwargs = {"speaker": "female", "output_wav_prefix": "output"} if has_speech else {}
# run generation
# for speech outputs, we will return the saved wav paths (c.f., output_wav_prefix)
with torch.no_grad():
outputs = model.generate(**inputs, **gen_kwargs)
outputs = outputs[:, inputs['input_ids'].shape[1]:]
print(processor.batch_decode(outputs, skip_special_tokens=True, **speech_kwargs))
📚 詳細文檔
模型信息
屬性 | 詳情 |
---|---|
模型類型 | 多模態大語言模型 |
訓練數據 | Emova-ollm/emova-alignment-7m、Emova-ollm/emova-sft-4m、Emova-ollm/emova-sft-speech-231k |
基礎模型 | Emova-ollm/qwen2vit600m、Emova-ollm/Qwen2.5-3B-Instruct_add_speech_token_4096_nostrip |
性能表現
基準測試 | EMOVA-3B | EMOVA-7B | EMOVA-72B | GPT-4o | VITA 8x7B | VITA 1.5 | 百川全模態 |
---|---|---|---|---|---|---|---|
MME | 2175 | 2317 | 2402 | 2310 | 2097 | 2311 | 2187 |
MMBench | 79.2 | 83.0 | 86.4 | 83.4 | 71.8 | 76.6 | 76.2 |
SEED-Image | 74.9 | 75.5 | 76.6 | 77.1 | 72.6 | 74.2 | 74.1 |
MM-Vet | 57.3 | 59.4 | 64.8 | - | 41.6 | 51.1 | 65.4 |
RealWorldQA | 62.6 | 67.5 | 71.0 | 75.4 | 59.0 | 66.8 | 62.6 |
TextVQA | 77.2 | 78.0 | 81.4 | - | 71.8 | 74.9 | 74.3 |
ChartQA | 81.5 | 84.9 | 88.7 | 85.7 | 76.6 | 79.6 | 79.6 |
DocVQA | 93.5 | 94.2 | 95.9 | 92.8 | - | - | - |
InfoVQA | 71.2 | 75.1 | 83.2 | - | - | - | - |
OCRBench | 803 | 814 | 843 | 736 | 678 | 752 | 700 |
ScienceQA-Img | 92.7 | 96.4 | 98.2 | - | - | - | - |
AI2D | 78.6 | 81.7 | 85.8 | 84.6 | 73.1 | 79.3 | - |
MathVista | 62.6 | 65.5 | 69.9 | 63.8 | 44.9 | 66.2 | 51.9 |
Mathverse | 31.4 | 40.9 | 50.0 | - | - | - | - |
Librispeech (WER↓) | 5.4 | 4.1 | 2.9 | - | 3.4 | 8.1 | - |
🔧 技術細節
文檔未提供相關技術細節,故跳過該章節。
📄 許可證
本模型採用 Apache-2.0 許可證。
📚 引用
@article{chen2024emova,
title={Emova: Empowering language models to see, hear and speak with vivid emotions},
author={Chen, Kai and Gou, Yunhao and Huang, Runhui and Liu, Zhili and Tan, Daxin and Xu, Jing and Wang, Chunwei and Zhu, Yi and Zeng, Yihan and Yang, Kuo and others},
journal={arXiv preprint arXiv:2409.18042},
year={2024}
}
Align Base
ALIGN是一個視覺-語言雙編碼器模型,通過對比學習實現圖像與文本表徵的對齊,利用大規模噪聲數據實現先進的跨模態表徵效果。
多模態對齊
Transformers 英語

A
kakaobrain
78.28k
25
Biomedvlp CXR BERT Specialized
MIT
針對胸部X光領域優化的語言模型,通過改進詞彙表、創新預訓練流程和文本增強技術實現卓越性能
多模態對齊
Transformers 英語

B
microsoft
35.69k
28
Languagebind Image
MIT
LanguageBind是一種以語言為中心的多模態預訓練方法,通過語言作為不同模態之間的紐帶,實現語義對齊。
多模態對齊
Transformers

L
LanguageBind
25.71k
11
Languagebind Video FT
MIT
LanguageBind是一種以語言為中心的多模態預訓練方法,通過語言作為不同模態之間的紐帶,實現視頻、紅外、深度、音頻等多種模態的語義對齊。
多模態對齊
Transformers

L
LanguageBind
22.97k
4
Languagebind Audio FT
MIT
LanguageBind是一種以語言為中心的多模態預訓練方法,通過語言作為不同模態間的紐帶實現語義對齊。
多模態對齊
Transformers

L
LanguageBind
12.59k
1
Languagebind Video Merge
MIT
LanguageBind是一種通過基於語言的語義對齊將視頻-語言預訓練擴展至N模態的多模態模型,獲得了ICLR 2024的接收。
多模態對齊
Transformers

L
LanguageBind
10.96k
4
E5 V
E5-V是基於多模態大語言模型的通用嵌入方法,能夠處理文本和圖像輸入並生成統一的嵌入表示。
多模態對齊
Transformers

E
royokong
5,619
22
M BERT Base ViT B
基於BERT-base-multilingual微調的多語言CLIP文本編碼器,支持69種語言與CLIP視覺編碼器對齊
多模態對齊
M
M-CLIP
3,376
12
M3D CLIP
Apache-2.0
M3D-CLIP是專為3D醫學影像設計的CLIP模型,通過對比損失實現視覺與語言的對齊。
多模態對齊
Transformers

M
GoodBaiBai88
2,962
9
Languagebind Video Huge V1.5 FT
MIT
LanguageBind 是一種通過語言實現多模態語義對齊的預訓練模型,能夠將視頻、音頻、深度、熱成像等多種模態與語言進行綁定,實現跨模態的理解和檢索。
多模態對齊
Transformers

L
LanguageBind
2,711
4
精選推薦AI模型
Llama 3 Typhoon V1.5x 8b Instruct
專為泰語設計的80億參數指令模型,性能媲美GPT-3.5-turbo,優化了應用場景、檢索增強生成、受限生成和推理任務
大型語言模型
Transformers 支持多種語言

L
scb10x
3,269
16
Cadet Tiny
Openrail
Cadet-Tiny是一個基於SODA數據集訓練的超小型對話模型,專為邊緣設備推理設計,體積僅為Cosmo-3B模型的2%左右。
對話系統
Transformers 英語

C
ToddGoldfarb
2,691
6
Roberta Base Chinese Extractive Qa
基於RoBERTa架構的中文抽取式問答模型,適用於從給定文本中提取答案的任務。
問答系統 中文
R
uer
2,694
98