From 7c960bb899daee684509d04b30db8db6a71bb829 Mon Sep 17 00:00:00 2001 From: jialin Date: Sun, 9 Feb 2025 21:51:43 +0800 Subject: [PATCH] fix: set distributed_inference_across_workers to false when selectingt vox-box --- src/locales/en-US/models.ts | 4 ++-- src/locales/zh-CN/models.ts | 5 +++-- src/pages/llmodels/components/advance-config.tsx | 1 + src/pages/llmodels/components/update-modal.tsx | 6 +++++- src/pages/llmodels/config/types.ts | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/locales/en-US/models.ts b/src/locales/en-US/models.ts index b2250309..397c6ac1 100644 --- a/src/locales/en-US/models.ts +++ b/src/locales/en-US/models.ts @@ -99,6 +99,6 @@ export default { 'models.localpath.gguf.tips': ' Specify the model file, e.g., /usr/local/models/model.gguf.', 'models.localpath.safe.tips': - 'Specify the model directory, e.g., /usr/local/models/.', - 'models.localpath.chunks.tips': `Specify one of the model's shard files, e.g., /usr/local/models/model-00001-of-00004.(gguf|safetensors).` + 'Specify the model directory that contains .safetensors and config.json files, e.g., /usr/local/models/.', + 'models.localpath.chunks.tips': `Specify the first shard file of the model, e.g., /usr/local/models/model-00001-of-00004.(gguf|safetensors).` }; diff --git a/src/locales/zh-CN/models.ts b/src/locales/zh-CN/models.ts index 64fa88ec..a06d70c9 100644 --- a/src/locales/zh-CN/models.ts +++ b/src/locales/zh-CN/models.ts @@ -94,7 +94,8 @@ export default { 'models.localpath.shared.tips.title': '分片的模型', 'models.localpath.gguf.tips': '指向模型文件,例如 /usr/local/models/model.gguf', - 'models.localpath.safe.tips': '指向模型目录,例如 /usr/local/models/', + 'models.localpath.safe.tips': + '指向包含 .safetensors, config.json 文件的模型目录,例如 /usr/local/models/', 'models.localpath.chunks.tips': - '指向模型其中一个分片文件,例如 /usr/local/models/model-00001-of-00004.(gguf|safetensors)' + '指向模型第一个分片文件,例如 /usr/local/models/model-00001-of-00004.(gguf|safetensors)' }; diff --git a/src/pages/llmodels/components/advance-config.tsx b/src/pages/llmodels/components/advance-config.tsx index 25ec1918..eb74224f 100644 --- a/src/pages/llmodels/components/advance-config.tsx +++ b/src/pages/llmodels/components/advance-config.tsx @@ -231,6 +231,7 @@ const AdvanceConfig: React.FC = (props) => { ]} > = (props) => { const handleOk = (formdata: FormData) => { let obj = {}; - if (formdata.backend === backendOptionsMap.vllm) { + if ( + [backendOptionsMap.vllm, backendOptionsMap.voxBox].includes( + formdata.backend + ) + ) { obj = { distributed_inference_across_workers: false, cpu_offloading: false diff --git a/src/pages/llmodels/config/types.ts b/src/pages/llmodels/config/types.ts index 45554fcb..20d1c0dd 100644 --- a/src/pages/llmodels/config/types.ts +++ b/src/pages/llmodels/config/types.ts @@ -30,7 +30,7 @@ export interface ListItem { } export interface FormData { - backend?: string; + backend: string; size?: number; quantization?: number; categories?: string[];