gpt comments
This commit is contained in:
parent
c147775efb
commit
795cf5d725
3 changed files with 11 additions and 8 deletions
|
|
@ -145,3 +145,10 @@ export const PRIORITY_TRAINING_MODELS: readonly string[] = [
|
|||
"unsloth/Llama-3.1-8B-Instruct",
|
||||
"unsloth/Llama-3.2-3B-Instruct",
|
||||
];
|
||||
|
||||
/** Pin priority models to the top of a list of model IDs, preserving their defined order. */
|
||||
export function applyPriorityOrdering(ids: string[]): string[] {
|
||||
const prioritySet = new Set<string>(PRIORITY_TRAINING_MODELS);
|
||||
const rest = ids.filter((id) => !prioritySet.has(id));
|
||||
return [...PRIORITY_TRAINING_MODELS, ...rest];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ import {
|
|||
TooltipContent,
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
import { MODEL_TYPE_TO_HF_TASK, PRIORITY_TRAINING_MODELS } from "@/config/training";
|
||||
import { MODEL_TYPE_TO_HF_TASK, applyPriorityOrdering } from "@/config/training";
|
||||
import {
|
||||
useDebouncedValue,
|
||||
useGpuInfo,
|
||||
|
|
@ -103,9 +103,7 @@ export function ModelSelectionStep() {
|
|||
|
||||
const resultIds = useMemo(() => {
|
||||
const ids = hfResults.map((r) => r.id);
|
||||
const prioritySet = new Set(PRIORITY_TRAINING_MODELS);
|
||||
const rest = ids.filter((id) => !prioritySet.has(id));
|
||||
return [...PRIORITY_TRAINING_MODELS, ...rest];
|
||||
return applyPriorityOrdering(ids);
|
||||
}, [hfResults]);
|
||||
|
||||
// Match Studio behavior: only show exception signals (OOM/TIGHT) in training flows.
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ import {
|
|||
TooltipContent,
|
||||
TooltipTrigger,
|
||||
} from "@/components/ui/tooltip";
|
||||
import { MODEL_TYPE_TO_HF_TASK, PRIORITY_TRAINING_MODELS } from "@/config/training";
|
||||
import { MODEL_TYPE_TO_HF_TASK, applyPriorityOrdering } from "@/config/training";
|
||||
import {
|
||||
useDebouncedValue,
|
||||
useGpuInfo,
|
||||
|
|
@ -173,9 +173,7 @@ export function ModelSection() {
|
|||
ids.push(selectedModel);
|
||||
}
|
||||
|
||||
const prioritySet = new Set(PRIORITY_TRAINING_MODELS);
|
||||
const rest = ids.filter((id) => !prioritySet.has(id));
|
||||
return [...PRIORITY_TRAINING_MODELS, ...rest];
|
||||
return applyPriorityOrdering(ids);
|
||||
}, [hfResults, selectedModel]);
|
||||
|
||||
// Filter out GGUF models — they can't be used for training
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue