Skip to content

[Doc] update(example model): for OpenAI compatible serving - #4503

Merged
ywang96 merged 2 commits into
vllm-project:mainfrom
fpaupier:main
May 1, 2024
Merged

ywang96 merged 2 commits into
vllm-project:mainfrom
fpaupier:main

Conversation

@fpaupier

Copy link
Copy Markdown
Contributor

Previous reference model model mistralai/Mistral-7B-Instruct-v0.2 in getting started doc required special access to the model card on hugging face, leading to an exception when starting the reference example.

The error with was:

OSError: You are trying to access a gated repo.
Make sure to have access to it at https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2
401 Client Error. 

The new model proposed for the getting started - unsloth/llama-3-8b-Instruct - is publicly available with reasonable performance and runs on commodity hardware. The getting started proposed in the vLLM Quickstart now works.

The previous model was in a gated repo and not available
@fpaupier fpaupier changed the title update(example model): for OpenAI compatible serving [Doc] update(example model): for OpenAI compatible serving Apr 30, 2024

@ywang96 ywang96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simon-mo What do you think of this change? It totally makes sense to me but I'm not sure if you have an alternative model in mind to use in the tutorial.

@mgoin

mgoin commented Apr 30, 2024

Copy link
Copy Markdown
Member

FWIW the NousResearch/Meta-Llama-3-8B-Instruct model seems to be the most downloaded alias to meta-llama/Meta-Llama-3-8B-Instruct and has been updated to include the tokenizer fixes

@simon-mo

Copy link
Copy Markdown
Collaborator

When we added Mistral it doesn't have the gate :((((

I think NousResearch is a good alternative, another one is Zephyr which we uses for testing.

@mgoin mgoin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be good to go after this model alias switch

You can start the server using Python, or using [Docker](deploying_with_docker.rst):
```bash
python -m vllm.entrypoints.openai.api_server --model mistralai/Mistral-7B-Instruct-v0.2 --dtype auto --api-key token-abc123
python -m vllm.entrypoints.openai.api_server --model unsloth/llama-3-8b-Instruct --dtype auto --api-key token-abc123

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
python -m vllm.entrypoints.openai.api_server --model unsloth/llama-3-8b-Instruct --dtype auto --api-key token-abc123
python -m vllm.entrypoints.openai.api_server --model NousResearch/Meta-Llama-3-8B-Instruct --dtype auto --api-key token-abc123


completion = client.chat.completions.create(
model="mistralai/Mistral-7B-Instruct-v0.2",
model="unsloth/llama-3-8b-Instruct",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
model="unsloth/llama-3-8b-Instruct",
model="NousResearch/Meta-Llama-3-8B-Instruct",

```python
completion = client.chat.completions.create(
model="mistralai/Mistral-7B-Instruct-v0.2",
model="unsloth/llama-3-8b-Instruct",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
model="unsloth/llama-3-8b-Instruct",
model="NousResearch/Meta-Llama-3-8B-Instruct",

specifies how are roles, messages, and other chat-specific tokens are encoded in the input.

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)
An example chat template for `unsloth/llama-3-8b-Instruct` can be found [here](https://colab.research.google.com/drive/1Aau3lgPzeZKQ-98h69CCu1UJcvIBLmy2?usp=sharing#scrollTo=vITh0KVJ10qX)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
An example chat template for `unsloth/llama-3-8b-Instruct` can be found [here](https://colab.research.google.com/drive/1Aau3lgPzeZKQ-98h69CCu1UJcvIBLmy2?usp=sharing#scrollTo=vITh0KVJ10qX)
An example chat template for `NousResearch/Meta-Llama-3-8B-Instruct` can be found [here](https://colab.research.google.com/drive/1Aau3lgPzeZKQ-98h69CCu1UJcvIBLmy2?usp=sharing#scrollTo=vITh0KVJ10qX)

@fpaupier

fpaupier commented May 1, 2024

Copy link
Copy Markdown
Contributor Author

good suggestion @mgoin, I updated with the NousResearch model

@ywang96 ywang96 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - Thanks @fpaupier for the update and @mgoin for the model suggestion & review!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants