[QUESTION] How does veScale FSDP handles 2D FP8 blockwise scaling for RaggedShard

オープン
#73 コメント 1 件 リアクション 3 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
10/100
issue の種類
ドキュメント
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
python, pytorch

調査の方向性

This is a design question about how veScale FSDP shards FP8 weights for the DeepSeek blockwise recipe, not a scoped change. Start by reading the RaggedShard/FSDP parameter sharding path and wherever the FP8 blockwise scaling is applied, then compare it with the to_blocked_128x128 helper quoted in the issue to see whether the permutation happens before sharding, after the all-gather, or not at all. Done means an explanation of whether the permute/unpermute round-trip is required around the AG and how a regular FP8 GEMM is launched on the result — ideally recorded as a doc or comment so the next reader does not have to ask.

索引モデルが issue の本文から書いたものです。

説明

For deepseek FP8 blockwise recipe, the scaling block size for weights is 128x128. Having 2D block scaling means sharding by blocks will make memory incontiguous. Does it mean that we have to go through the following function to "permute" the original [N, K] weight tensor. And then after the parameter AG, do we also need to "unpermute" it such that we can launch a regular FP8 GEMM?

def to_blocked_128x128(a: torch.Tensor) -> torch.Tensor:
    N, K = a.shape
    return a.view(N//128, 128, K//128, 128).permute(0, 2, 1, 3).contiguous()
Image
主要言語
Python
スター
1k
フォーク
65
平均マージ
21時間 34分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

volcengine/veScale のほかの issue

volcengine/veScale の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。