Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

17.0 KB
Raw Blame
[
  {
    "key": "llamacpp_env",
    "title": "Environmental variables",
    "description": "Environmental variables for llama.cpp(KEY=VALUE), separated by ';'",
    "controllerType": "input",
    "controllerProps": {
      "value": "",
      "placeholder": "Eg. GGML_VK_VISIBLE_DEVICES=0,1",
      "type": "text",
      "textAlign": "right"
    }
  },
  {
    "key": "models_max",
    "title": "Max Concurrently Loaded Models",
    "description": "Maximum number of models the router will keep loaded at once. 0 = unlimited.",
    "controllerType": "input",
    "controllerProps": {
      "value": 1,
      "placeholder": "e.g 1",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "timeout",
    "title": "Timeout for llamacpp",
    "description": "Llamacpp connection and load timeout in seconds",
    "controllerType": "input",
    "controllerProps": {
      "value": 600,
      "placeholder": "e.g 600",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "fit",
    "title": "Fit (auto-adjust to device memory)",
    "description": "Whether to adjust unset arguments to fit in device memory ('on' or 'off'). (env: LLAMA_ARG_FIT)",
    "controllerType": "checkbox",
    "controllerProps": {
      "value": true
    }
  },
  {
    "key": "fit_target",
    "title": "Fit Target per Device (MiB)",
    "description": "Target margin per device for fit, comma-separated list of MiB values. Single value is broadcast across all devices. (env: LLAMA_ARG_FIT_TARGET)",
    "controllerType": "input",
    "controllerProps": {
      "value": "1024",
      "placeholder": "1024 or MiB0,MiB1,...",
      "type": "text",
      "textAlign": "right"
    }
  },
  {
    "key": "fit_ctx",
    "title": "Fit Minimum Context Size",
    "description": "Minimum context size (tokens) that can be set by the auto-fit option.",
    "controllerType": "input",
    "controllerProps": {
      "value": 4096,
      "placeholder": "4096",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "threads",
    "title": "Threads",
    "description": "Number of threads to use during generation (-1 for logical cores).",
    "controllerType": "input",
    "controllerProps": {
      "value": -1,
      "placeholder": "-1",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "threads_batch",
    "title": "Threads (Batch)",
    "description": "Number of threads for batch and prompt processing (default: same as Threads).",
    "controllerType": "input",
    "controllerProps": {
      "value": -1,
      "placeholder": "-1 (same as Threads)",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "ctx_shift",
    "title": "Context Shift",
    "description": "Allow model to cut text in the beginning to accommodate new text in its memory",
    "controllerType": "checkbox",
    "controllerProps": {
      "value": false
    }
  },
  {
    "key": "n_predict",
    "title": "Max Tokens to Predict",
    "description": "Maximum number of tokens to generate (-1 = infinity).",
    "controllerType": "input",
    "controllerProps": {
      "value": -1,
      "placeholder": "-1",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "batch_size",
    "title": "Batch Size",
    "description": "Logical maximum batch size for processing prompts.",
    "controllerType": "input",
    "controllerProps": {
      "value": 2048,
      "placeholder": "2048",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "ubatch_size",
    "title": "uBatch Size",
    "description": "Physical maximum batch size for processing prompts.",
    "controllerType": "input",
    "controllerProps": {
      "value": 512,
      "placeholder": "512",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "n_cpu_moe",
    "title": "MoE Layers on CPU",
    "description": "Keep the Mixture-of-Experts weights of the first N layers in CPU memory. Lets a large MoE model fit in limited VRAM. 0 disables it.",
    "controllerType": "input",
    "controllerProps": {
      "value": 0,
      "placeholder": "0",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "n_cpu_ffn",
    "title": "Dense FFN Layers on CPU",
    "description": "Keep the dense feed-forward weights of the first N layers in CPU memory. The counterpart of the MoE setting above, for dense models. 0 disables it.",
    "controllerType": "input",
    "controllerProps": {
      "value": 0,
      "placeholder": "0",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "no_kv_offload",
    "title": "Disable KV Cache Offload",
    "description": "Keep the KV cache in system RAM instead of GPU memory. Useful when VRAM is scarce, at the cost of speed.",
    "controllerType": "checkbox",
    "controllerProps": {
      "value": false
    }
  },
  {
    "key": "device",
    "title": "Devices for Offload",
    "description": "Comma-separated accelerators to offload to, named as in the detected hardware list. Leave empty to use every available accelerator, or set \"none\" to disable offload entirely.",
    "controllerType": "input",
    "controllerProps": {
      "value": "",
      "placeholder": "CUDA0",
      "type": "text"
    }
  },
  {
    "key": "split_mode",
    "title": "GPU Split Mode",
    "description": "How to split the model across multiple GPUs.",
    "controllerType": "dropdown",
    "controllerProps": {
      "value": "layer",
      "options": [
        {
          "value": "none",
          "name": "None"
        },
        {
          "value": "layer",
          "name": "Layer"
        },
        {
          "value": "row",
          "name": "Row"
        },
        {
          "value": "tensor",
          "name": "Tensor (experimental)"
        }
      ]
    }
  },
  {
    "key": "main_gpu",
    "title": "Main GPU Index",
    "description": "The GPU to use for the model (split-mode=none) or intermediate results (split-mode=row).",
    "controllerType": "input",
    "controllerProps": {
      "value": 0,
      "placeholder": "0",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "tensor_split",
    "title": "Tensor Split",
    "description": "Comma-separated proportions for splitting the model across devices, e.g. \"3,1\". Leave empty for an even split.",
    "controllerType": "input",
    "controllerProps": {
      "value": "",
      "placeholder": "3,1",
      "type": "text"
    }
  },
  {
    "key": "no_op_offload",
    "title": "Disable Op Offload",
    "description": "Keep host tensor operations on the CPU instead of offloading them to the accelerator.",
    "controllerType": "checkbox",
    "controllerProps": {
      "value": false
    }
  },
  {
    "key": "flash_attn",
    "title": "Flash Attention",
    "description": "Enable Flash Attention for optimized performance.",
    "controllerType": "dropdown",
    "controllerProps": {
      "value": "auto",
      "options": [
        {
          "value": "auto",
          "name": "Auto"
        },
        {
          "value": "on",
          "name": "On"
        },
        {
          "value": "off",
          "name": "Off"
        }
      ]
    }
  },
  {
    "key": "parallel",
    "title": "Parallel Sequences",
    "description": "Number of parallel sequences to decode (0 = llama.cpp default). Jan reserves no slot of its own: chat, Cowork and background requests all share slot 0 and their KV caches are parked and restored per conversation.",
    "controllerType": "input",
    "controllerProps": {
      "value": 0,
      "placeholder": "0",
      "type": "number",
      "textAlign": "right",
      "min": 0
    }
  },
  {
    "key": "cont_batching",
    "title": "Continuous Batching",
    "description": "Enable continuous batching (a.k.a dynamic batching) for concurrent requests. Enabled by default, matching llama.cpp.",
    "controllerType": "checkbox",
    "controllerProps": {
      "value": true
    }
  },
  {
    "key": "load_mode",
    "title": "Load Mode",
    "description": "How model weights are read into memory. Auto memory-maps the file unless a device cannot. None reads the weights without mmap (slower load, may reduce pageouts). mlock keeps them in RAM so they are never swapped out, with or without mmap. Direct I/O bypasses the OS page cache where available. Individual models can override this.",
    "controllerType": "dropdown",
    "controllerProps": {
      "value": "auto",
      "options": [
        {
          "value": "auto",
          "name": "Auto (mmap if supported)"
        },
        {
          "value": "none",
          "name": "None (no mmap)"
        },
        {
          "value": "mmap",
          "name": "mmap"
        },
        {
          "value": "mlock",
          "name": "mlock (no mmap)"
        },
        {
          "value": "mmap+mlock",
          "name": "mmap + mlock"
        },
        {
          "value": "dio",
          "name": "Direct I/O"
        }
      ]
    }
  },
  {
    "key": "lazy_mode",
    "title": "Lazy Tensor Reading",
    "description": "Read the rows of large arch-marked tensors (e.g. per-layer embeddings) from disk on demand instead of keeping them in memory. Auto applies it above 4 GiB. Requires mmap, so pick a Load Mode that memory-maps (Auto, mmap or mmap + mlock).",
    "controllerType": "dropdown",
    "controllerProps": {
      "value": "auto",
      "options": [
        {
          "value": "auto",
          "name": "Auto"
        },
        {
          "value": "on",
          "name": "On"
        },
        {
          "value": "off",
          "name": "Off"
        }
      ]
    }
  },
  {
    "key": "cache_type_k",
    "title": "KV Cache K Type",
    "description": "KV cache data type for Keys (default: f16). f8_e4m3 has GPU kernels on NVIDIA (CUDA) only; elsewhere it may run on the CPU and be much slower.",
    "controllerType": "dropdown",
    "controllerProps": {
      "value": "f16",
      "options": [
        {
          "value": "f32",
          "name": "f32"
        },
        {
          "value": "f16",
          "name": "f16"
        },
        {
          "value": "bf16",
          "name": "bf16"
        },
        {
          "value": "f8_e4m3",
          "name": "f8_e4m3"
        },
        {
          "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"
        }
      ]
    }
  },
  {
    "key": "cache_type_v",
    "title": "KV Cache V Type",
    "description": "KV cache data type for Values (default: f16). f8_e4m3 has GPU kernels on NVIDIA (CUDA) only; elsewhere it may run on the CPU and be much slower.",
    "controllerType": "dropdown",
    "controllerProps": {
      "value": "f16",
      "options": [
        {
          "value": "f32",
          "name": "f32"
        },
        {
          "value": "f16",
          "name": "f16"
        },
        {
          "value": "bf16",
          "name": "bf16"
        },
        {
          "value": "f8_e4m3",
          "name": "f8_e4m3"
        },
        {
          "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"
        }
      ]
    }
  },
  {
    "key": "rope_scaling",
    "title": "RoPE Scaling Method",
    "description": "RoPE frequency scaling method. \"Model default\" leaves it to the model; \"None\" explicitly disables scaling.",
    "controllerType": "dropdown",
    "controllerProps": {
      "value": "auto",
      "options": [
        {
          "value": "auto",
          "name": "Model default"
        },
        {
          "value": "none",
          "name": "None"
        },
        {
          "value": "linear",
          "name": "Linear"
        },
        {
          "value": "yarn",
          "name": "YaRN"
        }
      ]
    }
  },
  {
    "key": "rope_freq_base",
    "title": "RoPE Frequency Base",
    "description": "RoPE base frequency (0 = loaded from model).",
    "controllerType": "input",
    "controllerProps": {
      "value": 0,
      "placeholder": "0 (model default)",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "rope_freq_scale",
    "title": "RoPE Frequency Scale Factor",
    "description": "RoPE frequency scaling factor. 0 loads the value from the model; 1 forces no scaling.",
    "controllerType": "input",
    "controllerProps": {
      "value": 0,
      "placeholder": "0",
      "type": "number",
      "textAlign": "right",
      "min": 0,
      "step": 0.01
    }
  },
  {
    "key": "cache_ram",
    "title": "Prompt Cache RAM (MiB)",
    "description": "Prompt cache size in MiB (default: 8192, or off for decision models unless changed). -1 is unlimited, 0 disables it.",
    "controllerType": "input",
    "controllerProps": {
      "value": 8192,
      "placeholder": "8192",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "persist_thread_cache",
    "title": "Remember Conversations Between Sessions",
    "description": "Keep each conversation's prompt cache on disk so reopening it does not re-read the whole conversation. Restored only when the model, its settings and the llama.cpp build all match what saved it.",
    "controllerType": "checkbox",
    "controllerProps": {
      "value": true
    }
  },
  {
    "key": "thread_cache_size",
    "title": "Conversation Cache Disk Limit (MiB)",
    "description": "Disk budget for saved conversation caches (default: 8192). The oldest are dropped first once it is reached. One long conversation can take hundreds of MiB.",
    "controllerType": "input",
    "controllerProps": {
      "value": 8192,
      "placeholder": "8192",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "cache_reuse",
    "title": "Cache Reuse",
    "description": "Min chunk size of matching prefix tokens to reuse from cache. 0 = disabled.",
    "controllerType": "input",
    "controllerProps": {
      "value": 0,
      "placeholder": "0",
      "type": "number",
      "textAlign": "right",
      "min": 0
    }
  },
  {
    "key": "ctx_checkpoints",
    "title": "Context Checkpoints",
    "description": "Maximum context checkpoints kept per slot, which let a shifted context be restored instead of reprocessed.",
    "controllerType": "input",
    "controllerProps": {
      "value": 32,
      "placeholder": "32",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "checkpoint_min_step",
    "title": "Checkpoint Minimum Step",
    "description": "Minimum number of tokens between context checkpoints.",
    "controllerType": "input",
    "controllerProps": {
      "value": 8192,
      "placeholder": "8192",
      "type": "number",
      "textAlign": "right"
    }
  },
  {
    "key": "swa_full",
    "title": "Full SWA Cache",
    "description": "Use full-size KV cache for sliding-window-attention models (e.g. Gemma). Enable this if such a model reprocesses the entire prompt every turn instead of reusing cache; costs more memory.",
    "controllerType": "checkbox",
    "controllerProps": {
      "value": false
    }
  },
  {
    "key": "kv_unified",
    "title": "Unified KV Cache",
    "description": "Use a single unified KV buffer shared across all slots. Saves memory when running multiple parallel slots.",
    "controllerType": "dropdown",
    "controllerProps": {
      "value": "auto",
      "options": [
        {
          "value": "auto",
          "name": "Auto"
        },
        {
          "value": "on",
          "name": "On"
        },
        {
          "value": "off",
          "name": "Off"
        }
      ]
    }
  },
  {
    "key": "kv_unified_per_slot",
    "title": "Context Per Slot",
    "description": "Cap how much of the unified KV cache one slot may use, in tokens. 0 leaves a slot free to fill the whole cache. Only applies when the cache is unified.",
    "controllerType": "input",
    "controllerProps": {
      "value": 0,
      "placeholder": "0",
      "type": "number",
      "textAlign": "right",
      "min": 0
    }
  },
  {
    "key": "reasoning_preserve",
    "title": "Preserve Reasoning History",
    "description": "Keep the reasoning of every earlier assistant turn in the prompt, not just the most recent one. Only affects models whose chat template supports it, and costs prompt tokens.",
    "controllerType": "checkbox",
    "controllerProps": {
      "value": true
    }
  },
  {
    "key": "keep",
    "title": "Keep First N Tokens",
    "description": "Number of tokens from the initial prompt to keep when context is shifted. -1 = keep all.",
    "controllerType": "input",
    "controllerProps": {
      "value": 0,
      "placeholder": "0",
      "type": "number",
      "textAlign": "right"
    }
  }
]