From 721d97204d244a81c66f189b9bed5f238972fe07 Mon Sep 17 00:00:00 2001 From: 0xSage <69952136+0xSage@users.noreply.github.com> Date: Mon, 25 Dec 2023 22:09:02 +0800 Subject: [PATCH 1/4] docs: Update 02-import-manually.mdx --- docs/docs/guides/04-using-models/02-import-manually.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/docs/guides/04-using-models/02-import-manually.mdx b/docs/docs/guides/04-using-models/02-import-manually.mdx index fecb3fa4d..f4a74dd6d 100644 --- a/docs/docs/guides/04-using-models/02-import-manually.mdx +++ b/docs/docs/guides/04-using-models/02-import-manually.mdx @@ -130,6 +130,7 @@ Copy the following configurations into the `model.json`. "tags": ["7B", "Merged", "Featured"], "size": 4370000000 }, + "state": "ready", "engine": "nitro" } ``` From 17a4c6d9fce45c368f3aeebc6d93a21dd67f35d4 Mon Sep 17 00:00:00 2001 From: Ho Duc Hieu <150573299+hieu-jan@users.noreply.github.com> Date: Tue, 26 Dec 2023 09:31:31 +0900 Subject: [PATCH 2/4] docs: add state note --- docs/docs/guides/04-using-models/02-import-manually.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/docs/guides/04-using-models/02-import-manually.mdx b/docs/docs/guides/04-using-models/02-import-manually.mdx index f4a74dd6d..cae294b40 100644 --- a/docs/docs/guides/04-using-models/02-import-manually.mdx +++ b/docs/docs/guides/04-using-models/02-import-manually.mdx @@ -109,6 +109,8 @@ Copy the following configurations into the `model.json`. 2. Make sure the `source_url` property is the direct binary download link ending in `.gguf`. In HuggingFace, you can find the directl links in `Files and versions` tab. 3. Ensure you are using the correct `prompt_template`. This is usually provided in the HuggingFace model's description page. +> Note: Currently, the filename must be `model.json` and the ID has to be equal to the foldername. In the `model.json`, you have to include the `state` property and set it to `ready` for Jan to recognize the model. + ```js { "source_url": "https://huggingface.co/janhq/trinity-v1-GGUF/resolve/main/trinity-v1.Q4_K_M.gguf", From d4b45405053e4e7a3bc077ef557bf0ec59ce215d Mon Sep 17 00:00:00 2001 From: hiento09 <136591877+hiento09@users.noreply.github.com> Date: Tue, 26 Dec 2023 19:15:38 +0700 Subject: [PATCH 3/4] add sleep 500ms if platform is windows (#1215) Co-authored-by: Hien To --- extensions/inference-nitro-extension/src/module.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/extensions/inference-nitro-extension/src/module.ts b/extensions/inference-nitro-extension/src/module.ts index a990ef81b..25836a875 100644 --- a/extensions/inference-nitro-extension/src/module.ts +++ b/extensions/inference-nitro-extension/src/module.ts @@ -68,6 +68,15 @@ async function loadModel(nitroResourceProbe: any | undefined) { if (!nitroResourceProbe) nitroResourceProbe = await getResourcesInfo(); return killSubprocess() .then(() => tcpPortUsed.waitUntilFree(PORT, 300, 5000)) + // wait for 500ms to make sure the port is free for windows platform + .then(() => { + if (process.platform === "win32") { + return sleep(500); + } + else { + return sleep(0); + } + }) .then(() => spawnNitroProcess(nitroResourceProbe)) .then(() => loadLLMModel(currentSettings)) .then(validateModelStatus) @@ -78,6 +87,11 @@ async function loadModel(nitroResourceProbe: any | undefined) { }); } +// Add function sleep +function sleep(ms) { + return new Promise((resolve) => setTimeout(resolve, ms)); +} + function promptTemplateConverter(promptTemplate) { // Split the string using the markers const systemMarker = "{system_message}"; From 9a882b1b3e63c49c56e23fc5df2ef1a831eb9c6d Mon Sep 17 00:00:00 2001 From: Service Account Date: Tue, 26 Dec 2023 13:15:48 +0000 Subject: [PATCH 4/4] janhq/jan: Update README.md with nightly build artifact URL --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 496950eb9..e5b9c4a4f 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Jan is an open-source ChatGPT alternative that runs 100% offline on your compute Experimental (Nighlty Build) - + Github action artifactory