style: gpu selector info
This commit is contained in:
@@ -12,9 +12,9 @@ export default {
|
|||||||
'models.form.configurations': '配置',
|
'models.form.configurations': '配置',
|
||||||
'models.form.s3address': 'S3 地址',
|
'models.form.s3address': 'S3 地址',
|
||||||
'models.form.partialoffload.tips':
|
'models.form.partialoffload.tips':
|
||||||
'部分卸载指的是根据可用资源将尽可能多的模型层卸载到GPU的策略,但完全卸载所有层是不可能的。',
|
'半卸载是指根据可用资源将模型的尽可能多的层卸载到 GPU 上的一种策略,当无法完全卸载所有层时,采用这种方式。',
|
||||||
'models.form.distribution.tips':
|
'models.form.distribution.tips':
|
||||||
'当单个 GPU 或 worker 的资源不足时,允许将部分计算卸载给单个或多个远程 worker。',
|
'允许在单个 GPU 或 worker 资源不足时,将部分计算卸载到一个或多个远程 woker。',
|
||||||
'models.openinplayground': '在 Playground 中打开',
|
'models.openinplayground': '在 Playground 中打开',
|
||||||
'models.instances': '实例',
|
'models.instances': '实例',
|
||||||
'models.table.replicas.edit': '调整副本数',
|
'models.table.replicas.edit': '调整副本数',
|
||||||
|
|||||||
@@ -119,33 +119,33 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
|||||||
></SealSelect>
|
></SealSelect>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
{scheduleType === 'auto' && (
|
{scheduleType === 'auto' && (
|
||||||
<Form.Item<FormData> name="placement_strategy">
|
<>
|
||||||
<SealSelect
|
<Form.Item<FormData> name="placement_strategy">
|
||||||
label={intl.formatMessage({
|
<SealSelect
|
||||||
id: 'resources.form.placementStrategy'
|
label={intl.formatMessage({
|
||||||
})}
|
id: 'resources.form.placementStrategy'
|
||||||
options={placementStrategyOptions}
|
})}
|
||||||
description={renderSelectTips(placementStrategyTips)}
|
options={placementStrategyOptions}
|
||||||
></SealSelect>
|
description={renderSelectTips(placementStrategyTips)}
|
||||||
</Form.Item>
|
></SealSelect>
|
||||||
)}
|
</Form.Item>
|
||||||
{scheduleType === 'auto' && (
|
<Form.Item<FormData> name="worker_selector">
|
||||||
<Form.Item<FormData> name="worker_selector">
|
<LabelSelector
|
||||||
<LabelSelector
|
label={intl.formatMessage({
|
||||||
label={intl.formatMessage({
|
id: 'resources.form.workerSelector'
|
||||||
id: 'resources.form.workerSelector'
|
})}
|
||||||
})}
|
labels={wokerSelector}
|
||||||
labels={wokerSelector}
|
onChange={handleWorkerLabelsChange}
|
||||||
onChange={handleWorkerLabelsChange}
|
description={
|
||||||
description={
|
<span>
|
||||||
<span>
|
{intl.formatMessage({
|
||||||
{intl.formatMessage({
|
id: 'resources.form.workerSelector.description'
|
||||||
id: 'resources.form.workerSelector.description'
|
})}
|
||||||
})}
|
</span>
|
||||||
</span>
|
}
|
||||||
}
|
></LabelSelector>
|
||||||
></LabelSelector>
|
</Form.Item>
|
||||||
</Form.Item>
|
</>
|
||||||
)}
|
)}
|
||||||
{scheduleType === 'manual' && (
|
{scheduleType === 'manual' && (
|
||||||
<Form.Item<FormData>
|
<Form.Item<FormData>
|
||||||
@@ -173,7 +173,7 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
|||||||
</SealSelect>
|
</SealSelect>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
<div style={{ marginBottom: 22, paddingLeft: 10 }}>
|
<div style={{ paddingBottom: 22, paddingLeft: 10 }}>
|
||||||
<Form.Item<FormData>
|
<Form.Item<FormData>
|
||||||
name="partial_offload"
|
name="partial_offload"
|
||||||
valuePropName="checked"
|
valuePropName="checked"
|
||||||
@@ -200,7 +200,7 @@ const AdvanceConfig: React.FC<AdvanceConfigProps> = (props) => {
|
|||||||
</Form.Item>
|
</Form.Item>
|
||||||
</div>
|
</div>
|
||||||
{scheduleType === 'auto' && (
|
{scheduleType === 'auto' && (
|
||||||
<div style={{ marginBottom: 22, paddingLeft: 10 }}>
|
<div style={{ paddingBottom: 22, paddingLeft: 10 }}>
|
||||||
<Form.Item<FormData>
|
<Form.Item<FormData>
|
||||||
name="distributed_inference_across_workers"
|
name="distributed_inference_across_workers"
|
||||||
valuePropName="checked"
|
valuePropName="checked"
|
||||||
|
|||||||
@@ -15,17 +15,19 @@ const GPUCard: React.FC<{
|
|||||||
{intl.formatMessage({ id: 'resources.table.index' })}:{data.index}]
|
{intl.formatMessage({ id: 'resources.table.index' })}:{data.index}]
|
||||||
</div>
|
</div>
|
||||||
<div className="info">
|
<div className="info">
|
||||||
<span>{intl.formatMessage({ id: 'resources.table.vram' })}:</span>
|
|
||||||
<span>
|
<span>
|
||||||
{intl.formatMessage({ id: 'resources.table.total' })}{' '}
|
{intl.formatMessage({ id: 'resources.table.vram' })}(
|
||||||
{convertFileSize(data?.memory?.total || 0)}
|
{intl.formatMessage({ id: 'resources.table.used' })}/
|
||||||
|
{intl.formatMessage({ id: 'resources.table.total' })}):{' '}
|
||||||
|
<span>
|
||||||
|
{convertFileSize(data?.memory?.used || 0)} /{' '}
|
||||||
|
{convertFileSize(data?.memory?.total || 0)}
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<span>
|
<span>
|
||||||
{intl.formatMessage({ id: 'resources.table.used' })}{' '}
|
<span>
|
||||||
{convertFileSize(data?.memory?.used || 0)}
|
{intl.formatMessage({ id: 'resources.table.gpuutilization' })}:{' '}
|
||||||
</span>
|
</span>
|
||||||
<span>
|
|
||||||
{intl.formatMessage({ id: 'resources.table.utilization' })}{' '}
|
|
||||||
{_.round(data?.memory?.utilization_rate || 0, 2)}%
|
{_.round(data?.memory?.utilization_rate || 0, 2)}%
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -64,11 +64,7 @@ const HFModelFile: React.FC<HFModelFileProps> = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const generateGroupByFilename = useCallback((list: any[]) => {
|
const generateGroupByFilename = useCallback((list: any[]) => {
|
||||||
const data = _.find(list, (item: any) => {
|
// general file
|
||||||
const parsed = parseFilename(item.path);
|
|
||||||
return !!parsed;
|
|
||||||
});
|
|
||||||
|
|
||||||
const generalFileList = _.filter(list, (item: any) => {
|
const generalFileList = _.filter(list, (item: any) => {
|
||||||
const parsed = parseFilename(item.path);
|
const parsed = parseFilename(item.path);
|
||||||
return !parsed;
|
return !parsed;
|
||||||
@@ -139,12 +135,10 @@ const HFModelFile: React.FC<HFModelFileProps> = (props) => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const newList = generateGroupByFilename(list);
|
const newList = generateGroupByFilename(list);
|
||||||
|
|
||||||
console.log('newList==========', newList);
|
|
||||||
|
|
||||||
const sortList = _.sortBy(newList, (item: any) => {
|
const sortList = _.sortBy(newList, (item: any) => {
|
||||||
return sortType === 'size' ? item.size : item.path;
|
return sortType === 'size' ? item.size : item.path;
|
||||||
});
|
});
|
||||||
|
|
||||||
handleSelectModelFile(sortList[0]);
|
handleSelectModelFile(sortList[0]);
|
||||||
setDataSource({ fileList: sortList, loading: false });
|
setDataSource({ fileList: sortList, loading: false });
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@@ -162,7 +156,11 @@ const HFModelFile: React.FC<HFModelFileProps> = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const getModelQuantizationType = useCallback((item: any) => {
|
const getModelQuantizationType = useCallback((item: any) => {
|
||||||
const quanType = getFileType(item.path);
|
let path = item.path;
|
||||||
|
if (item?.parts?.length) {
|
||||||
|
path = `${item.path}.gguf`;
|
||||||
|
}
|
||||||
|
const quanType = getFileType(path);
|
||||||
if (quanType) {
|
if (quanType) {
|
||||||
return (
|
return (
|
||||||
<Tag
|
<Tag
|
||||||
|
|||||||
Reference in New Issue
Block a user