From 9567ab948606c29fbd693e58609ad03c11307f6d Mon Sep 17 00:00:00 2001 From: 0xSage Date: Fri, 15 Dec 2023 12:29:26 +0800 Subject: [PATCH 1/3] docs: how to import models --- docs/docs/guides/quickstart.md | 89 ++++++++++++++++++++++++++++++++-- 1 file changed, 85 insertions(+), 4 deletions(-) diff --git a/docs/docs/guides/quickstart.md b/docs/docs/guides/quickstart.md index 101f17585..d28d44058 100644 --- a/docs/docs/guides/quickstart.md +++ b/docs/docs/guides/quickstart.md @@ -1,9 +1,90 @@ --- title: Quickstart description: Jan is a ChatGPT-alternative that runs on your own computer, with a local API server. -keywords: [Jan AI, Jan, ChatGPT alternative, local AI, private AI, conversational AI, no-subscription fee, large language model ] +keywords: + [ + Jan AI, + Jan, + ChatGPT alternative, + local AI, + private AI, + conversational AI, + no-subscription fee, + large language model, + ] --- -- Write in the style of comics, explanation -- Similar to why's (poignant) Guide to Ruby -- https://en.wikipedia.org/wiki/Why%27s_(poignant)_Guide_to_Ruby \ No newline at end of file +Jan is compatible with all GGUF models. + +In this guide we will use our latest model, [Pandora](https://huggingface.co/janhq/pandora-v1-10.7b-GGUF), as an example. + +## 1. Create a model folder + +Navigate to `~/jan/models` folder on your computer. + +In `App Settings`, go to `Advanced`, then `Open App Directory`. + +```sh +# Windows +C:/Users//jan/models + +# MacOS/Linux +jan/models +``` + +In the `models` folder, create a folder with the name of the model. + +```sh +mkdir pandora-v1-q4 +``` + +## 2. Create a model JSON + +Jan follows a standardized model template, called a `model.json`. This allows for easy model configurations, exporting, and sharing. + +```sh +cd pandora-v1-q4 +touch model.json +``` + +The following is an example template for `model.json` + +``` +{ + "source_url": "https://huggingface.co/janhq/pandora-v1-10.7b-GGUF/blob/main/pandora-v1-10.7b.Q4_K_M.gguf", + "id": "pandora-v1-10-7b-gguf", + "object": "model", + "name": "PandoraQ4", + "version": "1.0", + "description": "A helpful assistant", + "format": "gguf", + "settings": { + "ctx_len": 2048, + "prompt_template": "<|im_start|>system\n{system_message}<|im_end|>\n<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant" + }, + "parameters": { + "max_tokens": 2048 + }, + "metadata": { + "author": "Jan", + "tags": ["7B", "Finetuned"] + }, + "engine": "nitro" + } +``` + +:::caution +Ensure the `source_url` is the link to download model + +Ensure the `id` is the same with the new created folder + +Ensure to choose right `prompt_template` +::: + +# 3. Use your model + +Restart the Jan application and look for the your new custom model in the Hub. + +![image](https://hackmd.io/_uploads/HJLAqvwI6.png) + +There you go. If you have any questions or request GGUF version of any models, please message us on [Jan Discord](https://discord.gg/Dt7MxDyNNZ). From b759a8c101524c45bb559c7c2956c47e7f56d84f Mon Sep 17 00:00:00 2001 From: 0xSage Date: Fri, 15 Dec 2023 12:33:14 +0800 Subject: [PATCH 2/3] nits --- docs/docs/guides/quickstart.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/guides/quickstart.md b/docs/docs/guides/quickstart.md index d28d44058..78610b427 100644 --- a/docs/docs/guides/quickstart.md +++ b/docs/docs/guides/quickstart.md @@ -83,8 +83,8 @@ Ensure to choose right `prompt_template` # 3. Use your model -Restart the Jan application and look for the your new custom model in the Hub. +Restart the Jan application and look for your model in the Hub. ![image](https://hackmd.io/_uploads/HJLAqvwI6.png) -There you go. If you have any questions or request GGUF version of any models, please message us on [Jan Discord](https://discord.gg/Dt7MxDyNNZ). +There you go. If you have any questions or want to request for more preconfigured GGUF models, please message us on [Jan Discord](https://discord.gg/Dt7MxDyNNZ). From ae82c65367dc74f8cd25154775809e772d168420 Mon Sep 17 00:00:00 2001 From: Hoang Ha <64120343+hahuyhoang411@users.noreply.github.com> Date: Fri, 15 Dec 2023 11:38:31 +0700 Subject: [PATCH 3/3] fix(json): change from pandora to trinity for hardware friendly --- docs/docs/guides/quickstart.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/docs/docs/guides/quickstart.md b/docs/docs/guides/quickstart.md index 78610b427..8aeb28da9 100644 --- a/docs/docs/guides/quickstart.md +++ b/docs/docs/guides/quickstart.md @@ -16,7 +16,7 @@ keywords: Jan is compatible with all GGUF models. -In this guide we will use our latest model, [Pandora](https://huggingface.co/janhq/pandora-v1-10.7b-GGUF), as an example. +In this guide we will use our latest model, [Trinity](https://huggingface.co/janhq/trinity-v1-GGUF), as an example. ## 1. Create a model folder @@ -51,12 +51,12 @@ The following is an example template for `model.json` ``` { - "source_url": "https://huggingface.co/janhq/pandora-v1-10.7b-GGUF/blob/main/pandora-v1-10.7b.Q4_K_M.gguf", - "id": "pandora-v1-10-7b-gguf", + "source_url": "https://huggingface.co/janhq/trinity-v1-GGUF/resolve/main/trinity-v1.Q4_K_M.gguf", + "id": "trinity-v1-7b", "object": "model", - "name": "PandoraQ4", + "name": "Trinity 7B Q4", "version": "1.0", - "description": "A helpful assistant", + "description": "Trinity is an experimental model merge of GreenNodeLM & LeoScorpius using the Slerp method. Recommended for daily assistance purposes.", "format": "gguf", "settings": { "ctx_len": 2048, @@ -67,10 +67,11 @@ The following is an example template for `model.json` }, "metadata": { "author": "Jan", - "tags": ["7B", "Finetuned"] + "tags": ["7B", "Merged", "Featured"], + "size": 4370000000 }, "engine": "nitro" - } + } ``` :::caution