|
1 | 1 | # Benchmark DeepSpeed-Chat Training on Lambda Machines |
| 2 | +## Docker based setup: |
2 | 3 |
|
3 | | -## Usage |
| 4 | +#### Step 1: Configure Environment |
| 5 | + |
| 6 | +Create a .env file with your paths: |
| 7 | + |
| 8 | +``` |
| 9 | +cat > .env << EOF |
| 10 | +# HOST PATHS |
| 11 | +HOST_CACHE_PATH=/srv/nfs/staging/.cache |
| 12 | +HOST_REPO_PATH=/srv/nfs/staging/DeepSpeedExamples |
| 13 | +
|
| 14 | +# CONTAINER PATHS (inside Docker) |
| 15 | +PROJECT_PATH=/workspace |
| 16 | +EOF |
| 17 | +``` |
| 18 | + |
| 19 | +Adjust HOST\_CACHE\_PATH and HOST\_REPO\_PATH to match your storage locations. |
| 20 | + |
| 21 | +#### Step 2: Build and Run Container |
| 22 | + |
| 23 | +``` |
| 24 | +make build # Build Docker image |
| 25 | +make run # Start container |
| 26 | +make shell # Enter container shell |
| 27 | +``` |
| 28 | + |
| 29 | +Inside the container, you'll be at /workspace/DeepSpeedExamples/applications/DeepSpeed-Chat/training. |
| 30 | + |
| 31 | +#### Step 3: Run below commands to run training |
| 32 | + |
| 33 | +``` |
| 34 | +./run_batch.sh run_opt-350m_bs24_zero0 hostfiles/1node_1xN/ output/raj_1xN_opt-350m_bs24 3000 |
| 35 | +./run_batch.sh run_opt-13b_bs16_zero0 hostfiles/1node_1xN/ output/raj_1xN_opt-13b_bs16_zero0/ 600 |
| 36 | +``` |
| 37 | + |
| 38 | + |
| 39 | +## Usage (Non-docker based setup) |
4 | 40 |
|
5 | 41 | #### Step 1: Step up the envrionment |
6 | 42 |
|
|
10 | 46 | pip install deepspeed==0.10.0 && \ |
11 | 47 | sudo apt-get update && sudo apt-get install -y python3-pybind11 && \ |
12 | 48 | wget https://raw.githubusercontent.com/LambdaLabsML/DeepSpeedExamples/master/applications/DeepSpeed-Chat/requirements_freeze.txt && \ |
13 | | -pip install --upgrade -r requirements_freeze.txt && \ |
14 | | -rm requirements_freeze.txt |
| 49 | +xargs -a requirements_freeze.txt -I{} sh -c 'pip install --upgrade "{}" || echo "SKIPPED: {}"' |
15 | 50 | ``` |
16 | 51 |
|
17 | 52 | Note: you can blast this installtion across a cluster with the `install_dependencies.sh` script. |
18 | 53 | ``` |
19 | | -./install_dependencies.sh <path-to-list-of-nodes.txt> |
| 54 | +#./install_dependencies.sh <path-to-list-of-nodes.txt> |
| 55 | +#./install_dependencies.sh ./hostfile/1node_1xN |
20 | 56 | ``` |
21 | 57 |
|
22 | 58 | ``` |
|
0 commit comments