From 26b9315c3afba1042b109c425c808eb4b4784567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20=C3=96berg?= Date: Sat, 4 Jan 2025 22:27:17 +0100 Subject: [PATCH 1/6] Added remote instance configuration --- docs/docs/autocomplete/model-setup.md | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/docs/docs/autocomplete/model-setup.md b/docs/docs/autocomplete/model-setup.md index 2312123a0..7d8c98944 100644 --- a/docs/docs/autocomplete/model-setup.md +++ b/docs/docs/autocomplete/model-setup.md @@ -5,6 +5,10 @@ keywords: [model, autocomplete] sidebar_position: 2 --- +:::info +This page recommends models and providers for Autocomplete. Read more about how to set up your `config.json` [here](../reference.md). +::: + ## Best overall experience For the best Autocomplete experience, we recommend using Codestral through the [Mistral API](https://console.mistral.ai/). This model offers high-quality completions with an excellent understanding of code context: @@ -26,7 +30,7 @@ The API keys for Codestral and the general Mistral APIs are different. If you ar ## Local, offline / self-hosted experience -For those preferring local execution or self-hosting,`Qwen2.5-Coder 1.5B` offers a good balance of performance and quality for most users: +For those preferring local execution or self-hosting,`Qwen2.5-Coder 1.5B` offers a good balance of performance and quality for most users (e.g. using [Ollama](../customize/model-providers/top-level/ollama.md) or [LM Studio](../customize/model-providers/more/lmstudio.md)). ```json title="config.json"" { @@ -45,7 +49,20 @@ Have more compute? Use `qwen2.5-coder:7b-base` for potentially higher-quality su For LM Studio users, navigate to the "My Models" section, find your desired model, and copy the path (e.g., `Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF/qwen2.5-coder-1.5b-instruct-q4_k_m.gguf`). Use this path as the `model` value in your configuration. ::: +### Using a remote instance +When using a remote instance you need to set the `"apiBase"` value in the configuration: + +```json title="config.json"" +{ + "tabAutocompleteModel": { + "title": "Qwen2.5-Coder 1.5B", + "model": "qwen2.5-coder:1.5b-base", + "provider": "ollama" + "apiBase": "http://:11434" + } +} +``` ## Other experiences -There are many more models and providers you can use with Autocomplete. Check them out [here](../customize/model-types/autocomplete.md). +There are many more models and providers you can use with Autocomplete. Check them out [here](../customize/model-types/autocomplete.md). You can also see more examples of Autocomplete configuration [here](../customize/deep-dives/autocomplete.md) From 69b5d07e05b982f03eca29357d9a039e9ef3aff0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20=C3=96berg?= Date: Sat, 4 Jan 2025 22:47:56 +0100 Subject: [PATCH 2/6] Added example of remote instance configuration --- .../model-providers/top-level/ollama.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/docs/customize/model-providers/top-level/ollama.md b/docs/docs/customize/model-providers/top-level/ollama.md index e1f3e53e8..d4ab43003 100644 --- a/docs/docs/customize/model-providers/top-level/ollama.md +++ b/docs/docs/customize/model-providers/top-level/ollama.md @@ -53,3 +53,20 @@ We recommend configuring **Nomic Embed Text** as your embeddings model. Ollama currently does not offer any reranking models. [Click here](../../model-types/reranking.md) to see a list of reranking model providers. + +## Setting up a remote instance + +To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json: + +```json title="config.json" +{ + "models": [ + { + "title": "Llama3.1 8B", + "provider": "ollama", + "model": "llama3.1:8b" + "apiBase": "http://:11434" + } + ] +} +``` From 78fcd97dda81375bae56d4a855cd193f2fffabf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20=C3=96berg?= Date: Mon, 6 Jan 2025 10:55:08 +0100 Subject: [PATCH 3/6] Added remote instance example --- docs/docs/customize/model-providers/top-level/ollama.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/customize/model-providers/top-level/ollama.md b/docs/docs/customize/model-providers/top-level/ollama.md index d4ab43003..d2a4749c0 100644 --- a/docs/docs/customize/model-providers/top-level/ollama.md +++ b/docs/docs/customize/model-providers/top-level/ollama.md @@ -54,7 +54,7 @@ Ollama currently does not offer any reranking models. [Click here](../../model-types/reranking.md) to see a list of reranking model providers. -## Setting up a remote instance +## Using a remote instance To configure a remote instance of Ollama, add the `"apiBase"` property to your model in config.json: From 73a5f206ad02cafb087c4acd5abda84b3ab1651d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20=C3=96berg?= Date: Mon, 6 Jan 2025 10:59:16 +0100 Subject: [PATCH 4/6] fix broken link --- docs/docs/customize/model-providers/more/vllm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/customize/model-providers/more/vllm.md b/docs/docs/customize/model-providers/more/vllm.md index 72d79c645..37775b7b1 100644 --- a/docs/docs/customize/model-providers/more/vllm.md +++ b/docs/docs/customize/model-providers/more/vllm.md @@ -1,6 +1,6 @@ # vLLM -Run the OpenAI-compatible server by vLLM 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/models/engine_args.html). +Run the OpenAI-compatible server by vLLM 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). ```shell vllm serve NousResearch/Meta-Llama-3-8B-Instruct --max-model-len 1024 From 6637dcc729ec61df743fa1718b3c070c4ac32ba2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20=C3=96berg?= Date: Mon, 6 Jan 2025 19:31:48 +0100 Subject: [PATCH 5/6] improved vllm docs --- .../customize/model-providers/more/vllm.md | 49 ++++++++++++++++--- 1 file changed, 43 insertions(+), 6 deletions(-) diff --git a/docs/docs/customize/model-providers/more/vllm.md b/docs/docs/customize/model-providers/more/vllm.md index 37775b7b1..db6554b47 100644 --- a/docs/docs/customize/model-providers/more/vllm.md +++ b/docs/docs/customize/model-providers/more/vllm.md @@ -1,22 +1,59 @@ # vLLM -Run the OpenAI-compatible server by vLLM 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). +vLLM is an open-source library for fast LLM inference which typically is used to serve multiple users at the same due its high performance but 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). ```shell -vllm serve NousResearch/Meta-Llama-3-8B-Instruct --max-model-len 1024 +vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct ``` +## Chat model -The continue implementation uses [OpenAI](../top-level/openai.md) under the hood and automatically selects the available model. You only need to set the `apiBase` like this: +We recommend configuring **Llama3.1 8B** as your chat model. ```json title="config.json" { "models": [ { - "title": "My vLLM OpenAI-compatible server", - "apiBase": "http://localhost:8000/v1" + "title": "Llama3.1 8B Instruct", + "provider": "vllm", + "model": "meta-llama/Meta-Llama-3.1-8B-Instruct" + "apiBase": "http:///v1" } ] } ``` -[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Vllm.ts) +## Autocomplete model + +We recommend configuring **Qwen2.5-Coder 1.5B** as your autocomplete model. + +```json title="config.json" +{ + "tabAutocompleteModel": { + "title": "Qwen2.5-Coder 1.5B", + "provider": "vllm", + "model": "Qwen/Qwen2.5-Coder-1.5B" + "apiBase": "http:///v1" + } +} +``` + +## Embeddings model + +We recommend configuring **Nomic Embed Text** as your embeddings model. + +```json title="config.json" +{ + "embeddingsProvider": { + "provider": "vllm", + "model": "nomic-ai/nomic-embed-text-v1" + "apiBase": "http:///v1" + } +} +``` + +## Reranking model + +[Click here](../../model-types/reranking.md) to see a list of reranking model providers. + + +The continue implementation uses [OpenAI](../top-level/openai.md) under the hood. [View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Vllm.ts) From 4282909b0bf780d2347078f20daa6840b375a620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20=C3=96berg?= Date: Mon, 6 Jan 2025 19:34:59 +0100 Subject: [PATCH 6/6] vllm docs improvement --- docs/docs/customize/model-providers/more/vllm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/customize/model-providers/more/vllm.md b/docs/docs/customize/model-providers/more/vllm.md index db6554b47..d54baeb88 100644 --- a/docs/docs/customize/model-providers/more/vllm.md +++ b/docs/docs/customize/model-providers/more/vllm.md @@ -1,6 +1,6 @@ # vLLM -vLLM is an open-source library for fast LLM inference which typically is used to serve multiple users at the same due its high performance but 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). +vLLM is an open-source library for fast LLM inference which typically is used to serve multiple users at the same. 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). ```shell vllm serve meta-llama/Meta-Llama-3.1-8B-Instruct