Make MiniMax H3 default to using contrastive guidance loss to prevent distillation breakdown

This commit is contained in:
Jaret Burkett 2026-08-04 16:13:45 -06:00
parent 00a93e3830
commit 183433ae8e
4 changed files with 47 additions and 8 deletions

View File

@ -332,19 +332,13 @@ export default function SimpleJob({
const gateUrl = modelArch.gateUrl as string;
openDoc({
title: `Notes - ${modelArch.label}`,
description: (
<div className="space-y-3">
{modelArch.modelNotes}
</div>
),
description: <div className="space-y-3">{modelArch.modelNotes}</div>,
});
}}
className="w-full flex items-center gap-2 rounded-md bg-blue-950/60 border border-blue-800 px-3 py-2 text-sm text-blue-200 hover:bg-blue-900/60 text-left"
>
<Info className="w-4 h-4 shrink-0 text-blue-400" />
<span>
Model notes
</span>
<span>Model notes</span>
</button>
</div>
)}
@ -910,6 +904,39 @@ export default function SimpleJob({
)}
</>
)}
<FormGroup label="Other" className="pt-2">
<>
<Checkbox
label="Contrastive Guidance Loss"
docKey={'train.do_guidance_loss'}
className="pt-1"
checked={jobConfig.config.process[0].train.do_guidance_loss || false}
onChange={value => {
if (value) {
setJobConfig(true, 'config.process[0].train.do_guidance_loss');
if (!jobConfig.config.process[0].train.guidance_loss_target) {
setJobConfig(3.0, 'config.process[0].train.guidance_loss_target');
}
} else {
setJobConfig(undefined, 'config.process[0].train.do_guidance_loss');
setJobConfig(undefined, 'config.process[0].train.guidance_loss_target');
}
}}
/>
{jobConfig.config.process[0].train.do_guidance_loss && (
<>
<NumberInput
label="Guidance Loss Target"
docKey={'train.guidance_loss_target'}
value={(jobConfig.config.process[0].train.guidance_loss_target as number) || 3.0}
onChange={value => setJobConfig(value, 'config.process[0].train.guidance_loss_target')}
placeholder="eg. 3.0"
min={0}
/>
</>
)}
</>
</FormGroup>
</div>
</div>
</Card>

View File

@ -717,6 +717,8 @@ export const modelArchs: ModelArch[] = [
'config.process[0].sample.sampler': ['flowmatch', 'flowmatch'],
'config.process[0].train.noise_scheduler': ['flowmatch', 'flowmatch'],
'config.process[0].train.cache_text_embeddings': [true, false],
'config.process[0].train.do_guidance_loss': [true, undefined],
'config.process[0].train.guidance_loss_target': [3.0, undefined],
'config.process[0].network.linear': [16, defaultLinearRank],
'config.process[0].network.linear_alpha': [16, defaultLinearRank],
'config.process[0].sample.num_frames': [107, 1],

View File

@ -351,6 +351,14 @@ const docs: { [key: string]: ConfigDoc } = {
</>
),
},
'train.guidance_loss_target': {
title: 'Guidance Loss Target',
description: (
<>
For contrastive guidance loss, this is the target CGF to amplify predictions to.
</>
),
},
};
export const getDoc = (key: string | null | undefined): ConfigDoc | null => {

View File

@ -164,6 +164,8 @@ export interface TrainConfig {
audio_loss_multiplier?: number;
max_loss?: number | null;
validation_config?: ValidationConfig;
do_guidance_loss?: boolean;
guidance_loss_target?: number;
}
export interface QuantizeKwargsConfig {