hub docs continued
This commit is contained in:
parent
e221134707
commit
f80c4ec62b
8 changed files with 109 additions and 26 deletions
15
docs/docs/customize/model-roles/apply.mdx
Normal file
15
docs/docs/customize/model-roles/apply.mdx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: Apply Role
|
||||
description: Apply model role
|
||||
keywords: [apply, model, role]
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
When editing code, Chat and Edit model output often doesn't clearly align with existing code. A model with the `apply` role is used to generate a more precise diff to apply changes to a file.
|
||||
|
||||
Generally speaking, models proficient in editing can also be used for applying code.
|
||||
|
||||
Explore apply models in [the hub](https://hub.continue.dev/explore/models?roles=apply).
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
---
|
||||
title: Autocomplete model
|
||||
description: Autocomplete model
|
||||
keywords: [autocomplete]
|
||||
sidebar_position: 1
|
||||
title: Autocomplete Role
|
||||
description: Autocomplete model role
|
||||
keywords: [autocomplete, model, role]
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
An "autocomplete model" is an LLM that is trained on a special format called fill-in-the-middle (FIM). This format is designed to be given the prefix and suffix of a code file and predict what goes between. This task is very specific, which on one hand means that the models can be smaller (even a 3B parameter model can perform well). On the other hand, this means that Chat models, though larger, will perform poorly.
|
||||
An "autocomplete model" is an LLM that is trained on a special format called fill-in-the-middle (FIM). This format is designed to be given the prefix and suffix of a code file and predict what goes between. This task is very specific, which on one hand means that the models can be smaller (even a 3B parameter model can perform well). On the other hand, this means that Chat models, though larger, will often perform poorly even with extensive prompting.
|
||||
|
||||
In Continue, these models are used to display inline [Autocomplete](../../autocomplete/how-to-use-it.md) suggestions as you type.
|
||||
In Continue, autocomplete models are used to display inline [Autocomplete](../../autocomplete/how-to-use-it.md) suggestions as you type. Autocomplete models are designated using the `autocomplete` role.
|
||||
|
||||
## Recommended Autocomplete models
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
---
|
||||
title: Chat model
|
||||
description: Chat model
|
||||
keywords: [chat]
|
||||
sidebar_position: 2
|
||||
title: Chat Role
|
||||
description: Chat model role
|
||||
keywords: [chat, model, role]
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
A "chat model" is an LLM that is trained to respond in a conversational format. Because they should be able to answer general questions and generate complex code, the best chat models are typically large, often 405B+ parameters. In Continue, these models are used for [Chat](../../chat/how-to-use-it.md), [Edit](../../edit/how-to-use-it.md), and [Actions](../../actions/how-to-use-it.md).
|
||||
A "chat model" is an LLM that is trained to respond in a conversational format. Because they should be able to answer general questions and generate complex code, the best chat models are typically large, often 405B+ parameters.
|
||||
|
||||
In Continue, these models are used for [Chat](../../chat/how-to-use-it.md), [Edit](../../edit/how-to-use-it.md), and [Actions](../../actions/how-to-use-it.md).
|
||||
|
||||
## Recommended Chat models
|
||||
|
||||
|
|
|
|||
16
docs/docs/customize/model-roles/edit.mdx
Normal file
16
docs/docs/customize/model-roles/edit.mdx
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: Edit Role
|
||||
description: Edit model role
|
||||
keywords: [edit, editing, model, role]
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
It's often useful to select a different model to respond to Edit prompts than for chat prompts, as Edits are often more code-specific and may require less conversational readability.
|
||||
|
||||
Continue offers an `edit` model role to specify models to be used for `edit`. If no edit models are specified, the selected `chat` model is used.
|
||||
|
||||
Explore edit models in [the hub](https://hub.continue.dev/explore/models?roles=edit).
|
||||
{/* HUB_TODO */}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
title: Embeddings model
|
||||
description: Embeddings model
|
||||
keywords: [embedding]
|
||||
sidebar_position: 3
|
||||
title: Embed Role
|
||||
description: Embed model role
|
||||
keywords: [embedding, model, role, embeddings]
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
|
@ -26,7 +26,10 @@ If you want to generate embeddings locally, we recommend using `nomic-embed-text
|
|||
|
||||
After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<Tabs groupId="hub-config-example">
|
||||
<TabItem value="hub" label="Hub">
|
||||
[Voyage Code 3 Embedder Block](https://hub.continue.dev/voyageai/voyage-code-3)
|
||||
</TabItem>
|
||||
<TabItem value="yaml" label="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
|
|
@ -85,6 +88,7 @@ See [here](../model-providers/top-level/ollama.mdx#embeddings-model) for instruc
|
|||
[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own embeddings endpoint. You can configure embeddings to use your endpoint as follows:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
|
||||
<TabItem value="yaml" label="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
|
|
|
|||
31
docs/docs/customize/model-roles/intro.mdx
Normal file
31
docs/docs/customize/model-roles/intro.mdx
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
title: Intro to Roles
|
||||
description: Apply model role
|
||||
keywords: [apply, model, role]
|
||||
sidebar_position: 0
|
||||
sidebar_label: Introduction
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
import Tabs from "@theme/Tabs";
|
||||
|
||||
Models in Continue can be configured to be used for various roles in the extension.
|
||||
|
||||
- [`chat`](./chat.md): Used for chat conversations in the extension sidebar
|
||||
- [`autocomplete`](./autocomplete.md): Used for autocomplete code suggestions in the editor
|
||||
- [`edit`](./edit.mdx): Used to generate code based on edit prompts
|
||||
- [`apply`](./apply.mdx): Used to decide how to apply edits to a file
|
||||
- [`embed`](./embeddings.mdx): Used to generate embeddings used for vector search (@Codebase and @Docs context providers)
|
||||
- [`rerank`](./reranking.mdx): Used to rerank results from vector search
|
||||
|
||||
These roles can be specified for a `config.yaml` model block using `roles`. See the [YAML Specification](../../yaml-reference.md#models) for more details.
|
||||
|
||||
## Selecting model roles
|
||||
|
||||
You can control which of the models in your assistant for a given role will be currently used for that role. Visit the [Settings page](../settings.md) and go to the **Active Models** section.
|
||||
|
||||

|
||||
|
||||
:::info
|
||||
Note that `roles` do not exist within `config.json` - they are infered by the top level keys like `embeddingsProvider`
|
||||
:::
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
---
|
||||
title: Reranking model
|
||||
description: Reranking model
|
||||
keywords: [rerank]
|
||||
sidebar_position: 4
|
||||
title: Rerank Role
|
||||
description: Rerank model role
|
||||
keywords: [rerank, reranking, model, role]
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
import TabItem from "@theme/TabItem";
|
||||
|
|
@ -10,7 +10,7 @@ import Tabs from "@theme/Tabs";
|
|||
|
||||
A "reranking model" is trained to take two pieces of text (often a user question and a document) and return a relevancy score between 0 and 1, estimating how useful the document will be in answering the question. Rerankers are typically much smaller than LLMs, and will be extremely fast and cheap in comparison.
|
||||
|
||||
In Continue, reranking is used by [@Codebase](../deep-dives/codebase.mdx) in order to select the most relevant code snippets after vector search.
|
||||
In Continue, rerankers are designated using the `rerank` role and used by [@Codebase](../deep-dives/codebase.mdx) in order to select the most relevant code snippets after vector search.
|
||||
|
||||
## Recommended reranking models
|
||||
|
||||
|
|
@ -18,9 +18,12 @@ If you have the ability to use any model, we recommend `rerank-2` by Voyage AI,
|
|||
|
||||
### Voyage AI
|
||||
|
||||
Voyage AI offers the best reranking model for code with their `rerank-2` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure like this:
|
||||
Voyage AI offers the best reranking model for code with their `rerank-2` model. After obtaining an API key from [here](https://www.voyageai.com/), you can configure a reranker as follows:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<Tabs groupId="hub-config-example">
|
||||
<TabItem value="hub" label="Hub">
|
||||
[Voyage Rerank 2 Block](https://hub.continue.dev/voyageai/rerank-2)
|
||||
</TabItem>
|
||||
<TabItem value="yaml" label="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
|
|
@ -51,7 +54,11 @@ Voyage AI offers the best reranking model for code with their `rerank-2` model.
|
|||
|
||||
See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rerank-2).
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<Tabs groupId="hub-config-example">
|
||||
<TabItem value="hub" label="Hub">
|
||||
[Cohere Reranker English v3](https://hub.continue.dev/)
|
||||
{/* HUB_TODO */}
|
||||
</TabItem>
|
||||
<TabItem value="yaml" label="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
|
|
@ -82,7 +89,11 @@ See Cohere's documentation for rerankers [here](https://docs.cohere.com/docs/rer
|
|||
|
||||
If you only have access to a single LLM, then you can use it as a reranker. This is discouraged unless truly necessary, because it will be much more expensive and still less accurate than any of the above models trained specifically for the task. Note that this will not work if you are using a local model, for example with Ollama, because too many parallel requests need to be made.
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<Tabs groupId="hub-config-example">
|
||||
<TabItem value="hub" label="Hub">
|
||||
[GPT-4o LLM Reranker Block](https://hub.continue.dev/)
|
||||
{/* HUB_TODO */}
|
||||
</TabItem>
|
||||
<TabItem value="yaml" label="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
|
|
@ -113,7 +124,11 @@ The `"modelTitle"` field must match one of the models in your "models" array in
|
|||
|
||||
[Hugging Face Text Embeddings Inference](https://huggingface.co/docs/text-embeddings-inference/en/index) enables you to host your own [reranker endpoint](https://huggingface.github.io/text-embeddings-inference/#/Text%20Embeddings%20Inference/rerank). You can configure your reranker as follows:
|
||||
|
||||
<Tabs groupId="config-example">
|
||||
<Tabs groupId="hub-config-example">
|
||||
<TabItem value="hub" label="Hub">
|
||||
[HuggingFace TEI Reranker block](https://hub.continue.dev/)
|
||||
{/* HUB_TODO */}
|
||||
</TabItem>
|
||||
<TabItem value="yaml" label="YAML">
|
||||
```yaml title="config.yaml"
|
||||
models:
|
||||
|
|
|
|||
BIN
docs/static/img/hub/settings-model-roles.png
vendored
Normal file
BIN
docs/static/img/hub/settings-model-roles.png
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 57 KiB |
Loading…
Add table
Reference in a new issue