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

Đang mở
#73 1 bình luận 3 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
10/100
Loại issue
Tài liệu
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
python, pytorch

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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
Ngôn ngữ chính
Python
Star
1k
Fork
65
Merge trung bình
21 giờ 34 phút
Pull request đã merge (30 ngày)
1

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của volcengine/veScale

Tất cả issue của volcengine/veScale

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.