chore: update models locales

This commit is contained in:
jialin
2025-11-03 10:14:30 +08:00
parent 3613fb3f69
commit 7936d0063d
8 changed files with 136 additions and 32 deletions
@@ -152,11 +152,15 @@ const CatalogItem: React.FC<CatalogItemProps> = (props) => {
);
})}
<span className="dot"></span>
<ThemeTag>
<AutoTooltip
style={{
borderRadius: 4
}}
>
{data.activated_size
? `${data.size}B-A${data.activated_size}B`
: `${data.size}B`}
</ThemeTag>
</AutoTooltip>
</div>
</div>
</div>
+32 -12
View File
@@ -8,18 +8,27 @@ import { useFormContext } from '../config/form-context';
import KVCacheForm from './kv-cache';
import SpeculativeDecode from './speculative-decode';
const flavorTipsList = [
const modeTipsList = [
{
title: 'Throughput',
tips: 'models.form.flavor.throughput.tips'
title: {
text: 'models.form.mode.throughput',
locale: true
},
tips: 'models.form.mode.throughput.tips'
},
{
title: 'Latency',
tips: 'models.form.flavor.latency.tips'
title: {
text: 'models.form.mode.latency',
locale: true
},
tips: 'models.form.mode.latency.tips'
},
{
title: 'Reference',
tips: 'models.form.flavor.reference.tips'
title: {
text: 'models.form.mode.reference',
locale: true
},
tips: 'models.form.mode.reference.tips'
}
];
@@ -34,12 +43,23 @@ const Performance: React.FC = () => {
{formKey === deployFormKeyMap.catalog && (
<Form.Item name="mode">
<SealSelect
description={<TooltipList list={flavorTipsList}></TooltipList>}
label="Mode"
description={<TooltipList list={modeTipsList}></TooltipList>}
label={intl.formatMessage({ id: 'models.form.mode' })}
options={[
{ label: 'Throughput', value: 'throughput' },
{ label: 'Latency', value: 'latency' },
{ label: 'Reference', value: 'reference' }
{
label: intl.formatMessage({
id: 'models.form.mode.throughput'
}),
value: 'throughput'
},
{
label: intl.formatMessage({ id: 'models.form.mode.latency' }),
value: 'latency'
},
{
label: intl.formatMessage({ id: 'models.form.mode.reference' }),
value: 'reference'
}
]}
></SealSelect>
</Form.Item>
@@ -67,7 +67,9 @@ const SpeculativeDecode = () => {
style={{ marginBottom: 8 }}
>
<CheckboxField
label={'Enable Speculative Decoding'}
label={intl.formatMessage({
id: 'models.form.enableSpeculativeDecoding'
})}
onChange={handleSpeculativeEnabledChange}
></CheckboxField>
</Form.Item>
@@ -78,13 +80,17 @@ const SpeculativeDecode = () => {
rules={[
{
required: true,
message: getRuleMessage('select', 'Algorithm', false)
message: getRuleMessage(
'select',
'models.form.algorithm',
false
)
}
]}
>
<SealSelect
required
label={'Algorithm'}
label={intl.formatMessage({ id: 'models.form.algorithm' })}
options={[
{ label: 'Eagle3', value: AlgorithmMap.Eagle3 },
{ label: 'MTP', value: AlgorithmMap.MTP },
@@ -98,13 +104,13 @@ const SpeculativeDecode = () => {
rules={[
{
required: true,
message: getRuleMessage('select', 'Draft Model', false)
message: getRuleMessage('select', 'models.form.draftModel')
}
]}
>
<SealSelect
required
label={'Draft Model'}
label={intl.formatMessage({ id: 'models.form.draftModel' })}
options={draftModelList}
></SealSelect>
</Form.Item>
@@ -113,7 +119,7 @@ const SpeculativeDecode = () => {
name={['speculative_config', 'num_draft_tokens']}
>
<SealInputNumber
label={'Number of Draft Tokens'}
label={intl.formatMessage({ id: 'models.form.numDraftTokens' })}
min={1}
step={1}
precision={0}
@@ -125,7 +131,9 @@ const SpeculativeDecode = () => {
name={['speculative_config', 'ngram_min_match_length']}
>
<SealInputNumber
label={'Minimum N-gram Match Length'}
label={intl.formatMessage({
id: 'models.form.ngramMinMatchLength'
})}
min={1}
step={1}
/>
@@ -134,7 +142,9 @@ const SpeculativeDecode = () => {
name={['speculative_config', 'ngram_max_match_length']}
>
<SealInput.Input
label={'Maximum N-gram Match Length'}
label={intl.formatMessage({
id: 'models.form.ngramMaxMatchLength'
})}
min={2}
step={1}
/>