From 4bfa7e7f75eb5b1a397c93aeea1dea1afa867b2a Mon Sep 17 00:00:00 2001 From: Cyrus Leung Date: Tue, 14 May 2024 08:47:42 +0800 Subject: [PATCH] [Doc] Add API reference for offline inference (#4710) --- docs/source/index.rst | 8 +++++++- docs/source/offline_inference/llm.rst | 6 ++++++ .../source/{dev => offline_inference}/sampling_params.rst | 4 ++-- docs/source/serving/openai_compatible_server.md | 4 ++-- 4 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 docs/source/offline_inference/llm.rst rename docs/source/{dev => offline_inference}/sampling_params.rst (55%) diff --git a/docs/source/index.rst b/docs/source/index.rst index 4022c590..e1e81778 100644 --- a/docs/source/index.rst +++ b/docs/source/index.rst @@ -67,6 +67,13 @@ Documentation getting_started/quickstart getting_started/examples/examples_index +.. toctree:: + :maxdepth: 1 + :caption: Offline Inference + + offline_inference/llm + offline_inference/sampling_params + .. toctree:: :maxdepth: 1 :caption: Serving @@ -101,7 +108,6 @@ Documentation :maxdepth: 2 :caption: Developer Documentation - dev/sampling_params dev/engine/engine_index dev/kernel/paged_attention dev/dockerfile/dockerfile diff --git a/docs/source/offline_inference/llm.rst b/docs/source/offline_inference/llm.rst new file mode 100644 index 00000000..1a443ea4 --- /dev/null +++ b/docs/source/offline_inference/llm.rst @@ -0,0 +1,6 @@ +LLM Class +========== + +.. autoclass:: vllm.LLM + :members: + :show-inheritance: diff --git a/docs/source/dev/sampling_params.rst b/docs/source/offline_inference/sampling_params.rst similarity index 55% rename from docs/source/dev/sampling_params.rst rename to docs/source/offline_inference/sampling_params.rst index ef3d1509..f645941a 100644 --- a/docs/source/dev/sampling_params.rst +++ b/docs/source/offline_inference/sampling_params.rst @@ -1,5 +1,5 @@ -Sampling Params -=============== +Sampling Parameters +=================== .. autoclass:: vllm.SamplingParams :members: diff --git a/docs/source/serving/openai_compatible_server.md b/docs/source/serving/openai_compatible_server.md index 15a8761e..a775c6ad 100644 --- a/docs/source/serving/openai_compatible_server.md +++ b/docs/source/serving/openai_compatible_server.md @@ -48,7 +48,7 @@ completion = client.chat.completions.create( ``` ### Extra Parameters for Chat API -The following [sampling parameters (click through to see documentation)](../dev/sampling_params.rst) are supported. +The following [sampling parameters (click through to see documentation)](../offline_inference/sampling_params.rst) are supported. ```{literalinclude} ../../../vllm/entrypoints/openai/protocol.py :language: python @@ -65,7 +65,7 @@ The following extra parameters are supported: ``` ### Extra Parameters for Completions API -The following [sampling parameters (click through to see documentation)](../dev/sampling_params.rst) are supported. +The following [sampling parameters (click through to see documentation)](../offline_inference/sampling_params.rst) are supported. ```{literalinclude} ../../../vllm/entrypoints/openai/protocol.py :language: python