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
+2 -2
View File
@@ -121,9 +121,9 @@ const AutoTooltip: React.FC<AutoTooltipProps> = ({
className={`${tagProps.className || ''} ${filled ? 'tag-filled' : ''}`} className={`${tagProps.className || ''} ${filled ? 'tag-filled' : ''}`}
ref={contentRef} ref={contentRef}
style={{ style={{
...tagStyle,
paddingInline: tagProps.closable ? '8px 22px' : 8, paddingInline: tagProps.closable ? '8px 22px' : 8,
borderRadius: radius borderRadius: radius,
...tagStyle
}} }}
closeIcon={ closeIcon={
tagProps.closable ? ( tagProps.closable ? (
+12 -3
View File
@@ -219,10 +219,19 @@ export default {
'Ratio of system RAM to GPU VRAM used for KV cache. For example, 2.0 means the cache in RAM can be twice as large as the GPU VRAM.', 'Ratio of system RAM to GPU VRAM used for KV cache. For example, 2.0 means the cache in RAM can be twice as large as the GPU VRAM.',
'models.form.ramSize.tips': `Maximum size of the KV cache stored in system memory (GiB). If set, this value overrides "{content}".`, 'models.form.ramSize.tips': `Maximum size of the KV cache stored in system memory (GiB). If set, this value overrides "{content}".`,
'models.form.chunkSize.tips': 'Number of tokens per KV cache chunk.', 'models.form.chunkSize.tips': 'Number of tokens per KV cache chunk.',
'models.form.flavor.throughput.tips': 'models.form.mode': 'Mode',
'models.form.algorithm': 'Algorithm',
'models.form.draftModel': 'Draft Model',
'models.form.numDraftTokens': 'Number of Draft Tokens',
'models.form.ngramMinMatchLength': 'N-gram Minimum Match Length',
'models.form.ngramMaxMatchLength': 'N-gram Maximum Match Length',
'models.form.mode.throughput': 'Throughput',
'models.form.mode.latency': 'Latency',
'models.form.mode.reference': 'Reference',
'models.form.mode.throughput.tips':
'optimized for high throughput under high request concurrency.', 'optimized for high throughput under high request concurrency.',
'models.form.flavor.latency.tips': 'models.form.mode.latency.tips':
'optimized for low latency under low request concurrency.', 'optimized for low latency under low request concurrency.',
'models.form.flavor.reference.tips': 'models.form.mode.reference.tips':
'the most compatible option with full precision.' 'the most compatible option with full precision.'
}; };
+25 -3
View File
@@ -219,11 +219,20 @@ export default {
'Ratio of system RAM to GPU VRAM used for KV cache. For example, 2.0 means the cache in RAM can be twice as large as the GPU VRAM.', 'Ratio of system RAM to GPU VRAM used for KV cache. For example, 2.0 means the cache in RAM can be twice as large as the GPU VRAM.',
'models.form.ramSize.tips': `Maximum size of the KV cache stored in system memory (GiB). If set, this value overrides "{content}".`, 'models.form.ramSize.tips': `Maximum size of the KV cache stored in system memory (GiB). If set, this value overrides "{content}".`,
'models.form.chunkSize.tips': 'Number of tokens per KV cache chunk.', 'models.form.chunkSize.tips': 'Number of tokens per KV cache chunk.',
'models.form.flavor.throughput.tips': 'models.form.mode': 'Mode',
'models.form.algorithm': 'Algorithm',
'models.form.draftModel': 'Draft Model',
'models.form.numDraftTokens': 'Number of Draft Tokens',
'models.form.ngramMinMatchLength': 'N-gram Minimum Match Length',
'models.form.ngramMaxMatchLength': 'N-gram Maximum Match Length',
'models.form.mode.throughput': 'Throughput',
'models.form.mode.latency': 'Latency',
'models.form.mode.reference': 'Reference',
'models.form.mode.throughput.tips':
'optimized for high throughput under high request concurrency.', 'optimized for high throughput under high request concurrency.',
'models.form.flavor.latency.tips': 'models.form.mode.latency.tips':
'optimized for low latency under low request concurrency.', 'optimized for low latency under low request concurrency.',
'models.form.flavor.reference.tips': 'models.form.mode.reference.tips':
'the most compatible option with full precision.' 'the most compatible option with full precision.'
}; };
@@ -277,4 +286,17 @@ export default {
// 49. 'models.form.ramRatio.tips': 'Ratio of system RAM to GPU VRAM used for KV cache. For example, 2.0 means the cache in RAM can be twice as large as the GPU VRAM.', // 49. 'models.form.ramRatio.tips': 'Ratio of system RAM to GPU VRAM used for KV cache. For example, 2.0 means the cache in RAM can be twice as large as the GPU VRAM.',
// 50. 'models.form.ramSize.tips': `Maximum size of the KV cache stored in system memory (GiB). If set, this value overrides "{content}".`, // 50. 'models.form.ramSize.tips': `Maximum size of the KV cache stored in system memory (GiB). If set, this value overrides "{content}".`,
// 51. 'models.form.chunkSize.tips': 'Number of tokens per KV cache chunk.' // 51. 'models.form.chunkSize.tips': 'Number of tokens per KV cache chunk.'
// 33. 'models.form.mode': 'Mode',
// 34. 'models.form.algorithm': 'Algorithm',
// 35. 'models.form.draftModel': 'Draft Model',
// 36. 'models.form.numDraftTokens': 'Number of Draft Tokens',
// 37. 'models.form.ngramMinMatchLength': 'N-gram Minimum Match Length',
// 38. 'models.form.ngramMaxMatchLength': 'N-gram Maximum Match Length',
// 39. 'models.form.mode.throughput': 'Throughput',
// 40. 'models.form.mode.latency': 'Latency',
// 41. 'models.form.mode.reference': 'Reference',
// 42. 'models.form.mode.throughput.tips': 'optimized for high throughput under high request concurrency.',
// 43. 'models.form.mode.latency.tips': 'optimized for low latency under low request concurrency.',
// 44. 'models.form.mode.reference.tips': 'the most compatible option with full precision
// ========== End of To-Do List ========== // ========== End of To-Do List ==========
+28 -1
View File
@@ -218,7 +218,22 @@ export default {
'models.form.ramRatio.tips': 'models.form.ramRatio.tips':
'Ratio of system RAM to GPU VRAM used for KV cache. For example, 2.0 means the cache in RAM can be twice as large as the GPU VRAM.', 'Ratio of system RAM to GPU VRAM used for KV cache. For example, 2.0 means the cache in RAM can be twice as large as the GPU VRAM.',
'models.form.ramSize.tips': `Maximum size of the KV cache stored in system memory (GiB). If set, this value overrides "{content}".`, 'models.form.ramSize.tips': `Maximum size of the KV cache stored in system memory (GiB). If set, this value overrides "{content}".`,
'models.form.chunkSize.tips': 'Number of tokens per KV cache chunk.' 'models.form.chunkSize.tips': 'Number of tokens per KV cache chunk.',
'models.form.mode': 'Mode',
'models.form.algorithm': 'Algorithm',
'models.form.draftModel': 'Draft Model',
'models.form.numDraftTokens': 'Number of Draft Tokens',
'models.form.ngramMinMatchLength': 'N-gram Minimum Match Length',
'models.form.ngramMaxMatchLength': 'N-gram Maximum Match Length',
'models.form.mode.throughput': 'Throughput',
'models.form.mode.latency': 'Latency',
'models.form.mode.reference': 'Reference',
'models.form.mode.throughput.tips':
'optimized for high throughput under high request concurrency.',
'models.form.mode.latency.tips':
'optimized for low latency under low request concurrency.',
'models.form.mode.reference.tips':
'the most compatible option with full precision.'
}; };
// ========== To-Do: Translate Keys (Remove After Translation) ========== // ========== To-Do: Translate Keys (Remove After Translation) ==========
@@ -234,4 +249,16 @@ export default {
// 11. 'models.form.ramRatio.tips': 'Ratio of system RAM to GPU VRAM used for KV cache. For example, 2.0 means the cache in RAM can be twice as large as the GPU VRAM.', // 11. 'models.form.ramRatio.tips': 'Ratio of system RAM to GPU VRAM used for KV cache. For example, 2.0 means the cache in RAM can be twice as large as the GPU VRAM.',
// 12. 'models.form.ramSize.tips': `Maximum size of the KV cache stored in system memory (GiB). If set, this value overrides "{content}".`, // 12. 'models.form.ramSize.tips': `Maximum size of the KV cache stored in system memory (GiB). If set, this value overrides "{content}".`,
// 13. 'models.form.chunkSize.tips': 'Number of tokens per KV cache chunk.' // 13. 'models.form.chunkSize.tips': 'Number of tokens per KV cache chunk.'
// 25. 'models.form.mode': 'Mode',
// 26. 'models.form.algorithm': 'Algorithm',
// 27. 'models.form.draftModel': 'Draft Model',
// 28. 'models.form.numDraftTokens': 'Number of Draft Tokens',
// 29. 'models.form.ngramMinMatchLength': 'N-gram Minimum Match Length',
// 30. 'models.form.ngramMaxMatchLength': 'N-gram Maximum Match Length',
// 31. 'models.form.mode.throughput': 'Throughput',
// 32. 'models.form.mode.latency': 'Latency',
// 33. 'models.form.mode.reference': 'Reference',
// 34. 'models.form.mode.throughput.tips': 'optimized for high throughput under high request concurrency.',
// 35. 'models.form.mode.latency.tips': 'optimized for low latency under low request concurrency.',
// 36. 'models.form.mode.reference.tips': 'the most compatible option with full precision.'
// ========== End of To-Do List ========== // ========== End of To-Do List ==========
+13 -1
View File
@@ -208,5 +208,17 @@ export default {
'KV 缓存在系统内存与 GPU 显存之间的比例。例如设置为 2.0 表示系统内存中可缓存的数据量是显存的两倍。', 'KV 缓存在系统内存与 GPU 显存之间的比例。例如设置为 2.0 表示系统内存中可缓存的数据量是显存的两倍。',
'models.form.ramSize.tips': `KV 缓存在系统内存中的最大值。当设置该值时,将覆盖 "{content}" 的配置。`, 'models.form.ramSize.tips': `KV 缓存在系统内存中的最大值。当设置该值时,将覆盖 "{content}" 的配置。`,
'models.form.chunkSize.tips': 'models.form.chunkSize.tips':
'每个 KV 缓存块包含的 token 数量。数值越大可提升吞吐量,但也会增加内存占用。' '每个 KV 缓存块包含的 token 数量。数值越大可提升吞吐量,但也会增加内存占用。',
'models.form.mode': '模式',
'models.form.algorithm': '算法',
'models.form.draftModel': '草稿模型',
'models.form.numDraftTokens': '草稿生成 Token 数',
'models.form.ngramMinMatchLength': 'N-gram 最小匹配长度',
'models.form.ngramMaxMatchLength': 'N-gram 最大匹配长度',
'models.form.mode.throughput': '高吞吐',
'models.form.mode.latency': '低延迟',
'models.form.mode.reference': '参考',
'models.form.mode.throughput.tips': '在高并发请求下优化吞吐性能。',
'models.form.mode.latency.tips': '在低并发请求下优化响应延迟。',
'models.form.mode.reference.tips': '最兼容且保留完整精度的选项。'
}; };
@@ -152,11 +152,15 @@ const CatalogItem: React.FC<CatalogItemProps> = (props) => {
); );
})} })}
<span className="dot"></span> <span className="dot"></span>
<ThemeTag> <AutoTooltip
style={{
borderRadius: 4
}}
>
{data.activated_size {data.activated_size
? `${data.size}B-A${data.activated_size}B` ? `${data.size}B-A${data.activated_size}B`
: `${data.size}B`} : `${data.size}B`}
</ThemeTag> </AutoTooltip>
</div> </div>
</div> </div>
</div> </div>
+32 -12
View File
@@ -8,18 +8,27 @@ import { useFormContext } from '../config/form-context';
import KVCacheForm from './kv-cache'; import KVCacheForm from './kv-cache';
import SpeculativeDecode from './speculative-decode'; import SpeculativeDecode from './speculative-decode';
const flavorTipsList = [ const modeTipsList = [
{ {
title: 'Throughput', title: {
tips: 'models.form.flavor.throughput.tips' text: 'models.form.mode.throughput',
locale: true
},
tips: 'models.form.mode.throughput.tips'
}, },
{ {
title: 'Latency', title: {
tips: 'models.form.flavor.latency.tips' text: 'models.form.mode.latency',
locale: true
},
tips: 'models.form.mode.latency.tips'
}, },
{ {
title: 'Reference', title: {
tips: 'models.form.flavor.reference.tips' text: 'models.form.mode.reference',
locale: true
},
tips: 'models.form.mode.reference.tips'
} }
]; ];
@@ -34,12 +43,23 @@ const Performance: React.FC = () => {
{formKey === deployFormKeyMap.catalog && ( {formKey === deployFormKeyMap.catalog && (
<Form.Item name="mode"> <Form.Item name="mode">
<SealSelect <SealSelect
description={<TooltipList list={flavorTipsList}></TooltipList>} description={<TooltipList list={modeTipsList}></TooltipList>}
label="Mode" label={intl.formatMessage({ id: 'models.form.mode' })}
options={[ options={[
{ label: 'Throughput', value: 'throughput' }, {
{ label: 'Latency', value: 'latency' }, label: intl.formatMessage({
{ label: 'Reference', value: 'reference' } 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> ></SealSelect>
</Form.Item> </Form.Item>
@@ -67,7 +67,9 @@ const SpeculativeDecode = () => {
style={{ marginBottom: 8 }} style={{ marginBottom: 8 }}
> >
<CheckboxField <CheckboxField
label={'Enable Speculative Decoding'} label={intl.formatMessage({
id: 'models.form.enableSpeculativeDecoding'
})}
onChange={handleSpeculativeEnabledChange} onChange={handleSpeculativeEnabledChange}
></CheckboxField> ></CheckboxField>
</Form.Item> </Form.Item>
@@ -78,13 +80,17 @@ const SpeculativeDecode = () => {
rules={[ rules={[
{ {
required: true, required: true,
message: getRuleMessage('select', 'Algorithm', false) message: getRuleMessage(
'select',
'models.form.algorithm',
false
)
} }
]} ]}
> >
<SealSelect <SealSelect
required required
label={'Algorithm'} label={intl.formatMessage({ id: 'models.form.algorithm' })}
options={[ options={[
{ label: 'Eagle3', value: AlgorithmMap.Eagle3 }, { label: 'Eagle3', value: AlgorithmMap.Eagle3 },
{ label: 'MTP', value: AlgorithmMap.MTP }, { label: 'MTP', value: AlgorithmMap.MTP },
@@ -98,13 +104,13 @@ const SpeculativeDecode = () => {
rules={[ rules={[
{ {
required: true, required: true,
message: getRuleMessage('select', 'Draft Model', false) message: getRuleMessage('select', 'models.form.draftModel')
} }
]} ]}
> >
<SealSelect <SealSelect
required required
label={'Draft Model'} label={intl.formatMessage({ id: 'models.form.draftModel' })}
options={draftModelList} options={draftModelList}
></SealSelect> ></SealSelect>
</Form.Item> </Form.Item>
@@ -113,7 +119,7 @@ const SpeculativeDecode = () => {
name={['speculative_config', 'num_draft_tokens']} name={['speculative_config', 'num_draft_tokens']}
> >
<SealInputNumber <SealInputNumber
label={'Number of Draft Tokens'} label={intl.formatMessage({ id: 'models.form.numDraftTokens' })}
min={1} min={1}
step={1} step={1}
precision={0} precision={0}
@@ -125,7 +131,9 @@ const SpeculativeDecode = () => {
name={['speculative_config', 'ngram_min_match_length']} name={['speculative_config', 'ngram_min_match_length']}
> >
<SealInputNumber <SealInputNumber
label={'Minimum N-gram Match Length'} label={intl.formatMessage({
id: 'models.form.ngramMinMatchLength'
})}
min={1} min={1}
step={1} step={1}
/> />
@@ -134,7 +142,9 @@ const SpeculativeDecode = () => {
name={['speculative_config', 'ngram_max_match_length']} name={['speculative_config', 'ngram_max_match_length']}
> >
<SealInput.Input <SealInput.Input
label={'Maximum N-gram Match Length'} label={intl.formatMessage({
id: 'models.form.ngramMaxMatchLength'
})}
min={2} min={2}
step={1} step={1}
/> />