-
Notifications
You must be signed in to change notification settings - Fork 2.4k
810 docs add modeljson and revamp models specs page #816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tikikun
merged 12 commits into
main
from
810-docs-add-modeljson-and-revamp-models-specs-page
Dec 4, 2023
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
01d3fb2
docs: add engine
tikikun 5403d9a
docs: change to correct naming of engine and model params
tikikun 7a64b45
docs: add docs for engine, makeup for models docs
tikikun bb6cb13
rename title
tikikun 97fcafe
docs: rewrite overview
tikikun 242204d
update models.md
tikikun bd185c6
add prompt template
tikikun a4c394d
add engine_id field
tikikun b556e42
add engine_id field
tikikun 34b251d
fix mistake putting model into engine
tikikun efe3b23
only two values now
tikikun 312a1c4
Merge branch 'main' into 810-docs-add-modeljson-and-revamp-models-spe…
tikikun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.