[LLM:Feature] Add Segment Mode, Speed up metal llm for 30%-100% - #4543
Open
jxt1234 wants to merge 1 commit into
Open
[LLM:Feature] Add Segment Mode, Speed up metal llm for 30%-100%#4543jxt1234 wants to merge 1 commit into
jxt1234 wants to merge 1 commit into
Conversation
jxt1234
force-pushed
the
feature/llm_mini
branch
2 times, most recently
from
June 15, 2026 11:02
4418abe to
bebbc9a
Compare
jxt1234
force-pushed
the
feature/llm_mini
branch
from
June 16, 2026 02:43
bebbc9a to
a58b9d6
Compare
jxt1234
force-pushed
the
feature/llm_mini
branch
from
June 18, 2026 02:42
a58b9d6 to
13e553a
Compare
Collaborator
|
这个 PR 的优化方向很有价值,尤其是针对小模型 GPU decode 场景,RoPE 融合、减少 NC4HW4 来回转换、TopK/embedding/logit 拆分这些点都比较关键。 不过建议考虑把改动拆开提交/合并,降低 review 和回归定位成本:
这样拆分后,基础优化可以先沉淀到主路径中,也方便定位是否是 backend primitive、layout pass、converter,还是 SegmentLlm runtime 引入的问题。整体方向支持,但建议不要把通用底座能力和新的 segment 运行路径绑在一个大 PR 里一次性合入。 |
jxt1234
force-pushed
the
feature/llm_mini
branch
3 times, most recently
from
June 22, 2026 08:49
9c8fdb6 to
af7843c
Compare
jxt1234
force-pushed
the
feature/llm_mini
branch
from
June 22, 2026 09:55
af7843c to
7765083
Compare
Collaborator
|
感谢继续推进这个优化。不过当前 PR 仍然没有按照之前的建议拆分:通用算子/后端能力、safetensors converter、SegmentLlm runtime 和导出流程仍集中在同一个提交中,目前涉及 37 个文件、约 8K 行新增代码。 此外,该分支已经落后 master 约 107 个提交并存在冲突,继续在原 PR 上整体 rebase 和评审的成本会比较高。建议关闭或保留这个 PR 作为讨论记录,然后重新提交至少两个独立 PR:
这样通用优化可以先合入,也便于定位后续回归。拆分后我们可以按顺序继续 review,谢谢! |
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
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.
Description
Module
Type
Checklist
[Module:Type] Descriptionformat