okami.mom/strata
git clone https://git.nkp.pet/okami.mom/strata
aff3a132f
main
1/** 2* The Drafting choice the Models screen offers for a model. It exists only where there is something to choose: DFlash2 is for Qwen3.8-Flash-Next 3* only (the qwen, gyro and unsloth families: Qwen3.8-Flash-Next, its Gyro build and Unsloth's quantizations of the same weights), and only while this computer's engine can run it: strata_control/drafting.py hardware_support (Control reports it as 4* `capabilities.dflash2`; Metal and Intel engines and PCs without a supported card have none). Every other model has no dropdown at all: the other families have the MTP and 5* nothing to pick against it (Settings > Draft layer turns it off). 6*/ 7export const DRAFTING_FAMILIES = [ 'qwen' , 'gyro' , 'unsloth' ]; 8 9/** The drafter a choice means for a family (one per run; strata_control/drafting.py choice_of): Auto is DFlash2 where the engine has it (`served`) and the family is one it was made for, else the MTP. */ 10export function resolveDrafter ( choice :string | null | undefined , family :string | null | undefined , served :boolean | null | undefined , split ?:boolean | null ) :'dflash2' | 'mtp' | 'off' { 11const c = String ( choice ?? 'auto' ). toLowerCase (); 12if ( c === 'off' || c === 'mtp' ) return c ; 13if ( ! ( served === true && DRAFTING_FAMILIES . includes ( String ( family )))) return 'mtp' ; 14// `split`: Control's plan says the all-cards split engine takes this start; it runs the MTP, so Auto is the MTP there (a DFlash2 the person chose stays) 15return split === true && c !== 'dflash2' ?'mtp' :'dflash2' ; 16} 17 18/** What was measured on this kind of card (Control's words): tested = faster on some text and slower on others, slower = slower on every prompt. */ 19export interface Dflash2Support { level :'tested' | 'slower' | 'untested' ; line :string } 20 21/** The choices for a model, or null when there is nothing to choose (no dropdown). */ 22export function draftingChoices ( family :string | null | undefined , dflash2Served :boolean | null | undefined ) :string [] | null { 23return DRAFTING_FAMILIES . includes ( String ( family )) && dflash2Served === true ?[ 'auto' , 'mtp' , 'dflash2' , 'off' ] :null ; 24}