studio: sort downloaded GGUF variants before recommended
Downloaded variants now take priority over the recommended badge in sort order. Within the same tier (downloaded+fits, etc.), recommended still sorts first. Order: downloaded -> recommended -> fits -> tight -> OOM
This commit is contained in:
parent
64ab7554b1
commit
bcb382def9
1 changed files with 5 additions and 4 deletions
|
|
@ -239,14 +239,15 @@ function GgufVariantExpander({
|
|||
return v.downloaded ? base : base + 2;
|
||||
};
|
||||
return [...variants].sort((a, b) => {
|
||||
const aIsRec = a.quant === effectiveRecommended;
|
||||
const bIsRec = b.quant === effectiveRecommended;
|
||||
if (aIsRec !== bIsRec) return aIsRec ? -1 : 1;
|
||||
|
||||
const aTier = tierOf(a);
|
||||
const bTier = tierOf(b);
|
||||
if (aTier !== bTier) return aTier - bTier;
|
||||
|
||||
// Within the same tier, recommended goes first
|
||||
const aIsRec = a.quant === effectiveRecommended;
|
||||
const bIsRec = b.quant === effectiveRecommended;
|
||||
if (aIsRec !== bIsRec) return aIsRec ? -1 : 1;
|
||||
|
||||
// fits/tight: largest first (best quality); OOM: smallest first
|
||||
return aTier === 4 ? a.size_bytes - b.size_bytes : b.size_bytes - a.size_bytes;
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue