Dự án minh họa cách chia nhỏ mô hình AI (Model Parallelism) giữa hai thiết bị (hoặc hai tiến trình) —
mỗi thiết bị giữ một phần của mạng neural, giao tiếp qua RabbitMQ message broker.
- Mô hình được chia tại điểm
split_pointthành 2 phần:- Device A (device1): xử lý input → tạo activation.
- Device B (device2): nhận activation → tính output, loss, gradient.
- Sau khi backward,
Device2gửi gradient ngược lại choDevice1.
- forward_queue: Device1 ➜ Device2 (activation + label)
- backward_queue: Device2 ➜ Device1 (gradient)
pip install -r requirements.txtdocker compose up -dMở 2 terminal riêng biệt:
python device2.pypython device1.py
