-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #816 from janhq/810-docs-add-modeljson-and-revamp-…
…models-specs-page 810 docs add modeljson and revamp models specs page
- Loading branch information
Showing
3 changed files
with
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
--- | ||
title: Engine | ||
slug: /specs/engine | ||
--- | ||
|
||
:::caution | ||
|
||
Currently Under Development | ||
|
||
::: | ||
|
||
## Overview | ||
|
||
In the Jan application, engines serve as primary entities with the following capabilities: | ||
|
||
- Engine will be installed through `inference-extensions`. | ||
- Models will depend on engines to do [inference](https://en.wikipedia.org/wiki/Inference_engine). | ||
- Engine configuration and required metadata will be stored in a json file. | ||
|
||
## Folder Structure | ||
|
||
- Default parameters for engines are stored in JSON files located in the `/engines` folder. | ||
- These parameter files are named uniquely with `engine_id`. | ||
- Engines are referenced directly using `engine_id` in the `model.json` file. | ||
|
||
```yaml | ||
jan/ | ||
engines/ | ||
nitro.json | ||
openai.json | ||
..... | ||
``` | ||
|
||
## Engine Default Parameter Files | ||
|
||
- Each inference engine requires default parameters to function in cases where user-provided parameters are absent. | ||
- These parameters are stored in JSON files, structured as simple key-value pairs. | ||
|
||
### Example | ||
|
||
Here is an example of an engine file for `engine_id` `nitro`: | ||
|
||
```js | ||
{ | ||
"ctx_len": 512, | ||
"ngl": 100, | ||
"embedding": false, | ||
"n_parallel": 1, | ||
"cont_batching": false | ||
"prompt_template": "<|im_start|>system\n{system_message}<|im_end|>\n<|im_start|>user\n{prompt}<|im_end|>\n<|im_start|>assistant" | ||
} | ||
``` | ||
|
||
For detailed engine parameters, refer to: [Nitro's Model Settings](https://nitro.jan.ai/features/load-unload#table-of-parameters) | ||
|
||
## Adding an Engine | ||
|
||
- Engine parameter files are automatically generated upon installing an `inference-extension` in the Jan application. | ||
|
||
--- |
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