작성: Farruh
생성형 AI(GenAI) 시대에는 대형 언어 모델(LLM)이 더 이상 텍스트에만 국한되지 않습니다. Qwen2.5 Omni와 같은 멀티모달 모델은 텍스트, 이미지, 오디오, 비디오 사이의 간극을 메워 AI가 인간처럼 생각하고, 보고, 듣고, 말할 수 있도록 합니다.
2.Thinker-Talker 아키텍처:
Task | Qwen2.5-Omni | Qwen2.5-VL | GPT-4o-Mini | State-of-the-Art |
---|---|---|---|---|
Image→Text | 59.2(MMMUval) | 58.6 | 60.0 | 53.9(기타) |
Video→Text | 72.4(Video-MME) | 65.1 | 64.8 | 63.9(기타) |
Multimodal Reasoning | 81.8(MMBench) | 해당 없음 | 76.0 | 80.5(기타) |
Speech Generation | 1.42% WER(중국어) | 해당 없음 | 해당 없음 | 2.33%(영어) |
2.“Qwen2.5-Omni”를 검색하고 해당 페이지로 이동합니다.
보안 우선 설정:
python -m venv qwen-env
source qwen-env/bin/activate # Linux/MacOS | Windows: qwen-env\Scripts\activate
pip install openai
.env
파일을 생성:DASHSCOPE_API_KEY=your_api_key_here
OpenAI 라이브러리를 사용하여 Qwen2.5-Omni와 상호 작용:
import os
from openai import OpenAI
client = OpenAI(
api_key=os.getenv("DASHSCOPE_API_KEY"),
base_url="https://dashscope-intl.aliyuncs.com/compatible-mode/v1",
)
# Example: Text + Audio Output
completion = client.chat.completions.create(
model="qwen2.5-omni-7b",
messages=[{"role": "user", "content": "Who are you?"}],
modalities=["text", "audio"], # Specify output formats (text/audio)
audio={"voice": "Chelsie", "format": "wav"},
stream=True, # Enable real-time streaming
stream_options={"include_usage": True},
)
# Process streaming responses
for chunk in completion:
if chunk.choices:
print("Partial response:", chunk.choices[0].delta)
else:
print("Usage stats:", chunk.usage)
기능 | 세부 사항 |
---|---|
입력 유형 | 텍스트, 이미지, 오디오, 동영상(URL/Base64를 통해) |
출력 모달리티 |
modalities 파라미터 지정(예: 이중 출력의 경우 ["text", "audio"] ) |
스트리밍 지원 | 실시간 결과 확인 stream=True
|
보안 | API 키를 위한 환경 변수(.env 파일) |
사용 사례: 감정 인식 기능이 있는 실시간 이벤트 자막.
사용 사례: 이미지와 사용자 리뷰를 바탕으로 제품 설명을 생성합니다.
# 입력: 제품 이미지 + "스페인어로 별점 5개 리뷰 작성"
# 출력: 텍스트 후기 + 스페인어 오디오 버전.
stream=True
를 활성화합니다.GenAI가 발전함에 따라, 멀티모달 기능은 의료에서 엔터테인먼트에 이르기까지 다양한 산업을 지배하게 될 것입니다. Qwen2.5 Omni를 마스터함으로써, 여러분은 인간과 AI의 협력의 다음 시대를 맞이하게 될 것입니다.
지금 바로 실험을 시작하고 혁명에 동참하세요!
이 문서는 영어에서 번역되었습니다. 원본 문서는 여기를 참조하십시오.
108 posts | 4 followers
FollowRegional Content Hub - May 20, 2024
JJ Lim - December 3, 2021
Regional Content Hub - August 12, 2024
JJ Lim - January 20, 2025
Regional Content Hub - December 9, 2024
Edwin Tack - February 21, 2024
108 posts | 4 followers
FollowTop-performance foundation models from Alibaba Cloud
Learn MoreAccelerate AI-driven business and AI model training and inference with Alibaba Cloud GPU technology
Learn MoreAccelerate innovation with generative AI to create new business success
Learn MoreA platform that provides enterprise-level data modeling services based on machine learning algorithms to quickly meet your needs for data-driven operations.
Learn MoreMore Posts by Regional Content Hub