@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / e491c7e053
Fork 0

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] update(example model): for OpenAI compatible serving (#4503)

Frαnçois committed May 1, 2024 at 19:14 UTC e491c7e053e5d774f321612b3a400ca2fb424d32
1 file changed +4 -4
docs/source/serving/openai_compatible_server.md
+4 -4
@@ -4,7 +4,7 @@ vLLM provides an HTTP server that implements OpenAI's [Completions](https://plat
4
5 You can start the server using Python, or using [Docker](deploying_with_docker.rst):
6 ```bash
7 -python -m vllm.entrypoints.openai.api_server --model mistralai/Mistral-7B-Instruct-v0.2 --dtype auto --api-key token-abc123
7 +python -m vllm.entrypoints.openai.api_server --model NousResearch/Meta-Llama-3-8B-Instruct --dtype auto --api-key token-abc123
8 ```
9
10 To call the server, you can use the official OpenAI Python client library, or any other HTTP client.
@@ -16,7 +16,7 @@ client = OpenAI(
16 )
17
18 completion = client.chat.completions.create(
19 - model="mistralai/Mistral-7B-Instruct-v0.2",
19 + model="NousResearch/Meta-Llama-3-8B-Instruct",
20 messages=[
21 {"role": "user", "content": "Hello!"}
22 ]
@@ -37,7 +37,7 @@ Or directly merge them into the JSON payload if you are using HTTP call directly
37
38 ```python
39 completion = client.chat.completions.create(
40 - model="mistralai/Mistral-7B-Instruct-v0.2",
40 + model="NousResearch/Meta-Llama-3-8B-Instruct",
41 messages=[
42 {"role": "user", "content": "Classify this sentiment: vLLM is wonderful!"}
43 ],
@@ -87,7 +87,7 @@ In order for the language model to support chat protocol, vLLM requires the mode
87 a chat template in its tokenizer configuration. The chat template is a Jinja2 template that
88 specifies how are roles, messages, and other chat-specific tokens are encoded in the input.
89
90 -An example chat template for `mistralai/Mistral-7B-Instruct-v0.2` can be found [here](https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2#instruction-format)
90 +An example chat template for `NousResearch/Meta-Llama-3-8B-Instruct` can be found [here](https://github.com/meta-llama/llama3?tab=readme-ov-file#instruction-tuned-models)
91
92 Some models do not provide a chat template even though they are instruction/chat fine-tuned. For those model,
93 you can manually specify their chat template in the `--chat-template` parameter with the file path to the chat