Paper describes heap-based Top-k kernel, but codebase seems to use a different Top-k implementation
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- ドキュメント
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
調査の方向性
論文のセクション 4.1 を読み、python/fmha_sm100/api.py::sparse_topk_select、python/fmha_sm100/csrc/sparse_topk_select.cu、python/fmha_sm100/csrc/include/sparse_topk_select.cuh を通じて公開されている API を追跡してください。説明されている heap ベースの kernel と TensorRT-LLM 方式の実装を比較し、論文の kernel が存在するか、どの実装が意図されているか、またベンチマークの数値を生成したのがどちらかを記録してください。
索引モデルが issue の本文から書いたものです。
説明
Hi, thanks for open-sourcing MSA.
In Section 4.1 of the paper, the Top-k kernel is described as a heap-based implementation:
Each of the warp’s 32 lanes streams a 1/32 stride of the input row and maintains a k-element min-heap in shared memory. The heap root is cached in a register, and insertions are performed with deferred writes. Finally, a k-round shuffle merge combines the 32 local TopK results.
However, in the current codebase I could not find this heap-based Top-k implementation.
The exposed API:
from fmha_sm100 import sparse_topk_select
appears to call:
python/fmha_sm100/api.py::sparse_topk_select
python/fmha_sm100/csrc/sparse_topk_select.cu
python/fmha_sm100/csrc/include/sparse_topk_select.cuh
The implementation in sparse_topk_select.cuh seems to be based on TensorRT-LLM indexerTopK, using histogram/threshold selection plus insertion sort, rather than the per-lane min-heap + shuffle-merge algorithm described in the paper.
Could you clarify:
- Is the heap-based Top-k kernel from the paper included in this repository?
- If yes, where is the implementation located?
- If no, is the current sparse_topk_select implementation intended to replace the paper-described heap-based kernel?
- Are the benchmark numbers in the paper based on the heap-based kernel or the currently released sparse_topk_select kernel?
Thanks!
- 主要言語
- Python
- スター
- 422
- フォーク
- 57
- 平均マージ
- 15時間 50分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
MiniMax-AI/MSA のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
MiniMax-AI/MSA#8 · コメント 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
MiniMax-AI/MSA#13 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
MiniMax-AI/MSA#3 · リアクション 1 件 ·
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stephrobert/dsoxlab#238 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sublimehq/package_control#1780 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nwg-piotr/nwg-displays#145 ·