diff --git a/CHANGELOG.md b/CHANGELOG.md index 4dbf711..d36a8fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,12 @@ step 1 (Hugging Face downloader) is released as a minor version. job runs `hf download` into the existing folder: hf 2.1.1 hashes files it didn't download itself, keeps those that match and downloads only missing or different ones. Other files in the folder are left alone. Jobs show the purpose "import". +- **Recommended files:** picking a quant (chip or checkbox) in Add model or Download more also + selects the files that usually go with it, shown in a "Recommended with your quant" strip where + each can be unchecked. They drop out again when you deselect the quant. Variants are matched: + the MTP head or mmproj with the same quant if there is one, otherwise the best single one (mmproj: + F16, BF16, Q8_0, F32); nothing is added if the model already has one of that kind. Which kinds + (default: chat template, MTP, vision) is set in the new **Settings → Downloads**. - Create tags in Settings (name and color), before any model uses them. - Tag picker on the model page and in Add model: a dropdown with "Create new tag…" first, then your existing tags with their colors, and "Manage tags…". @@ -59,7 +65,8 @@ step 1 (Hugging Face downloader) is released as a minor version. - Quant labels (library column, Quant filter, "Local copy") only count model weights, not MTP, mmproj or imatrix files. - Tags are no longer deleted automatically when no model uses them anymore; delete them in Settings. -- Settings has separate pages for **File labels** and **Tags**. +- Settings has separate pages for **File labels**, **Tags** and **Downloads**. +- The selection bar at the bottom of Add model is a floating card like the rest of the page. - Header: app icon, navigation with icons and the current page highlighted. ### Fixed diff --git a/README.md b/README.md index 01571fc..585c9fc 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,8 @@ More guides are in the [wiki](https://git.linxweiler.xyz/pascallinxweiler/Kaname

- **Add model:** enter a repo ID like `unsloth/Qwen3-8B-GGUF` (or paste the URL), click a quant, and - **Add & download**. You can add tags right there. + **Add & download**. Files that belong with the quant (chat template, MTP head, vision projector) + are selected along with it; choose which kinds in Settings → Downloads. You can add tags right there. - **Search:** type anything: `unsloth qwen`, `q4_k_m`, `gemma`, `roleplay`. Every word has to match somewhere (repo, author, base model family, architecture, quant, tags). - **Filter:** combine Author, Family, Quant, Tag and Status filters. The URL keeps the filters, so diff --git a/src/app/(app)/[org]/[repo]/download-more.tsx b/src/app/(app)/[org]/[repo]/download-more.tsx index 3ddcacd..6a45d3c 100644 --- a/src/app/(app)/[org]/[repo]/download-more.tsx +++ b/src/app/(app)/[org]/[repo]/download-more.tsx @@ -5,9 +5,11 @@ import { useRouter } from "next/navigation"; import { useMemo, useState } from "react"; import { toast } from "sonner"; import { FileRoleBadge } from "@/components/labels"; +import { RecommendedStrip } from "@/components/recommended-strip"; import { Button } from "@/components/ui/button"; import { Checkbox } from "@/components/ui/checkbox"; import { Progress } from "@/components/ui/progress"; +import { useRecommended } from "@/hooks/use-recommended"; import { groupSplitFiles } from "@/lib/file-groups"; import { formatBytes, percent, shortSha } from "@/lib/format"; import { quantGroup } from "@/lib/selection"; @@ -26,6 +28,7 @@ export function FilesHeader({ localCount, localBytes, candidates, + selectedPaths, freeBytes, busy, hubMissing, @@ -37,6 +40,8 @@ export function FilesHeader({ localCount: number; localBytes: number; candidates: Candidate[]; + /** Files the model already has selected (no second mmproj/MTP is recommended). */ + selectedPaths: string[]; freeBytes: number | null; /** A download is queued/running; adding files has to wait. */ busy: boolean; @@ -61,13 +66,18 @@ export function FilesHeader({ return [...m.entries()].sort(([a], [b]) => a.localeCompare(b, undefined, { numeric: true })); }, [candidates]); + // Companions (template, MTP, mmproj, …) of newly picked model files come along. + const { all: recAll, active: recActive, setOn: setRecommendedOn, reset: resetRecommended } = useRecommended(candidates, picked, { have: selectedPaths }); + const chosen = useMemo(() => new Set([...picked, ...recActive]), [picked, recActive]); + // Split files are one entry; its checkbox selects all parts. const entries = useMemo(() => groupSplitFiles(candidates), [candidates]); - const pickedEntries = entries.filter((e) => e.parts.every((p) => picked.has(p.path))).length; - const pickedBytes = candidates.filter((c) => picked.has(c.path)).reduce((s, c) => s + c.size, 0); + const pickedEntries = entries.filter((e) => e.parts.every((p) => chosen.has(p.path))).length; + const pickedBytes = candidates.filter((c) => chosen.has(c.path)).reduce((s, c) => s + c.size, 0); const tooBig = freeBytes != null && pickedBytes > freeBytes; function toggle(paths: string[], on: boolean) { + setRecommendedOn(paths, on); setPicked((prev) => { const next = new Set(prev); for (const p of paths) { @@ -84,7 +94,7 @@ export function FilesHeader({ const res = await fetch(`/api/models/${modelId}/files`, { method: "POST", headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ add: [...picked] }), + body: JSON.stringify({ add: [...chosen] }), }); const body = await res.json().catch(() => ({})); if (!res.ok) { @@ -94,6 +104,7 @@ export function FilesHeader({ toast.success(`${body.added} file${body.added === 1 ? "" : "s"} added, download queued`); setOpen(false); setPicked(new Set()); + resetRecommended(); router.refresh(); } finally { setSubmitting(false); @@ -165,10 +176,13 @@ export function FilesHeader({ )} + +