Skip to content

Commit effe441

Browse files
committed
Document Sync by Tina
1 parent 75e30eb commit effe441

File tree

2 files changed

+43
-20
lines changed

2 files changed

+43
-20
lines changed

docs/stable/getting_started/installation.md

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,35 +9,57 @@ sidebar_position: 0
99
- Python: 3.10
1010
- GPU: compute capability 7.0 or higher
1111

12-
## Install with pip
13-
TODO
12+
## Installing with pip
13+
```bash
14+
# On the head node
15+
conda create -n sllm python=3.10 -y
16+
conda activate sllm
17+
pip install serverless-llm
18+
pip install serverless-llm-store
19+
20+
# On a worker node
21+
conda create -n sllm-worker python=3.10 -y
22+
conda activate sllm-worker
23+
pip install serverless-llm[worker]
24+
pip install serverless-llm-store
25+
```
26+
27+
:::note
28+
If you plan to use vLLM with ServerlessLLM, you need to apply our patch to the vLLM repository. Refer to the [vLLM Patch](#vllm-patch) section for more details.
29+
:::
30+
1431

15-
## Install from source
16-
Install the package from source by running the following commands:
32+
## Installing from source
33+
To install the package from source, follow these steps:
1734
```bash
1835
git clone https://github.com/ServerlessLLM/ServerlessLLM
1936
cd ServerlessLLM
2037
```
2138

2239
```
23-
# head node
40+
# On the head node
2441
conda create -n sllm python=3.10 -y
2542
conda activate sllm
2643
pip install -e .
27-
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ serverless_llm_store==0.0.1.dev5
44+
cd sllm_store && rm -rf build
45+
# Installing `sllm_store` from source can be slow. We recommend using pip install.
46+
pip install .
2847
29-
# worker node
48+
# On a worker node
3049
conda create -n sllm-worker python=3.10 -y
3150
conda activate sllm-worker
3251
pip install -e ".[worker]"
33-
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ serverless_llm_store==0.0.1.dev5
52+
cd sllm_store && rm -rf build
53+
# Installing `sllm_store` from source can be slow. We recommend using pip install.
54+
pip install .
3455
```
3556

3657
# vLLM Patch
37-
To use vLLM with ServerlessLLM, we need to apply our patch `serverless_llm/store/vllm_patch/sllm_load.patch` to the vLLM repository. Currently, the patch is only tested with vLLM version `0.5.0`.
58+
To use vLLM with ServerlessLLM, you need to apply our patch located at `sllm_store/vllm_patch/sllm_load.patch` to the vLLM repository. to the vLLM repository.
59+
The patch has been tested with vLLM version `0.5.0.post1`.
3860

39-
You may do that by running our script:
61+
You can apply the patch by running the following script:
4062
```bash
4163
conda activate sllm-worker
42-
./serverless_llm/store/vllm_patch/patch.sh
64+
./sllm_store/vllm_patch/patch.sh
4365
```

docs/stable/store/quickstart.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,21 @@ conda activate sllm-store
2626

2727
### Install with pip
2828
```bash
29-
pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ serverless_llm_store==0.0.1.dev5
29+
pip install serverless-llm-store
3030
```
3131

3232
### Install from source
3333
1. Clone the repository and enter the `store` directory
3434

3535
``` bash
3636
git clone git@github.com:ServerlessLLM/ServerlessLLM.git
37-
cd ServerlessLLM/serverless_llm/store
37+
cd ServerlessLLM/sllm_store
3838
```
3939

4040
2. Install the package from source
4141

4242
```bash
43+
rm -rf build
4344
pip install .
4445
```
4546

@@ -55,7 +56,7 @@ ln -s /mnt/nvme/models ./models
5556

5657
1. Convert a model to ServerlessLLM format and save it to a local path:
5758
```python
58-
from serverless_llm_store.transformers import save_model
59+
from sllm_store.transformers import save_model
5960

6061
# Load a model from HuggingFace model hub.
6162
import torch
@@ -84,7 +85,7 @@ docker run -it --rm -v $PWD/models:/app/models checkpoint_store_server
8485
```python
8586
import time
8687
import torch
87-
from serverless_llm_store.transformers import load_model
88+
from sllm_store.transformers import load_model
8889

8990
# warm up the GPU
9091
num_gpus = torch.cuda.device_count()
@@ -110,19 +111,19 @@ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
110111
## Usage with vLLM
111112

112113
:::tip
113-
To use ServerlessLLM as the load format for vLLM, you need to apply our patch `serverless_llm/store/vllm_patch/sllm_load.patch` to the installed vLLM library. Therefore, please ensure you have applied our `vLLM Patch` as instructed in [installation guide](../getting_started/installation.md).
114+
To use ServerlessLLM as the load format for vLLM, you need to apply our patch `sllm_store/vllm_patch/sllm_load.patch` to the installed vLLM library. Therefore, please ensure you have applied our `vLLM Patch` as instructed in [installation guide](../getting_started/installation.md).
114115

115116
You may check the patch status by running the following command:
116117
``` bash
117-
./serverless_llm/store/vllm_patch/check_patch.sh
118+
./sllm_store/vllm_patch/check_patch.sh
118119
```
119120
If the patch is not applied, you can apply it by running the following command:
120121
```bash
121-
./serverless_llm/store/vllm_patch/patch.sh
122+
./sllm_store/vllm_patch/patch.sh
122123
```
123124
To remove the applied patch, you can run the following command:
124125
```bash
125-
./serverless_llm/store/vllm_patch/remove_patch.sh
126+
./sllm_store/vllm_patch/remove_patch.sh
126127
```
127128
:::
128129

@@ -219,7 +220,7 @@ downloader = VllmModelDownloader()
219220
downloader.download_vllm_model("facebook/opt-1.3b", "float16", 1)
220221
```
221222

222-
After downloading the model, you can launch the checkpoint store server and load the model in vLLM through `serverless_llm` load format.
223+
After downloading the model, you can launch the checkpoint store server and load the model in vLLM through `sllm` load format.
223224

224225
2. Launch the checkpoint store server in a separate process:
225226
```bash

0 commit comments

Comments
 (0)