A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 17, 01:45 UTC
[Doc] add env vars to the doc (#4572)
youkaichao committed
May 2, 2024 at 22:13 UTC
2d7bce9cd5981db146b18a8a95c5a7e0480687bd
3 files changed
+17
docs/source/index.rst
+1
@@ -75,6 +75,7 @@ Documentation
75
serving/deploying_with_docker
76
serving/distributed_serving
77
serving/metrics
78
+ serving/env_vars
79
serving/usage_stats
80
serving/integrations
81
docs/source/serving/env_vars.rst
new
+9
@@ -0,0 +1,9 @@
1
+Environment Variables
2
+========================
3
+
4
+vLLM uses the following environment variables to configure the system:
5
+
6
+.. literalinclude:: ../../../vllm/envs.py
7
+ :language: python
8
+ :start-after: begin-env-vars-definition
9
+ :end-before: end-env-vars-definition
vllm/envs.py
+7
@@ -28,6 +28,11 @@ if TYPE_CHECKING:
28
VLLM_USE_RAY_COMPILED_DAG: bool = False
29
VLLM_WORKER_MULTIPROC_METHOD: str = "spawn"
30
31
+# The begin-* and end* here are used by the documentation generator
32
+# to extract the used env vars.
33
+
34
+# begin-env-vars-definition
35
+
36
environment_variables: Dict[str, Callable[[], Any]] = {
37
# used in distributed environment to determine the master address
38
'VLLM_HOST_IP':
@@ -148,6 +153,8 @@ environment_variables: Dict[str, Callable[[], Any]] = {
153
lambda: os.getenv("VLLM_WORKER_MULTIPROC_METHOD", "spawn"),
154
}
155
156
+# end-env-vars-definition
157
+
158
159
def __getattr__(name):
160
# lazy evaluation of environment variables