diff --git a/studio/backend/utils/models/model_config.py b/studio/backend/utils/models/model_config.py index 6ddea6ea0b..72cbc40cd3 100644 --- a/studio/backend/utils/models/model_config.py +++ b/studio/backend/utils/models/model_config.py @@ -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)