-
Notifications
You must be signed in to change notification settings - Fork 702
FEAT: ovis2 #3170
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
FEAT: ovis2 #3170
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
新增Ovis多模态模型的实现,包括视觉分词器、数据集处理、训练回调等功能模块。主要包含以下内容: 1. 新增视觉分词器(VisualTokenizer)及其配置类,支持多种视觉模型(如CLIP、SigLIP、AIMv2)。 2. 新增多模态数据集处理模块,支持图像和视频数据的预处理及对话格式的处理。 3. 新增训练回调模块,支持监控模型训练状态及调整参数。 4. 新增Ovis模型的配置类及实现,支持多模态输入的处理及生成。 5. 新增工具类,包括常量定义、日志打印、数据预处理等。 这些改动为多模态模型的训练和推理提供了完整的支持。
- 添加流式生成支持,移除 `NotImplementedError` 并实现 `_generate_stream` 方法 - 优化视频输入处理,将视频张量转换为 PIL 图像列表 - 重构 `_generate_chat_data` 方法,提取生成参数准备逻辑
移除`ovis2.py`中多余的注释,使代码更加简洁易读
# Conflicts: # xinference/model/llm/llm_family.json # xinference/model/llm/llm_family_modelscope.json # xinference/model/llm/transformers/core.py
qinxuye
reviewed
Apr 25, 2025
重命名match方法为match_json,以更准确地反映其功能,提升代码的可读性和维护性。
qinxuye
approved these changes
Apr 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Jun-Howie
pushed a commit
to Jun-Howie/inference
that referenced
this pull request
Apr 28, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
fix #3151