diff --git a/src/locales/en-US/models.ts b/src/locales/en-US/models.ts index efab9917..cc2325f1 100644 --- a/src/locales/en-US/models.ts +++ b/src/locales/en-US/models.ts @@ -12,7 +12,7 @@ export default { 'models.form.configurations': 'Configurations', 'models.form.s3address': 'S3 Address', 'models.form.partialoffload.tips': - 'Refers to the strategy of offloading as many layers of a model to the GPU as possible based on available resources, while offload all layers completely is not possible.', + 'After enabling CPU offloading, GPUStack prioritizes loading as many layers as possible onto the GPU to maximize performance. If GPU resources are limited, some layers will be offloaded to the CPU, with full CPU inference used only when no GPU is available.', 'models.form.distribution.tips': 'Allows for offloading part of the computation to single or multiple remote workers when the resources of a single GPU or worker are insufficient.', 'models.openinplayground': 'Open in Playground', diff --git a/src/locales/zh-CN/models.ts b/src/locales/zh-CN/models.ts index ee54f8bb..1eaf6828 100644 --- a/src/locales/zh-CN/models.ts +++ b/src/locales/zh-CN/models.ts @@ -12,7 +12,7 @@ export default { 'models.form.configurations': '配置', 'models.form.s3address': 'S3 地址', 'models.form.partialoffload.tips': - '半卸载是指根据可用资源将模型的尽可能多的层卸载到 GPU 上的一种策略,当无法完全卸载所有层时,采用这种方式。', + '在启用 CPU 卸载后,GPUStack 优先将尽可能多的层加载到 GPU 上,以最大化性能。如果 GPU 资源有限,则某些层将被卸载到 CPU 上,只有在没有 GPU 可用时,才会完全使用 CPU 进行推理。', 'models.form.distribution.tips': '允许在单个 GPU 或 worker 资源不足时,将部分计算卸载到一个或多个远程 woker。', 'models.openinplayground': '在 Playground 中打开', diff --git a/src/locales/zh-CN/resources.ts b/src/locales/zh-CN/resources.ts index 0ad82286..d65531f5 100644 --- a/src/locales/zh-CN/resources.ts +++ b/src/locales/zh-CN/resources.ts @@ -8,7 +8,7 @@ export default { 'resources.table.key.tips': '存在相同的 key.', 'resources.table.labels': '标签', 'resources.form.advanced': '高级', - 'resources.form.enablePartialOffload': '允许半卸载', + 'resources.form.enablePartialOffload': '允许 CPU 卸载', 'resources.form.placementStrategy': '放置策略', 'resources.form.workerSelector': 'Worker 选择器', 'resources.form.enableDistributedInferenceAcrossWorkers': diff --git a/src/pages/llmodels/components/advance-config.tsx b/src/pages/llmodels/components/advance-config.tsx index 83d7152d..9cf389e4 100644 --- a/src/pages/llmodels/components/advance-config.tsx +++ b/src/pages/llmodels/components/advance-config.tsx @@ -175,7 +175,7 @@ const AdvanceConfig: React.FC = (props) => { )}
- name="partial_offload" + name="cpu_offloading" valuePropName="checked" style={{ padding: '0 10px', marginBottom: 0 }} noStyle diff --git a/src/pages/llmodels/components/data-form.tsx b/src/pages/llmodels/components/data-form.tsx index 43d7d37a..af684943 100644 --- a/src/pages/llmodels/components/data-form.tsx +++ b/src/pages/llmodels/components/data-form.tsx @@ -263,7 +263,7 @@ const DataForm: React.FC = forwardRef((props, ref) => { replicas: 1, source: props.source, placement_strategy: 'spread', - partial_offload: false, + cpu_offloading: false, scheduleType: 'auto', distributed_inference_across_workers: false }} diff --git a/src/pages/llmodels/components/search-model.tsx b/src/pages/llmodels/components/search-model.tsx index 33a7986c..cf5ea18a 100644 --- a/src/pages/llmodels/components/search-model.tsx +++ b/src/pages/llmodels/components/search-model.tsx @@ -65,6 +65,7 @@ const SearchModel: React.FC = (props) => { if (modelSource === modelSourceMap.ollama_library_value) { return; } + console.log('handleOnSearchRepo', dataSource.loading); axiosTokenRef.current?.abort?.(); axiosTokenRef.current = new AbortController(); if (dataSource.loading) return; @@ -120,13 +121,10 @@ const SearchModel: React.FC = (props) => { [dataSource] ); - const handlerSearchModels = useCallback( - async (e: any) => { - searchInputRef.current = e.target.value; - handleOnSearchRepo(); - }, - [handleOnSearchRepo] - ); + const handlerSearchModels = async (e: any) => { + searchInputRef.current = e.target.value; + handleOnSearchRepo(); + }; const handleOnOpen = () => { if ( diff --git a/src/pages/llmodels/config/types.ts b/src/pages/llmodels/config/types.ts index 3c07d990..ac5660a0 100644 --- a/src/pages/llmodels/config/types.ts +++ b/src/pages/llmodels/config/types.ts @@ -34,7 +34,7 @@ export interface FormData { gpu_name: string; }; placement_strategy?: string; - partial_offload?: boolean; + cpu_offloading?: boolean; worker_selector?: object; scheduleType?: string; name: string; diff --git a/src/pages/llmodels/style/column-wrapper.less b/src/pages/llmodels/style/column-wrapper.less index 5ba7364c..b25f9c3f 100644 --- a/src/pages/llmodels/style/column-wrapper.less +++ b/src/pages/llmodels/style/column-wrapper.less @@ -24,6 +24,7 @@ left: 0; right: 0; z-index: 100; + padding-block: 0; background-color: var(--color-white-1); } }