Skip to content

issue/334 增加AutoInfinilmProcessor基建#335

Open
PanZezhong1725 wants to merge 1 commit intomainfrom
issue/334
Open

issue/334 增加AutoInfinilmProcessor基建#335
PanZezhong1725 wants to merge 1 commit intomainfrom
issue/334

Conversation

@PanZezhong1725
Copy link
Copy Markdown
Collaborator

No description provided.

@PanZezhong1725 PanZezhong1725 changed the title issue/334 add processor infra issue/334 增加AutoInfinilmProcessor基建 Apr 29, 2026
@@ -0,0 +1,34 @@
class InfinilmProcessor:
Copy link
Copy Markdown
Collaborator Author

@PanZezhong1725 PanZezhong1725 Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个文件是核心修改。

多模态模型引入之后,不同模型有不同的处理输入message的逻辑。
处理过程可抽象为三步:

  1. apply chat template:返回文本,注意这里的文本不能直接encode,而需要调用考虑多模态输入的process
  2. process:传入template好的prompt、所有图片视频等,返回processed_input(包含pytorch张量,hf功能限制导致)
  3. batch:将scheduler output中的所有request的processed_input整合成infinicore tensor的batch(比如加入continuous batching所需的输入)

@PanZezhong1725 PanZezhong1725 marked this pull request as ready for review April 29, 2026 08:12
@PanZezhong1725 PanZezhong1725 requested review from a team, ma-hang and wooway777 April 29, 2026 08:12
@PanZezhong1725
Copy link
Copy Markdown
Collaborator Author

九格7B服务测试结果正确:
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant