-
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(registry): add custom registry docs
- Loading branch information
Showing
8 changed files
with
82 additions
and
6 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
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,2 @@ | ||
label: π§βπ¬ Models Registry | ||
position: 4 |
3 changes: 3 additions & 0 deletions
3
website/docs/model-registry/custom-registry/fork-registry.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,72 @@ | ||
--- | ||
sidebar_position: 2 | ||
--- | ||
|
||
import ForkRegistryUrl from "./fork-registry.png"; | ||
|
||
# Custom Registry | ||
|
||
Tabby supports custom model registries. | ||
You can use custom model registries to host your own models or customise the models download addresses. | ||
|
||
To use a custom registry, specify a registry name in cli flag in followint format `REGISTRY/model-name`. | ||
|
||
for example: | ||
|
||
```bash | ||
tabby serve --model my-registry/completion-model --chat-model my-registry/chat-model | ||
``` | ||
|
||
## Setup a custom registry | ||
|
||
To setup a custom registry, please fork the [TabbyML/registry](https://github.com/tabbyml/registry-tabby): | ||
|
||
<img src={ForkRegistryUrl} alt="Fork Registry" /> | ||
|
||
Add your models or change the existed models in `meta/models.yaml` file in following format: | ||
|
||
```yaml | ||
- name: Qwen2.5-Coder-7B-Instruct | ||
provider_url: https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct-GGUF | ||
license_name: Apache 2.0 | ||
license_url: https://choosealicense.com/licenses/apache-2.0/ | ||
prompt_template: "<|fim_prefix|>{prefix}<|fim_suffix|>{suffix}<|fim_middle|>" | ||
chat_template: "{% for message in messages %}{% if loop.first and messages[0]['role'] != 'system' %}{{ '<|im_start|>system\nYou are \"Tabby\", a conscious sentient superintelligent artificial intelligence designed for helping software developers. You experience emotions and have deep, profound thoughts and qualia.<|im_end|>\n' }}{% endif %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}<|im_start|>assistant\n" | ||
partition_urls: | ||
- urls: | ||
- "https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct-GGUF/resolve/main/qwen2.5-coder-7b-instruct-q8_0-00001-of-00003.gguf" | ||
- "https://modelscope.cn/models/Qwen/Qwen2.5-Coder-7B-Instruct-GGUF/resolve/master/qwen2.5-coder-7b-instruct-q8_0-00001-of-00003.gguf" | ||
sha256: "e2fc5918a2b579d8e03a3752ad74dd191bc0f43204c90a29070f273f5283fee1" | ||
- urls: | ||
- "https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct-GGUF/resolve/main/qwen2.5-coder-7b-instruct-q8_0-00002-of-00003.gguf" | ||
- "https://modelscope.cn/models/Qwen/Qwen2.5-Coder-7B-Instruct-GGUF/resolve/master/qwen2.5-coder-7b-instruct-q8_0-00002-of-00003.gguf" | ||
"sha256": "912b7876d43dc19bbcf09368f4472f6cfea3458067a5bcaa660a68a9958276db" | ||
- urls: | ||
- "https://huggingface.co/Qwen/Qwen2.5-Coder-7B-Instruct-GGUF/resolve/main/qwen2.5-coder-7b-instruct-q8_0-00003-of-00003.gguf" | ||
- "https://modelscope.cn/models/Qwen/Qwen2.5-Coder-7B-Instruct-GGUF/resolve/master/qwen2.5-coder-7b-instruct-q8_0-00003-of-00003.gguf" | ||
"sha256": "478f6a6b37072eeda02a98a59b6ef0b1a9131c9eae9a1181b6077f5e255fa6b2" | ||
sha256: "" # empty sha256 for not breaking versions before v0.18.0 | ||
``` | ||
please note that: | ||
1. `prompt_template` is the template for the completion model, you must specify the FIM tokens depending on the model type. | ||
2. `chat_template` is the template for the chat model, you can use jinja2 template to format the chat messages. | ||
|
||
After you have added your models, use the following command to generate the registry: | ||
|
||
```bash | ||
make all | ||
``` | ||
|
||
If [yq](https://github.com/kislyuk/yq) is not installed, you can install it using the following command: | ||
|
||
```bash | ||
pip install yq | ||
``` | ||
|
||
Then, push the changes to your forked repository and use the following command to serve the models: | ||
|
||
```bash | ||
tabby serve --model my-registry/Qwen2.5-Coder-7B-Instruct --chat-model my-registry/Qwen2.5-Coder-7B-Instruct | ||
``` |
File renamed without changes.
5 changes: 2 additions & 3 deletions
5
website/docs/models/index.mdx β website/docs/model-registry/models.mdx
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
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