Skip to content

2025年昇腾AI创新大赛-昇思模型开发挑战赛(S1赛季)--MultiModal赛题--905队提交#112

Open
SHX112 wants to merge 5 commits intomindspore-lab:devfrom
SHX112:dev
Open

2025年昇腾AI创新大赛-昇思模型开发挑战赛(S1赛季)--MultiModal赛题--905队提交#112
SHX112 wants to merge 5 commits intomindspore-lab:devfrom
SHX112:dev

Conversation

@SHX112
Copy link
Copy Markdown

@SHX112 SHX112 commented Dec 2, 2025

Description

2025年昇腾AI创新大赛-昇思模型开发挑战赛(S1赛季)--multimodal赛题--905队提交

Changes

Testing & Benchmark

Checklist

  • Read and followed the Contributing Guidelines.
  • Self-tested locally to ensure the code runs correctly and achieves expected results (all CI checks expected to pass).
  • Updated documentation if needed.
  • Verified accuracy or performance benchmarks if applicable.

Reviewers

@@ -0,0 +1,5 @@
前期曾尝试调换算子api以提升推理性能,发现在精度上和时长上的提升极不明显,最后代码工程的精度无法对齐。
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

文件名应为README.md

@@ -0,0 +1,5 @@
前期曾尝试调换算子api以提升推理性能,发现在精度上和时长上的提升极不明显,最后代码工程的精度无法对齐。
后通过profiler工具,查看到原有的代码中查询特殊token花费的时间非常长.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

写的非常好但是有点简略,可以稍微补充下具体的改动的代码片段. 另外这个优化推荐你也合入到mindspore one代码仓中https://github.com/mindspore-lab/mindone/tree/master/examples/janus/janus.

@qhzhuang
Copy link
Copy Markdown
Collaborator

qhzhuang commented Dec 3, 2025

后通过profiler工具,查看到原有的代码中查询特殊token花费的时间非常长.
查看到源代码中实际的操作为在字典中查询特殊token,尝试重构原有的image_id, image_start_id, image_end_id, 和 pad_id 属性方法。
现在它们直接返回在构造函数中计算好的值,而不是每次调用时都重新查询tokenizer.vocab。
测试结果发现prefill的性能得到极大提升。 No newline at end of file
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

补充下最后得分

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.

2 participants