Skip to content

Commit 400b3da

Browse files
committed
Update documentation
1 parent 21cfc20 commit 400b3da

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ models:
9898
You would then set the `VEC_INF_MODEL_CONFIG` path using:
9999

100100
```bash
101-
export VEC_INF_CONFIG=/h/<username>/my-model-config.yaml
101+
export VEC_INF_MODEL_CONFIG=/h/<username>/my-model-config.yaml
102102
```
103103

104104
**NOTE**

docs/index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Vector Inference: Easy inference on Slurm clusters
22

3-
This repository provides an easy-to-use solution to run inference servers on [Slurm](https://slurm.schedmd.com/overview.html)-managed computing clusters using [vLLM](https://docs.vllm.ai/en/latest/). **All scripts in this repository runs natively on the Vector Institute cluster environment**. To adapt to other environments, update the environment variables in [`vec_inf/client/slurm_vars.py`](https://github.com/VectorInstitute/vector-inference/blob/main/vec_inf/client/slurm_vars.py), and the model config for cached model weights in [`vec_inf/config/models.yaml`](https://github.com/VectorInstitute/vector-inference/blob/main/vec_inf/config/models.yaml) accordingly.
3+
This repository provides an easy-to-use solution to run inference servers on [Slurm](https://slurm.schedmd.com/overview.html)-managed computing clusters using [vLLM](https://docs.vllm.ai/en/latest/). **All scripts in this repository runs natively on the Vector Institute cluster environment**. To adapt to other environments, follow the instructions in [Installation](#installation).
44

55
## Installation
66

@@ -11,3 +11,9 @@ pip install vec-inf
1111
```
1212

1313
Otherwise, we recommend using the provided [`Dockerfile`](https://github.com/VectorInstitute/vector-inference/blob/main/Dockerfile) to set up your own environment with the package. The latest image has `vLLM` version `0.8.5.post1`.
14+
15+
If you'd like to use `vec-inf` on your own Slurm cluster, you would need to update the configuration files, there are 3 ways to do it:
16+
* Clone the repository and update the `environment.yaml` and the `models.yaml` file in [`vec_inf/config`](vec_inf/config/), then install from source by running `pip install .`.
17+
* The package would try to look for cached configuration files in your environment before using the default configuration. The default cached configuration directory path points to `/model-weights/vec-inf-shared`, you would need to create an `environment.yaml` and a `models.yaml` following the format of these files in [`vec_inf/config`](vec_inf/config/).
18+
* The package would also look for an enviroment variable `VEC_INF_CONFIG_DIR`. You can put your `environment.yaml` and `models.yaml` in a directory of your choice and set the enviroment variable `VEC_INF_CONFIG_DIR` to point to that location.
19+

docs/user_guide.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ You can also launch your own custom model as long as the model architecture is [
5858
* Your model weights directory naming convention should follow `$MODEL_FAMILY-$MODEL_VARIANT` ($MODEL_VARIANT is OPTIONAL).
5959
* Your model weights directory should contain HuggingFace format weights.
6060
* You should specify your model configuration by:
61-
* Creating a custom configuration file for your model and specify its path via setting the environment variable `VEC_INF_CONFIG`. Check the [default parameters](https://github.com/VectorInstitute/vector-inference/blob/main/vec_inf/config/models.yaml) file for the format of the config file. All the parameters for the model should be specified in that config file.
61+
* Creating a custom configuration file for your model and specify its path via setting the environment variable `VEC_INF_MODEL_CONFIG` (This one will supersede `VEC_INF_CONFIG_DIR` if that is also set). Check the [default parameters](vec_inf/config/models.yaml) file for the format of the config file. All the parameters for the model should be specified in that config file.
62+
* Add your model configuration to the cached `models.yaml` in your cluster environment (if you have write access to the cached configuration directory).
6263
* Using launch command options to specify your model setup.
6364
* For other model launch parameters you can reference the default values for similar models using the [`list` command ](#list-command).
6465

@@ -85,10 +86,10 @@ models:
8586
--max-num-seqs: 256
8687
```
8788
88-
You would then set the `VEC_INF_CONFIG` path using:
89+
You would then set the `VEC_INF_MODEL_CONFIG` path using:
8990

9091
```bash
91-
export VEC_INF_CONFIG=/h/<username>/my-model-config.yaml
92+
export VEC_INF_MODEL_CONFIG=/h/<username>/my-model-config.yaml
9293
```
9394

9495
**NOTE**

0 commit comments

Comments
 (0)