chore: show quant in catalog form
This commit is contained in:
@@ -236,5 +236,6 @@ export default {
|
|||||||
'Runs at full (original) precision and prioritizes compatibility.',
|
'Runs at full (original) precision and prioritizes compatibility.',
|
||||||
'models.form.draftModel.placeholder': 'Please select or enter a draft model',
|
'models.form.draftModel.placeholder': 'Please select or enter a draft model',
|
||||||
'models.form.draftModel.tips':
|
'models.form.draftModel.tips':
|
||||||
'You can enter a local path (e.g., /path/to/model) or select a model from Hugging Face or ModelScope (e.g., Tengyunw/qwen3_8b_eagle3). The system will automatically match based on the primary model source.'
|
'You can enter a local path (e.g., /path/to/model) or select a model from Hugging Face or ModelScope (e.g., Tengyunw/qwen3_8b_eagle3). The system will automatically match based on the primary model source.',
|
||||||
|
'models.form.quantization': 'Quantization'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -236,7 +236,8 @@ export default {
|
|||||||
'the most compatible option with full precision.',
|
'the most compatible option with full precision.',
|
||||||
'models.form.draftModel.placeholder': 'Please select or enter a draft model',
|
'models.form.draftModel.placeholder': 'Please select or enter a draft model',
|
||||||
'models.form.draftModel.tips':
|
'models.form.draftModel.tips':
|
||||||
'You can enter a local path (e.g., /path/to/model) or select a model from Hugging Face or ModelScope (e.g., Tengyunw/qwen3_8b_eagle3). The system will automatically match based on the primary model source.'
|
'You can enter a local path (e.g., /path/to/model) or select a model from Hugging Face or ModelScope (e.g., Tengyunw/qwen3_8b_eagle3). The system will automatically match based on the primary model source.',
|
||||||
|
'models.form.quantization': 'Quantization'
|
||||||
};
|
};
|
||||||
|
|
||||||
// ========== To-Do: Translate Keys (Remove After Translation) ==========
|
// ========== To-Do: Translate Keys (Remove After Translation) ==========
|
||||||
@@ -303,5 +304,5 @@ export default {
|
|||||||
// 44. 'models.form.mode.baseline.tips': 'the most compatible option with full precision,
|
// 44. 'models.form.mode.baseline.tips': 'the most compatible option with full precision,
|
||||||
// 45. 'models.form.draftModel.placeholder': 'Please select or enter a draft model',
|
// 45. 'models.form.draftModel.placeholder': 'Please select or enter a draft model',
|
||||||
// 46. 'models.form.draftModel.tips': 'You can enter a local path (e.g., /path/to/model) or select a model from Hugging Face or ModelScope (e.g., Tengyunw/qwen3_8b_eagle3). The system will automatically match based on the primary model source.'
|
// 46. 'models.form.draftModel.tips': 'You can enter a local path (e.g., /path/to/model) or select a model from Hugging Face or ModelScope (e.g., Tengyunw/qwen3_8b_eagle3). The system will automatically match based on the primary model source.'
|
||||||
|
// 47. 'models.form.quantization': 'Quantization'
|
||||||
// ========== End of To-Do List ==========
|
// ========== End of To-Do List ==========
|
||||||
|
|||||||
@@ -236,7 +236,8 @@ export default {
|
|||||||
'the most compatible option with full precision.',
|
'the most compatible option with full precision.',
|
||||||
'models.form.draftModel.placeholder': 'Please select or enter a draft model',
|
'models.form.draftModel.placeholder': 'Please select or enter a draft model',
|
||||||
'models.form.draftModel.tips':
|
'models.form.draftModel.tips':
|
||||||
'You can enter a local path (e.g., /path/to/model) or select a model from Hugging Face or ModelScope (e.g., Tengyunw/qwen3_8b_eagle3). The system will automatically match based on the primary model source.'
|
'You can enter a local path (e.g., /path/to/model) or select a model from Hugging Face or ModelScope (e.g., Tengyunw/qwen3_8b_eagle3). The system will automatically match based on the primary model source.',
|
||||||
|
'models.form.quantization': 'Quantization'
|
||||||
};
|
};
|
||||||
|
|
||||||
// ========== To-Do: Translate Keys (Remove After Translation) ==========
|
// ========== To-Do: Translate Keys (Remove After Translation) ==========
|
||||||
@@ -265,5 +266,6 @@ export default {
|
|||||||
// 35. 'models.form.mode.latency.tips': 'optimized for low latency under low request concurrency.',
|
// 35. 'models.form.mode.latency.tips': 'optimized for low latency under low request concurrency.',
|
||||||
// 36. 'models.form.mode.baseline.tips': 'the most compatible option with full precision.'
|
// 36. 'models.form.mode.baseline.tips': 'the most compatible option with full precision.'
|
||||||
// 37. 'models.form.draftModel.placeholder': 'Please select or enter a draft model',
|
// 37. 'models.form.draftModel.placeholder': 'Please select or enter a draft model',
|
||||||
// 38. 'models.form.draftModel.tips': 'You can enter a local path (e.g., /path/to/model) or select a model from Hugging Face or ModelScope (e.g., Tengyunw/qwen3_8b_eagle3). The system will automatically match based on the primary model source.'
|
// 38. 'models.form.draftModel.tips': 'You can enter a local path (e.g., /path/to/model) or select a model from Hugging Face or ModelScope (e.g., Tengyunw/qwen3_8b_eagle3). The system will automatically match based on the primary model source.',
|
||||||
|
// 39. 'models.form.quantization': 'Quantization'
|
||||||
// ========== End of To-Do List ==========
|
// ========== End of To-Do List ==========
|
||||||
|
|||||||
@@ -224,5 +224,6 @@ export default {
|
|||||||
'以完整(原始)精度运行,并优先保证兼容性。',
|
'以完整(原始)精度运行,并优先保证兼容性。',
|
||||||
'models.form.draftModel.placeholder': '请选择或输入草稿模型',
|
'models.form.draftModel.placeholder': '请选择或输入草稿模型',
|
||||||
'models.form.draftModel.tips':
|
'models.form.draftModel.tips':
|
||||||
'可填写本地路径(如 /path/to/model),或从 Hugging Face、ModelScope 选择模型(如 Tengyunw/qwen3_8b_eagle3)。系统将根据主模型来源自动匹配。'
|
'可填写本地路径(如 /path/to/model),或从 Hugging Face、ModelScope 选择模型(如 Tengyunw/qwen3_8b_eagle3)。系统将根据主模型来源自动匹配。',
|
||||||
|
'models.form.quantization': '量化'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import { Form } from 'antd';
|
|||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { sourceOptions } from '../config';
|
import { sourceOptions } from '../config';
|
||||||
import { FormData } from '../config/types';
|
import { FormData } from '../config/types';
|
||||||
import CatalogFrom from './catalog';
|
|
||||||
import LocalPathSource from './local-path-source';
|
import LocalPathSource from './local-path-source';
|
||||||
import OnlineSource from './online-source';
|
import OnlineSource from './online-source';
|
||||||
|
|
||||||
@@ -138,7 +137,6 @@ const BasicForm: React.FC<BasicFormProps> = (props) => {
|
|||||||
min={0}
|
min={0}
|
||||||
></SealInput.Number>
|
></SealInput.Number>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<CatalogFrom></CatalogFrom>
|
|
||||||
<Form.Item<FormData> name="description">
|
<Form.Item<FormData> name="description">
|
||||||
<SealInput.TextArea
|
<SealInput.TextArea
|
||||||
scaleSize={true}
|
scaleSize={true}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import SealSelect from '@/components/seal-form/seal-select';
|
import SealInput from '@/components/seal-form/seal-input';
|
||||||
import useAppUtils from '@/hooks/use-app-utils';
|
import useAppUtils from '@/hooks/use-app-utils';
|
||||||
|
import { useIntl } from '@umijs/max';
|
||||||
import { Form } from 'antd';
|
import { Form } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { DeployFormKeyMap } from '../config';
|
import { DeployFormKeyMap } from '../config';
|
||||||
@@ -7,6 +8,7 @@ import { useCatalogFormContext, useFormContext } from '../config/form-context';
|
|||||||
import { FormData } from '../config/types';
|
import { FormData } from '../config/types';
|
||||||
|
|
||||||
const CatalogForm: React.FC = () => {
|
const CatalogForm: React.FC = () => {
|
||||||
|
const intl = useIntl();
|
||||||
const formCtx = useFormContext();
|
const formCtx = useFormContext();
|
||||||
const catalogFormCtx = useCatalogFormContext();
|
const catalogFormCtx = useCatalogFormContext();
|
||||||
const { getRuleMessage } = useAppUtils();
|
const { getRuleMessage } = useAppUtils();
|
||||||
@@ -18,11 +20,7 @@ const CatalogForm: React.FC = () => {
|
|||||||
onQuantizationChange
|
onQuantizationChange
|
||||||
} = catalogFormCtx;
|
} = catalogFormCtx;
|
||||||
|
|
||||||
if (
|
if (formKey !== DeployFormKeyMap.CATALOG) {
|
||||||
formKey !== DeployFormKeyMap.CATALOG &&
|
|
||||||
!sizeOptions?.length &&
|
|
||||||
!quantizationOptions?.length
|
|
||||||
) {
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -35,50 +33,21 @@ const CatalogForm: React.FC = () => {
|
|||||||
};
|
};
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{sizeOptions && sizeOptions?.length > 0 && (
|
<Form.Item<FormData>
|
||||||
<Form.Item<FormData>
|
name="quantization"
|
||||||
name="size"
|
key="quantization"
|
||||||
key="size"
|
rules={[
|
||||||
rules={[
|
{
|
||||||
{
|
required: true,
|
||||||
required: true,
|
message: getRuleMessage('select', 'models.form.quantization', false)
|
||||||
message: getRuleMessage('input', 'size', false)
|
}
|
||||||
}
|
]}
|
||||||
]}
|
>
|
||||||
>
|
<SealInput.Input
|
||||||
<SealSelect
|
label={intl.formatMessage({ id: 'models.form.quantization' })}
|
||||||
filterOption
|
disabled
|
||||||
onChange={handleSizeChange}
|
></SealInput.Input>
|
||||||
defaultActiveFirstOption
|
</Form.Item>
|
||||||
disabled={false}
|
|
||||||
options={sizeOptions}
|
|
||||||
label="Size"
|
|
||||||
required
|
|
||||||
></SealSelect>
|
|
||||||
</Form.Item>
|
|
||||||
)}
|
|
||||||
{quantizationOptions && quantizationOptions?.length > 0 && (
|
|
||||||
<Form.Item<FormData>
|
|
||||||
name="quantization"
|
|
||||||
key="quantization"
|
|
||||||
rules={[
|
|
||||||
{
|
|
||||||
required: true,
|
|
||||||
message: getRuleMessage('select', 'quantization', false)
|
|
||||||
}
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
<SealSelect
|
|
||||||
filterOption
|
|
||||||
defaultActiveFirstOption
|
|
||||||
disabled={false}
|
|
||||||
options={quantizationOptions}
|
|
||||||
onChange={handleOnQuantizationChange}
|
|
||||||
label="Quantization"
|
|
||||||
required
|
|
||||||
></SealSelect>
|
|
||||||
</Form.Item>
|
|
||||||
)}
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { Form, Select } from 'antd';
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { DeployFormKeyMap } from '../config';
|
import { DeployFormKeyMap } from '../config';
|
||||||
import { useCatalogFormContext, useFormContext } from '../config/form-context';
|
import { useCatalogFormContext, useFormContext } from '../config/form-context';
|
||||||
|
import CatalogFrom from './catalog';
|
||||||
import KVCacheForm from './kv-cache';
|
import KVCacheForm from './kv-cache';
|
||||||
import SpeculativeDecode from './speculative-decode';
|
import SpeculativeDecode from './speculative-decode';
|
||||||
|
|
||||||
@@ -67,6 +68,7 @@ const Performance: React.FC = () => {
|
|||||||
</SealSelect>
|
</SealSelect>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
|
<CatalogFrom></CatalogFrom>
|
||||||
<KVCacheForm></KVCacheForm>
|
<KVCacheForm></KVCacheForm>
|
||||||
<SpeculativeDecode></SpeculativeDecode>
|
<SpeculativeDecode></SpeculativeDecode>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -131,6 +131,7 @@ const SpeculativeDecode = () => {
|
|||||||
></AutoComlete>
|
></AutoComlete>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Form.Item<FormData>
|
<Form.Item<FormData>
|
||||||
name={['speculative_config', 'num_draft_tokens']}
|
name={['speculative_config', 'num_draft_tokens']}
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in New Issue
Block a user