-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(models-http-api): add vllm and deepseek completion kind (#3354)
* docs(models-http-api): add vllm and deepseek completion kind * docs: add prompt_template intro * docs: fix prompt template format
- Loading branch information
Showing
3 changed files
with
71 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# DeepSeek | ||
|
||
[DeepSeek](https://www.deepseek.com/) is a platform that offers a suite of AI models. Tabby supports DeepSeek's models for both code completion and chat. | ||
|
||
DeepSeek provides some OpenAI-compatible APIs, allowing us to use the OpenAI chat kinds directly. | ||
However, for completion, there are some differences in the implementation, so we should use the `deepseek/completion` kind. | ||
|
||
Below is an example | ||
|
||
```toml title="~/.tabby/config.toml" | ||
# Chat model | ||
[model.chat.http] | ||
kind = "openai/chat" | ||
model_name = "your_model" | ||
api_endpoint = "https://api.deepseek.com/chat" | ||
api_key = "secret-api-key" | ||
|
||
# Completion model | ||
[model.completion.http] | ||
kind = "deepseek/completion" | ||
model_name = "your_model" | ||
api_endpoint = "https://api.deepseek.com/beta" | ||
api_key = "secret-api-key" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# vLLM | ||
|
||
[vLLM](https://docs.vllm.ai/en/stable/) is a fast and user-friendly library for LLM inference and serving. | ||
|
||
vLLM offers an `OpenAI Compatible Server`, enabling us to use the OpenAI kinds for chat and embedding. | ||
However, for completion, there are certain differences in the implementation. Therefore, we should use the `vllm/completion` kind and provide a `prompt_template` depending on the specific models. | ||
|
||
Below is an example | ||
|
||
```toml title="~/.tabby/config.toml" | ||
# Chat model | ||
[model.chat.http] | ||
kind = "openai/chat" | ||
model_name = "your_model" | ||
api_endpoint = "https://url_to_your_backend_or_service" | ||
api_key = "secret-api-key" | ||
|
||
# Embedding model | ||
[model.embedding.http] | ||
kind = "openai/embedding" | ||
model_name = "your_model" | ||
api_endpoint = "https://url_to_your_backend_or_service" | ||
api_key = "secret-api-key" | ||
|
||
# Completion model | ||
[model.completion.http] | ||
kind = "vllm/completion" | ||
model_name = "your_model" | ||
api_endpoint = "https://url_to_your_backend_or_service" | ||
api_key = "secret-api-key" | ||
prompt_template = "<PRE> {prefix} <SUF>{suffix} <MID>" # Example prompt template for the CodeLlama model series. | ||
``` |