studio: sort GGUF quants largest-first so best quality that fits is at the top
This commit is contained in:
parent
1f861e185b
commit
dd2d979b40
1 changed files with 3 additions and 2 deletions
|
|
@ -969,8 +969,9 @@ def list_gguf_variants(
|
|||
def _sort_key(v: GgufVariantInfo) -> tuple:
|
||||
is_recommended = v.quant == best_quant
|
||||
is_ud = v.quant.startswith("UD-")
|
||||
# (0, ...) recommended | (1, 0, size) other UD | (1, 1, size) non-UD
|
||||
return (0 if is_recommended else 1, 0 if is_ud else 1, v.size_bytes)
|
||||
# (0, ...) recommended | (1, 0, -size) other UD | (1, 1, -size) non-UD
|
||||
# Negative size so largest (best quality) appears first.
|
||||
return (0 if is_recommended else 1, 0 if is_ud else 1, -v.size_bytes)
|
||||
|
||||
variants.sort(key = _sort_key)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue