| 1 | --- |
| 2 | title: "vLLM" |
| 3 | description: "Configure vLLM's high-performance inference library with Continue for chat, autocomplete, and embeddings, including setup instructions for Llama3.1, Qwen2.5-Coder, and Nomic Embed models" |
| 4 | --- |
| 5 | |
| 6 | vLLM is an open-source library for fast LLM inference which typically is used to serve multiple users at the same time. It can also be used to run a large model on multiple GPU:s (e.g. when it doesn´t fit in a single GPU). Run their OpenAI-compatible server using `vllm serve`. See their [server documentation](https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html) and the [engine arguments documentation](https://docs.vllm.ai/en/latest/usage/engine_args.html). |
| 7 | |
| 8 | ```shell |
| 9 | vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct |
| 10 | ``` |
| 11 | |
| 12 | ## Chat model |
| 13 | |
| 14 | We recommend configuring **Llama3.1 8B** as your chat model. |
| 15 | |
| 16 | <Tabs> |
| 17 | <Tab title="YAML"> |
| 18 | ```yaml title="config.yaml" |
| 19 | models: |
| 20 | - name: Llama3.1 8B Instruct |
| 21 | provider: vllm |
| 22 | model: meta-llama/Meta-Llama-3.1-8B-Instruct |
| 23 | apiBase: http://<vllm chat endpoint>/v1 |
| 24 | ``` |
| 25 | </Tab> |
| 26 | <Tab title="JSON"> |
| 27 | ```json title="config.json" |
| 28 | { |
| 29 | "models": [ |
| 30 | { |
| 31 | "title": "Llama3.1 8B Instruct", |
| 32 | "provider": "vllm", |
| 33 | "model": "meta-llama/Meta-Llama-3.1-8B-Instruct", |
| 34 | "apiBase": "http://<vllm chat endpoint>/v1" |
| 35 | } |
| 36 | ] |
| 37 | } |
| 38 | ``` |
| 39 | </Tab> |
| 40 | </Tabs> |
| 41 | |
| 42 | ## Autocomplete model |
| 43 | |
| 44 | We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. |
| 45 | |
| 46 | <Tabs> |
| 47 | <Tab title="YAML"> |
| 48 | ```yaml title="config.yaml" |
| 49 | models: |
| 50 | - name: Qwen2.5-Coder 1.5B |
| 51 | provider: vllm |
| 52 | model: Qwen/Qwen2.5-Coder-1.5B |
| 53 | apiBase: http://<vllm autocomplete endpoint>/v1 |
| 54 | roles: |
| 55 | - autocomplete |
| 56 | ``` |
| 57 | </Tab> |
| 58 | <Tab title="JSON"> |
| 59 | ```json title="config.json" |
| 60 | { |
| 61 | "tabAutocompleteModel": { |
| 62 | "title": "Qwen2.5-Coder 1.5B", |
| 63 | "provider": "vllm", |
| 64 | "model": "Qwen/Qwen2.5-Coder-1.5B", |
| 65 | "apiBase": "http://<vllm autocomplete endpoint>/v1" |
| 66 | } |
| 67 | } |
| 68 | ``` |
| 69 | </Tab> |
| 70 | </Tabs> |
| 71 | |
| 72 | ## Embeddings model |
| 73 | |
| 74 | We recommend configuring **Nomic Embed Text** as your embeddings model. |
| 75 | |
| 76 | <Tabs> |
| 77 | <Tab title="YAML"> |
| 78 | ```yaml title="config.yaml" |
| 79 | models: |
| 80 | - name: VLLM Nomad Embed Text |
| 81 | provider: vllm |
| 82 | model: nomic-ai/nomic-embed-text-v1 |
| 83 | apiBase: http://<vllm embed endpoint>/v1 |
| 84 | roles: |
| 85 | - embed |
| 86 | ``` |
| 87 | </Tab> |
| 88 | <Tab title="JSON"> |
| 89 | ```json title="config.json" |
| 90 | { |
| 91 | "embeddingsProvider": { |
| 92 | "provider": "vllm", |
| 93 | "model": "nomic-ai/nomic-embed-text-v1", |
| 94 | "apiBase": "http://<vllm embed endpoint>/v1" |
| 95 | } |
| 96 | } |
| 97 | ``` |
| 98 | </Tab> |
| 99 | </Tabs> |
| 100 | |
| 101 | ## Reranking model |
| 102 | |
| 103 | Continue automatically handles vLLM's response format (which uses `results` instead of `data`). |
| 104 | |
| 105 | [Click here](../../model-roles/reranking) to see a list of reranking model providers. |
| 106 | |
| 107 | The continue implementation uses [OpenAI](../top-level/openai) under the hood. [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Vllm.ts) |