MCPcopy Create free account
hub / github.com/Tiiny-AI/PowerInfer / server_print_usage

Function server_print_usage

examples/server/server.cpp:1751–1810  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1749};
1750
1751static void server_print_usage(const char *argv0, const gpt_params &params,
1752 const server_params &sparams)
1753{
1754 printf("usage: %s [options]\n", argv0);
1755 printf("\n");
1756 printf("options:\n");
1757 printf(" -h, --help show this help message and exit\n");
1758 printf(" -v, --verbose verbose output (default: %s)\n", server_verbose ? "enabled" : "disabled");
1759 printf(" -t N, --threads N number of threads to use during computation (default: %d)\n", params.n_threads);
1760 printf(" -tb N, --threads-batch N number of threads to use during batch and prompt processing (default: same as --threads)\n");
1761 printf(" -c N, --ctx-size N size of the prompt context (default: %d)\n", params.n_ctx);
1762 printf(" --rope-scaling {none,linear,yarn}\n");
1763 printf(" RoPE frequency scaling method, defaults to linear unless specified by the model\n");
1764 printf(" --rope-freq-base N RoPE base frequency (default: loaded from model)\n");
1765 printf(" --rope-freq-scale N RoPE frequency scaling factor, expands context by a factor of 1/N\n");
1766 printf(" --yarn-ext-factor N YaRN: extrapolation mix factor (default: 1.0, 0.0 = full interpolation)\n");
1767 printf(" --yarn-attn-factor N YaRN: scale sqrt(t) or attention magnitude (default: 1.0)\n");
1768 printf(" --yarn-beta-slow N YaRN: high correction dim or alpha (default: %.1f)\n", params.yarn_beta_slow);
1769 printf(" --yarn-beta-fast N YaRN: low correction dim or beta (default: %.1f)\n", params.yarn_beta_fast);
1770 printf(" -b N, --batch-size N batch size for prompt processing (default: %d)\n", params.n_batch);
1771 printf(" --memory-f32 use f32 instead of f16 for memory key+value (default: disabled)\n");
1772 printf(" not recommended: doubles context memory required and no measurable increase in quality\n");
1773 if (llama_mlock_supported())
1774 {
1775 printf(" --mlock force system to keep model in RAM rather than swapping or compressing\n");
1776 }
1777 if (llama_mmap_supported())
1778 {
1779 printf(" --no-mmap do not memory-map model (slower load but may reduce pageouts if not using mlock)\n");
1780 }
1781 printf(" --numa attempt optimizations that help on some NUMA systems\n");
1782#ifdef LLAMA_SUPPORTS_GPU_OFFLOAD
1783 printf(" -ngl N, --n-gpu-layers N\n");
1784 printf(" number of layers to store in VRAM\n");
1785 printf(" -ts SPLIT --tensor-split SPLIT\n");
1786 printf(" how to split tensors across multiple GPUs, comma-separated list of proportions, e.g. 3,1\n");
1787 printf(" -mg i, --main-gpu i the GPU to use for scratch and small tensors\n");
1788 printf(" -nommq, --no-mul-mat-q\n");
1789 printf(" use cuBLAS instead of custom mul_mat_q CUDA kernels.\n");
1790 printf(" Not recommended since this is both slower and uses more VRAM.\n");
1791#endif
1792 printf(" -m FNAME, --model FNAME\n");
1793 printf(" model path (default: %s)\n", params.model.c_str());
1794 printf(" -a ALIAS, --alias ALIAS\n");
1795 printf(" set an alias for the model, will be added as `model` field in completion response\n");
1796 printf(" --lora FNAME apply LoRA adapter (implies --no-mmap)\n");
1797 printf(" --lora-base FNAME optional model to use as a base for the layers modified by the LoRA adapter\n");
1798 printf(" --host ip address to listen (default (default: %s)\n", sparams.hostname.c_str());
1799 printf(" --port PORT port to listen (default (default: %d)\n", sparams.port);
1800 printf(" --path PUBLIC_PATH path from which to serve static files (default %s)\n", sparams.public_path.c_str());
1801 printf(" -to N, --timeout N server read/write timeout in seconds (default: %d)\n", sparams.read_timeout);
1802 printf(" --embedding enable embedding vector output (default: %s)\n", params.embedding ? "enabled" : "disabled");
1803 printf(" -np N, --parallel N number of slots for process requests (default: %d)\n", params.n_parallel);
1804 printf(" -cb, --cont-batching enable continuous batching (a.k.a dynamic batching) (default: disabled)\n");
1805 printf(" -spf FNAME, --system-prompt-file FNAME\n");
1806 printf(" Set a file to load a system prompt (initial prompt of all slots), this is useful for chat applications.\n");
1807 printf(" --vram-budget N VRAM budget in GiB (default: -1, -1 = available VRAM)\n");
1808 printf(" --mmproj MMPROJ_FILE path to a multimodal projector file for LLaVA.\n");

Callers 1

server_params_parseFunction · 0.85

Calls 4

printfFunction · 0.85
llama_mlock_supportedFunction · 0.85
llama_mmap_supportedFunction · 0.85
c_strMethod · 0.45

Tested by

no test coverage detected