Filter GGUF models from training page model selectors

GGUF models can't be fine-tuned, so hide them from the training/studio
page while keeping them available for inference on the chat page.

- Add "gguf" to EXCLUDED_TAGS in HF model search hook
- Filter local models with .gguf extension or -GGUF in ID
This commit is contained in:
Roland Tannous 2026-02-25 15:47:45 +04:00
commit a7fe8a388c
2 changed files with 17 additions and 5 deletions

View file

@ -170,14 +170,25 @@ export function ModelSection() {
return ids;
}, [hfResults, selectedModel]);
// Filter out GGUF models — they can't be used for training
const trainableLocalModels = useMemo(
() =>
localModels.filter((m) => {
if (m.path.endsWith(".gguf")) return false;
if (m.id.toLowerCase().includes("-gguf")) return false;
return true;
}),
[localModels],
);
const localMetaById = useMemo(() => {
const map = new Map<string, LocalModelInfo>();
for (const model of localModels) map.set(model.id, model);
for (const model of trainableLocalModels) map.set(model.id, model);
return map;
}, [localModels]);
}, [trainableLocalModels]);
const localResultIds = useMemo(() => {
const ids = localModels.map((model) => model.id);
const ids = trainableLocalModels.map((model) => model.id);
const manual = localModelInput.trim();
if (manual && !ids.includes(manual)) {
ids.unshift(manual);
@ -341,8 +352,8 @@ export function ModelSection() {
<p className="text-[10px] text-red-500">{localModelsError}</p>
) : (
<p className="text-[10px] text-muted-foreground">
{localModels.length > 0
? `${localModels.length} local/cached models found`
{trainableLocalModels.length > 0
? `${trainableLocalModels.length} local/cached models found`
: "No local models found. Enter path manually."}
</p>
)}

View file

@ -11,6 +11,7 @@ export interface HfModelResult {
}
const EXCLUDED_TAGS = new Set([
"gguf",
"gptq",
"awq",
"exl2",