From 5f8e72c6ae73b8cc42147e07df51558345dcfeec Mon Sep 17 00:00:00 2001 From: jialin Date: Thu, 31 Oct 2024 11:01:37 +0800 Subject: [PATCH] chore: update vllm arguments --- src/pages/llmodels/config/index.ts | 29 ++++++++++++++++++++ src/pages/llmodels/config/vllm-config.ts | 34 +++++++++++++++++++++++- 2 files changed, 62 insertions(+), 1 deletion(-) diff --git a/src/pages/llmodels/config/index.ts b/src/pages/llmodels/config/index.ts index adb690f6..89c91c4e 100644 --- a/src/pages/llmodels/config/index.ts +++ b/src/pages/llmodels/config/index.ts @@ -242,3 +242,32 @@ export const setbackendParameters = (data: any) => { }); return result; }; + +export const getVllmCliArgs = (inputString: string) => { + const arrayOutput = inputString + .split(/\s*\[\s*|\s*\]\s*/g) // Split by '[' or ']', removing extra spaces + .filter((item) => item) // Remove empty items + .map((item) => item.trim()); // Trim spaces around each item + + const result = arrayOutput.map((item) => { + const parts = item.split(' '); + const label = parts[0].trim(); // Remove leading dashes + const value = parts[0].trim(); + + if (parts.length === 1) { + return { label, value, options: [] }; + } else if (parts.length > 1) { + const optionPart = parts[1]; + if (optionPart.startsWith('{') && optionPart.endsWith('}')) { + const options = optionPart + .slice(1, -1) + .split(',') + .map((opt) => opt.trim()); + return { label, value, options }; + } + } + return { label, value, options: [] }; // Fallback + }); + + return result; +}; diff --git a/src/pages/llmodels/config/vllm-config.ts b/src/pages/llmodels/config/vllm-config.ts index ad10f820..1396455c 100644 --- a/src/pages/llmodels/config/vllm-config.ts +++ b/src/pages/llmodels/config/vllm-config.ts @@ -97,7 +97,12 @@ const options = [ { label: '--tool-call-parser', value: '--tool-call-parser', - options: ['mistral', 'hermes'] + options: ['mistral', 'hermes', 'internlm', 'llama3_json'] + }, + { + label: '--tool-parser-plugin', + value: '--tool-parser-plugin', + options: [] }, { label: '--model', @@ -312,6 +317,7 @@ const options = [ 'qqq', 'experts_int8', 'neuron_quant', + 'ipex', 'None' ] }, @@ -365,6 +371,11 @@ const options = [ value: '--limit-mm-per-prompt', options: [] }, + { + label: '--mm-processor-kwargs', + value: '--mm-processor-kwargs', + options: [] + }, { label: '--enable-lora', value: '--enable-lora', @@ -430,6 +441,11 @@ const options = [ value: '--num-scheduler-steps', options: [] }, + { + label: '--multi-step-stream-outputs', + value: '--multi-step-stream-outputs', + options: [] + }, { label: '--scheduler-delay-factor', value: '--scheduler-delay-factor', @@ -467,6 +483,7 @@ const options = [ 'qqq', 'experts_int8', 'neuron_quant', + 'ipex', 'None' ] }, @@ -475,6 +492,11 @@ const options = [ value: '--num-speculative-tokens', options: [] }, + { + label: '--speculative-disable-mqa-scorer', + value: '--speculative-disable-mqa-scorer', + options: [] + }, { label: '--speculative-draft-tensor-parallel-size', value: '--speculative-draft-tensor-parallel-size', @@ -565,6 +587,11 @@ const options = [ value: '--override-neuron-config', options: [] }, + { + label: '--scheduling-policy', + value: '--scheduling-policy', + options: ['fcfs', 'priority'] + }, { label: '--disable-log-requests', value: '--disable-log-requests', @@ -574,6 +601,11 @@ const options = [ label: '--max-log-len', value: '--max-log-len', options: [] + }, + { + label: '--disable-fastapi-docs', + value: '--disable-fastapi-docs', + options: [] } ];