[REQUEST] More fine-grained distributed strategies for RLHF training
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
- 25/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- python
- Lĩnh vực
- distributed-systems, machine-learning
Hướng nghiên cứu
Không có tệp repository, test hoặc entry point nào được nêu. Hãy bắt đầu bằng cách xác định pipeline huấn luyện RLHF hiện có và so sánh vị trí của các model trong đó với vị trí được mô tả trong bài báo APP được liên kết trong issue; công việc được xem là hoàn thành khi các chiến lược Separation và Interleaving được đề xuất, bao gồm vị trí phân tán và hành vi ở giai đoạn generation của chúng, đã được tích hợp và kiểm định.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
We find that the generation stage of RLHF pipeline is time-consuming during the current training process. This is because the four models (Actor, Critic, Reward, and Ref) are all colocated on the same devices, utilizing a "Flattening" strategy. This results in that both training and inference runtime are mixed in the current procedure. It disables the training or inference specialized optimization methods. Also, a significant amount of memory is occupied by models, but they are idle in generation stage of actor model. Therefore, instead of collocating these four models on all devices, more fine-grained placement strategy could be utilized.
Describe the solution you'd like
Our team is planning to open-source our implementation of APP (https://arxiv.org/pdf/2312.11819.pdf) and contribute it to the codebase. Specifically, we are proposing two fine-grained model placement strategies:
A Separation strategy that separates the training and inference runtime of the RLHF pipeline with additional shadow models. This enables the adoption of inference-optimized techniques such as vLLM and intra-node tensor parallelism to accelerate the time-cost generation stage. This enables different distributed stragies during the generation stage compared with training stage.
An Interleaving strategy that helps reduce memory redundancy and communication costs in RLHF training by placing models without dependencies on exclusive devices with careful orchestration. For example, inference models like the reward model and reference model could be placed on separate devices. This approach enables the reduction of memory redundancy using the DDP or ZeRO 1-2 by decreasing the scale of participating nodes.
Describe alternatives you've considered
N/A
Additional context
Thank you for sharing the deepspeed-chat with the community! It has been an essential infrastructure, providing an easy-to-use solution for training InstructGPT-like models. Recently, we have made some improvements to further enhance training performance while maintaining the simplicity of usage. These improvements have already been implemented in the RLHF training at Ant Group. In order to share our efforts with the deepspeed-chat community, we would like to integrate our implementation into DeepSpeedExamples codebase.
To facilitate discussions and minimize potential conflicts of interest, we have created this issue to engage in conversations about the proposed modifications. We look forward to collaborating with the community on this matter.
Please feel free to comment here or reach out via email ([email protected]). Thanks!
- Ngôn ngữ chính
- Python
- Star
- 6.8k
- Fork
- 1.1k
- Merge trung bình
- 3 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 5
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của deepspeedai/DeepSpeedExamples
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 52/100
deepspeedai/DeepSpeedExamples#996 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
deepspeedai/DeepSpeedExamples#995 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 52/100
deepspeedai/DeepSpeedExamples#989 ·
-
moe example 404Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
deepspeedai/DeepSpeedExamples#984 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
deepspeedai/DeepSpeedExamples#979 · 6 bình luận ·
Tất cả issue của deepspeedai/DeepSpeedExamples
Issue tương tự
-
needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 83/100
darnitdevorg/darnit#587 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
accessibility good first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 92/100
Maintainer thường phản hồi trong vòng 1 ngày
-
llm translation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug bug-hunt
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 1 ngày