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.',
|
||||
'models.form.draftModel.placeholder': 'Please select or enter a draft model',
|
||||
'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.',
|
||||
'models.form.draftModel.placeholder': 'Please select or enter a draft model',
|
||||
'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) ==========
|
||||
@@ -303,5 +304,5 @@ export default {
|
||||
// 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',
|
||||
// 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 ==========
|
||||
|
||||
@@ -236,7 +236,8 @@ export default {
|
||||
'the most compatible option with full precision.',
|
||||
'models.form.draftModel.placeholder': 'Please select or enter a draft model',
|
||||
'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) ==========
|
||||
@@ -265,5 +266,6 @@ export default {
|
||||
// 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.'
|
||||
// 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 ==========
|
||||
|
||||
@@ -224,5 +224,6 @@ export default {
|
||||
'以完整(原始)精度运行,并优先保证兼容性。',
|
||||
'models.form.draftModel.placeholder': '请选择或输入草稿模型',
|
||||
'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 { sourceOptions } from '../config';
|
||||
import { FormData } from '../config/types';
|
||||
import CatalogFrom from './catalog';
|
||||
import LocalPathSource from './local-path-source';
|
||||
import OnlineSource from './online-source';
|
||||
|
||||
@@ -138,7 +137,6 @@ const BasicForm: React.FC<BasicFormProps> = (props) => {
|
||||
min={0}
|
||||
></SealInput.Number>
|
||||
</Form.Item>
|
||||
<CatalogFrom></CatalogFrom>
|
||||
<Form.Item<FormData> name="description">
|
||||
<SealInput.TextArea
|
||||
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 { useIntl } from '@umijs/max';
|
||||
import { Form } from 'antd';
|
||||
import React from 'react';
|
||||
import { DeployFormKeyMap } from '../config';
|
||||
@@ -7,6 +8,7 @@ import { useCatalogFormContext, useFormContext } from '../config/form-context';
|
||||
import { FormData } from '../config/types';
|
||||
|
||||
const CatalogForm: React.FC = () => {
|
||||
const intl = useIntl();
|
||||
const formCtx = useFormContext();
|
||||
const catalogFormCtx = useCatalogFormContext();
|
||||
const { getRuleMessage } = useAppUtils();
|
||||
@@ -18,11 +20,7 @@ const CatalogForm: React.FC = () => {
|
||||
onQuantizationChange
|
||||
} = catalogFormCtx;
|
||||
|
||||
if (
|
||||
formKey !== DeployFormKeyMap.CATALOG &&
|
||||
!sizeOptions?.length &&
|
||||
!quantizationOptions?.length
|
||||
) {
|
||||
if (formKey !== DeployFormKeyMap.CATALOG) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -35,50 +33,21 @@ const CatalogForm: React.FC = () => {
|
||||
};
|
||||
return (
|
||||
<>
|
||||
{sizeOptions && sizeOptions?.length > 0 && (
|
||||
<Form.Item<FormData>
|
||||
name="size"
|
||||
key="size"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: getRuleMessage('input', 'size', false)
|
||||
}
|
||||
]}
|
||||
>
|
||||
<SealSelect
|
||||
filterOption
|
||||
onChange={handleSizeChange}
|
||||
defaultActiveFirstOption
|
||||
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>
|
||||
)}
|
||||
<Form.Item<FormData>
|
||||
name="quantization"
|
||||
key="quantization"
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: getRuleMessage('select', 'models.form.quantization', false)
|
||||
}
|
||||
]}
|
||||
>
|
||||
<SealInput.Input
|
||||
label={intl.formatMessage({ id: 'models.form.quantization' })}
|
||||
disabled
|
||||
></SealInput.Input>
|
||||
</Form.Item>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -5,6 +5,7 @@ import { Form, Select } from 'antd';
|
||||
import React from 'react';
|
||||
import { DeployFormKeyMap } from '../config';
|
||||
import { useCatalogFormContext, useFormContext } from '../config/form-context';
|
||||
import CatalogFrom from './catalog';
|
||||
import KVCacheForm from './kv-cache';
|
||||
import SpeculativeDecode from './speculative-decode';
|
||||
|
||||
@@ -67,6 +68,7 @@ const Performance: React.FC = () => {
|
||||
</SealSelect>
|
||||
</Form.Item>
|
||||
)}
|
||||
<CatalogFrom></CatalogFrom>
|
||||
<KVCacheForm></KVCacheForm>
|
||||
<SpeculativeDecode></SpeculativeDecode>
|
||||
</>
|
||||
|
||||
@@ -131,6 +131,7 @@ const SpeculativeDecode = () => {
|
||||
></AutoComlete>
|
||||
</Form.Item>
|
||||
)}
|
||||
|
||||
<Form.Item<FormData>
|
||||
name={['speculative_config', 'num_draft_tokens']}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user