* chore: initial new FE setup * chore: update namespace text-left-panel foreground variable * chore: enable dynamic mainview color * chore: remove greetings new chat * chore: fix chat input style * chore: simplify hook useAppearance * chore: enable internationalization * chore: prepare vn locale * chore: keyboardshortcut layout * chore: update keyboard shortcut exclude pathname * chore: update state active setting route * chore: fix update theme by system * chore: handle dynamic primary color * chore: fix left panel navigation active state and styled item privacy analytic * chore: reorder general setting being a first * chore: add function reset appearance * chore: update scrollbar * chore: update delete thread with dialog confirmation * chore: update state dialog inside dropdown menu * chore: wip thread detail or chat page * chore: wip model dropdown * chore: prepare model dropdown select * chore: update model providers setting * chore: show provider on model dropdown based isActive toogle * chore: update layout model provider * chore: update state active on storage * chore: update gap of item dropdown model * chore: update select model base on id * chore: update edit model capabilities * chore: add dialog to add model * chore: update sheet for model setting * chore: add sheet setting each model * chore: make dynamic syntax highlight * chore: fix menu setting appearance theme * chore: markdown render support emoji * chore: markdown support latex * chore: change codeblock default theme * chore: update ui codeblock * chore: custom render link taget new window * chore: fix copy button codeblock * chore: update accent and desctructive color * chore: setup user chat message * chore: prepare some page settings * chore: simple list extension and prepare mcp, local api, and hardware * chore: mcp-serve * chore: MCP server UI * chore: update local api server config * chore: adjust chat input * chore: update local api server log * chore: prepare hub page * chore: remove help page * chore: update mock * chore: prepare http proxy setting UI * chore: adjust local api server and title every action * fix: chore FE package (#4962) * fix: update command which referred to non-existent web app * fix: added commented out macos platform for now * fix: remove the platform name as macos * fix: remove unnecessary line for platform name in HeaderPage component * fix: update dev script to specify port 3000 for Vite * feat: model providers and chat completion * enhancement: threads performance * fix: thread content update * chore: clean up threads * fix: performance issue with streaming and state loop * fix: streaming * fix: react markdow * feat: extension manager * chore: add nodePolyfills include path * chore: improve performance avoid unhandle rejection * chore: update pre margin bottom * chore: swith thread should be deafult scroll to bottom * chore: wip scroll to bottom * chore: add model loader * chore: add platform utils * feat: threads functionality * chore: setup toaster * chore: persist threads deletion * fix: create thread with new message * chore: create new thread should change route path * chore: navigate after delet dialog thread * chore: thread favorites and orders * chore: dismiss deleting modal on delete * chore: remove undefined properties * chore: remove deprecated run step * chore: fix delete thread * chore: create empty thread content on started streaming * chore: correct messages store key * chore: stuck at generating state * chore: preapre chat toolbar * chore: introduce in-memory app state * chore: update extensions migration logic * chore: remove redundant extensions migration gate * chore: message toolbar user and assistant * chore: add logo gemini * feat: remote providers with model capabilities * chore: maintain provider settings * chore: move speed token into chat input * chore: temp harcoded model loader * chore: make chat text selectable and truncate model list * chore: update shortcut UI * Feat/implement threads (#4977) * chore: add fuse.js library for enhanced search functionality * feat: implement thread filtering with Fuse.js for improved search capabilities * fix: update the fuseOptions * feat: add search functionality to LeftPanel and refactor thread retrieval logic * refactor: optimize thread filtering and improve search functionality in LeftPanel * fix: more edits * refactor: remove duplicate import of useAppState in StreamingContent component * chore: update navigate after delete all thread * chore: pass prop speedToken from new chat input * chore: persist provider general settings * chore: styling search left panel * chore: cleanup margin * chore: update size icon * chore: improve chat input * chore: imprve list markdown * chore: animate border * feat: local model provider work * chore: persist manually added model * chore: prepare download management ui and show version on general setting * chore: improve pre tag * chore: remove buton install extension and improve light theme download * chore: add missing hardware information handler * chore: cleanup small ui * chore: update default provider settings * fix: missing fs commands * chore: correct provider models * chore: prepare delete model * chore: handle thinking block * chore: fix conditional message toolbar * chore: pophover download select none * enhancement: add prune mode * chore: model settings * chore: bump engine version tauri * chore: update style thinking * chore: add indicator and toogle mcp server * chore: wip hub * chore: update model settings * chore: mvp hub * chore: add function rename title * chore: update function delete message * chore: update rename title * chore: update model settings * chore: persist MCP configs * refactor: clean up utils * chore: add tools to completion request * chore: clean up * chore: ignore assets --------- Co-authored-by: Ivan Leo <ivanleomk@gmail.com> Co-authored-by: Louis <louis@jan.ai>
300 lines
7.6 KiB
TypeScript
300 lines
7.6 KiB
TypeScript
export const modelSettings = {
|
|
ctx_size: {
|
|
key: 'ctx_size',
|
|
title: 'Context Size',
|
|
description: 'Size of the prompt context (0 = loaded from model).',
|
|
controller_type: 'input',
|
|
controller_props: {
|
|
value: 8192,
|
|
placeholder: '8192',
|
|
type: 'number',
|
|
},
|
|
},
|
|
n_predict: {
|
|
key: 'n_predict',
|
|
title: 'Max Tokens to Predict',
|
|
description: 'Maximum number of tokens to generate (-1 = infinity).',
|
|
controller_type: 'input',
|
|
controller_props: {
|
|
value: -1,
|
|
placeholder: '-1',
|
|
type: 'number',
|
|
},
|
|
},
|
|
batch_size: {
|
|
key: 'batch_size',
|
|
title: 'Batch Size',
|
|
description: 'Logical maximum batch size for processing prompts.',
|
|
controller_type: 'input',
|
|
controller_props: {
|
|
value: 2048,
|
|
placeholder: '2048',
|
|
type: 'number',
|
|
},
|
|
},
|
|
ubatch_size: {
|
|
key: 'ubatch_size',
|
|
title: 'uBatch Size',
|
|
description: 'Physical maximum batch size for processing prompts.',
|
|
controller_type: 'input',
|
|
controller_props: {
|
|
value: 512,
|
|
placeholder: '512',
|
|
type: 'number',
|
|
},
|
|
},
|
|
n_gpu_layers: {
|
|
key: 'n_gpu_layers',
|
|
title: 'GPU Layers',
|
|
description:
|
|
'Number of model layers to offload to the GPU (-1 for all layers, 0 for CPU only).',
|
|
controller_type: 'input',
|
|
controller_props: {
|
|
value: -1,
|
|
placeholder: '-1',
|
|
type: 'number',
|
|
},
|
|
},
|
|
device: {
|
|
key: 'device',
|
|
title: 'Devices for Offload',
|
|
description:
|
|
"Comma-separated list of devices to use for offloading (e.g., 'cuda:0', 'cuda:0,cuda:1'). Leave empty to use default/CPU only.",
|
|
controller_type: 'input',
|
|
controller_props: {
|
|
value: '',
|
|
placeholder: 'cuda:0',
|
|
type: 'text',
|
|
},
|
|
},
|
|
split_mode: {
|
|
key: 'split_mode',
|
|
title: 'GPU Split Mode',
|
|
description: 'How to split the model across multiple GPUs.',
|
|
controller_type: 'dropdown',
|
|
controller_props: {
|
|
value: 'layer',
|
|
options: [
|
|
{ value: 'none', name: 'None' },
|
|
{ value: 'layer', name: 'Layer' },
|
|
{ value: 'row', name: 'Row' },
|
|
],
|
|
},
|
|
},
|
|
main_gpu: {
|
|
key: 'main_gpu',
|
|
title: 'Main GPU Index',
|
|
description:
|
|
'The GPU to use for the model (split-mode=none) or intermediate results (split-mode=row).',
|
|
controller_type: 'input',
|
|
controller_props: {
|
|
value: 0,
|
|
placeholder: '0',
|
|
type: 'number',
|
|
},
|
|
},
|
|
flash_attn: {
|
|
key: 'flash_attn',
|
|
title: 'Flash Attention',
|
|
description: 'Enable Flash Attention for optimized performance.',
|
|
controller_type: 'checkbox',
|
|
controller_props: {
|
|
value: false,
|
|
},
|
|
},
|
|
cont_batching: {
|
|
key: 'cont_batching',
|
|
title: 'Continuous Batching',
|
|
description:
|
|
'Enable continuous batching (a.k.a dynamic batching) for concurrent requests (default: enabled).',
|
|
controller_type: 'checkbox',
|
|
controller_props: {
|
|
value: true,
|
|
},
|
|
},
|
|
no_mmap: {
|
|
key: 'no_mmap',
|
|
title: 'Disable mmap',
|
|
description:
|
|
'Do not memory-map model (slower load but may reduce pageouts if not using mlock).',
|
|
controller_type: 'checkbox',
|
|
controller_props: {
|
|
value: false,
|
|
},
|
|
},
|
|
mlock: {
|
|
key: 'mlock',
|
|
title: 'MLock',
|
|
description:
|
|
'Force system to keep model in RAM, preventing swapping/compression.',
|
|
controller_type: 'checkbox',
|
|
controller_props: {
|
|
value: false,
|
|
},
|
|
},
|
|
no_kv_offload: {
|
|
key: 'no_kv_offload',
|
|
title: 'Disable KV Offload',
|
|
description: 'Disable KV cache offload to GPU (if GPU is used).',
|
|
controller_type: 'checkbox',
|
|
controller_props: {
|
|
value: false,
|
|
},
|
|
},
|
|
cache_type_k: {
|
|
key: 'cache_type_k',
|
|
title: 'KV Cache K Type',
|
|
description: 'KV cache data type for Keys (default: f16).',
|
|
controller_type: 'dropdown',
|
|
controller_props: {
|
|
value: 'f16',
|
|
options: [
|
|
{ value: 'f32', name: 'f32' },
|
|
{ value: 'f16', name: 'f16' },
|
|
{ value: 'bf16', name: 'bf16' },
|
|
{ value: 'q8_0', name: 'q8_0' },
|
|
{ value: 'q4_0', name: 'q4_0' },
|
|
{ value: 'q4_1', name: 'q4_1' },
|
|
{ value: 'iq4_nl', name: 'iq4_nl' },
|
|
{ value: 'q5_0', name: 'q5_0' },
|
|
{ value: 'q5_1', name: 'q5_1' },
|
|
],
|
|
},
|
|
},
|
|
cache_type_v: {
|
|
key: 'cache_type_v',
|
|
title: 'KV Cache V Type',
|
|
description: 'KV cache data type for Values (default: f16).',
|
|
controller_type: 'dropdown',
|
|
controller_props: {
|
|
value: 'f16',
|
|
options: [
|
|
{ value: 'f32', name: 'f32' },
|
|
{ value: 'f16', name: 'f16' },
|
|
{ value: 'bf16', name: 'bf16' },
|
|
{ value: 'q8_0', name: 'q8_0' },
|
|
{ value: 'q4_0', name: 'q4_0' },
|
|
{ value: 'q4_1', name: 'q4_1' },
|
|
{ value: 'iq4_nl', name: 'iq4_nl' },
|
|
{ value: 'q5_0', name: 'q5_0' },
|
|
{ value: 'q5_1', name: 'q5_1' },
|
|
],
|
|
},
|
|
},
|
|
defrag_thold: {
|
|
key: 'defrag_thold',
|
|
title: 'KV Cache Defragmentation Threshold',
|
|
description: 'Threshold for KV cache defragmentation (< 0 to disable).',
|
|
controller_type: 'input',
|
|
controller_props: {
|
|
value: 0.1,
|
|
placeholder: '0.1',
|
|
type: 'number',
|
|
step: 0.01,
|
|
},
|
|
},
|
|
rope_scaling: {
|
|
key: 'rope_scaling',
|
|
title: 'RoPE Scaling Method',
|
|
description: 'RoPE frequency scaling method.',
|
|
controller_type: 'dropdown',
|
|
controller_props: {
|
|
value: 'none',
|
|
options: [
|
|
{ value: 'none', name: 'None' },
|
|
{ value: 'linear', name: 'Linear' },
|
|
{ value: 'yarn', name: 'YaRN' },
|
|
],
|
|
},
|
|
},
|
|
rope_scale: {
|
|
key: 'rope_scale',
|
|
title: 'RoPE Scale Factor',
|
|
description: 'RoPE context scaling factor.',
|
|
controller_type: 'input',
|
|
controller_props: {
|
|
value: 1.0,
|
|
placeholder: '1.0',
|
|
type: 'number',
|
|
min: 0,
|
|
step: 0.01,
|
|
},
|
|
},
|
|
rope_freq_base: {
|
|
key: 'rope_freq_base',
|
|
title: 'RoPE Frequency Base',
|
|
description: 'RoPE base frequency (0 = loaded from model).',
|
|
controller_type: 'input',
|
|
controller_props: {
|
|
value: 0,
|
|
placeholder: '0 (model default)',
|
|
type: 'number',
|
|
},
|
|
},
|
|
rope_freq_scale: {
|
|
key: 'rope_freq_scale',
|
|
title: 'RoPE Frequency Scale Factor',
|
|
description: 'RoPE frequency scaling factor.',
|
|
controller_type: 'input',
|
|
controller_props: {
|
|
value: 1.0,
|
|
placeholder: '1.0',
|
|
type: 'number',
|
|
min: 0,
|
|
step: 0.01,
|
|
},
|
|
},
|
|
mirostat: {
|
|
key: 'mirostat',
|
|
title: 'Mirostat Mode',
|
|
description:
|
|
'Use Mirostat sampling (0: disabled, 1: Mirostat V1, 2: Mirostat V2).',
|
|
controller_type: 'dropdown',
|
|
controller_props: {
|
|
value: 0,
|
|
options: [
|
|
{ value: 0, name: 'Disabled' },
|
|
{ value: 1, name: 'Mirostat V1' },
|
|
{ value: 2, name: 'Mirostat V2' },
|
|
],
|
|
},
|
|
},
|
|
mirostat_lr: {
|
|
key: 'mirostat_lr',
|
|
title: 'Mirostat Learning Rate',
|
|
description: 'Mirostat learning rate (eta).',
|
|
controller_type: 'input',
|
|
controller_props: {
|
|
value: 0.1,
|
|
placeholder: '0.1',
|
|
type: 'number',
|
|
min: 0,
|
|
step: 0.01,
|
|
},
|
|
},
|
|
mirostat_ent: {
|
|
key: 'mirostat_ent',
|
|
title: 'Mirostat Target Entropy',
|
|
description: 'Mirostat target entropy (tau).',
|
|
controller_type: 'input',
|
|
controller_props: {
|
|
value: 5.0,
|
|
placeholder: '5.0',
|
|
type: 'number',
|
|
min: 0,
|
|
step: 0.01,
|
|
},
|
|
},
|
|
json_schema_file: {
|
|
key: 'json_schema_file',
|
|
title: 'JSON Schema File',
|
|
description: 'Path to a JSON schema file to constrain generations.',
|
|
controller_type: 'input',
|
|
controller_props: {
|
|
value: '',
|
|
placeholder: 'path/to/schema.json',
|
|
type: 'text',
|
|
},
|
|
},
|
|
}
|