Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

Revert "Studio Hub: Newest and Recently updated list more than Unsloth models…" (#13744)

Michael Hanaad900ec04d4
diff --git a/studio/frontend/src/features/hub/hooks/use-discover-search.ts b/studio/frontend/src/features/hub/hooks/use-discover-search.ts
index d2f6c63022d..53300e6397e 100644
--- a/studio/frontend/src/features/hub/hooks/use-discover-search.ts
+++ b/studio/frontend/src/features/hub/hooks/use-discover-search.ts
@@ -104,7 +104,6 @@ export function useDiscoverSearch({
direction,
channel,
ownerScope,
- listingTags,
filters,
task,
}: {
@@ -116,7 +115,6 @@ export function useDiscoverSearch({
direction: HfSortDirection;
channel: HfModelSearchChannel | null;
ownerScope: "unsloth" | "all";
- listingTags?: readonly string[];
filters?: ModelSearchFilters;
task?: HfTaskFilter;
}): DiscoverSearch {
@@ -141,8 +139,6 @@ export function useDiscoverSearch({
ownerScope,
enabled: canProbe && isDiscoverTab && !isDatasetMode,
keepUnsupportedTags: true,
- unslothFirstBrowse: true,
- listingTags,
channel,
filters,
task,
diff --git a/studio/frontend/src/features/hub/hooks/use-hub-model-search.ts b/studio/frontend/src/features/hub/hooks/use-hub-model-search.ts
index 62d37b3e249..020dd45c57b 100644
--- a/studio/frontend/src/features/hub/hooks/use-hub-model-search.ts
+++ b/studio/frontend/src/features/hub/hooks/use-hub-model-search.ts
@@ -303,7 +303,6 @@ async function* mergedModelIterator(
signal?: AbortSignal,
parameterFilter = "",
filterPriority?: ModelListingTransform,
- tags?: string[],
): AsyncGenerator<unknown> {
const tasks = normalizeTaskFilter(task);
const common = {
@@ -316,12 +315,7 @@ async function* mergedModelIterator(
(task, taskSignal) =>
listModels({
hubUrl: getHfEndpoint(),
- search: {
- query,
- owner: "unsloth",
- ...(task ? { task } : {}),
- ...(tags ? { tags } : {}),
- },
+ search: { query, owner: "unsloth", ...(task ? { task } : {}) },
fetch: makeSortFetch(sortBy, direction, taskSignal, parameterFilter),
...common,
}) as AsyncGenerator<unknown>,
@@ -332,11 +326,7 @@ async function* mergedModelIterator(
(task, taskSignal) =>
listModels({
hubUrl: getHfEndpoint(),
- search: {
- query,
- ...(task ? { task } : {}),
- ...(tags ? { tags } : {}),
- },
+ search: { query, ...(task ? { task } : {}) },
fetch: makeSortFetch(sortBy, direction, taskSignal, parameterFilter),
...common,
}) as AsyncGenerator<unknown>,
@@ -665,10 +655,6 @@ export function useHubModelSearch(
enabled?: boolean;
keepUnsupportedTags?: boolean;
channel?: HfModelSearchChannel | null;
- /** Hub tags for the no-query listing, e.g. ["gguf"] when the view shows only GGUF rows. */
- listingTags?: readonly string[];
- /** Float unsloth repos above the rest of a no-query browse under any sort, as a search does. */
- unslothFirstBrowse?: boolean;
filters?: ModelSearchFilters;
},
) {
@@ -684,8 +670,6 @@ export function useHubModelSearch(
enabled = true,
keepUnsupportedTags = false,
channel = null,
- listingTags,
- unslothFirstBrowse = false,
filters,
} = options ?? {};
const unslothOnly = ownerScope === "unsloth";
@@ -694,11 +678,6 @@ export function useHubModelSearch(
const channelTagsKey = channel?.tags ? channel.tags.join("|") : "";
const channelQuery = channel?.query ?? "";
const channelIdSuffix = channel?.idSuffix ?? "";
- const listingTagsKey = listingTags?.join("|") ?? "";
- const browseTags = useMemo(
- () => (listingTagsKey ? listingTagsKey.split("|") : undefined),
- [listingTagsKey],
- );
const priorityIdsKey = priorityIds?.join("|") ?? "";
const stablePriorityIds = useMemo(
() => (priorityIdsKey ? priorityIdsKey.split("|") : undefined),
@@ -791,11 +770,7 @@ export function useHubModelSearch(
filterRange,
) as AsyncGenerator<unknown>;
}
- if (
- (hasFilters || unslothFirstBrowse) &&
- pinUnslothFirst &&
- !unslothOnly
- ) {
+ if (hasFilters && pinUnslothFirst && !unslothOnly) {
return mergedModelIterator(
"",
task,
@@ -806,20 +781,18 @@ export function useHubModelSearch(
signal,
filterRange,
filterPriority,
- browseTags,
);
}
- // Unsloth-only scope restricts the plain sort browse to the org.
- const browseSearch = {
- ...(unslothOnly ? { owner: "unsloth" } : {}),
- ...(browseTags ? { tags: browseTags } : {}),
- };
return mergeTaskIterators(
normalizeTaskFilter(task),
(task, taskSignal) =>
listModels({
hubUrl: getHfEndpoint(),
- search: { ...browseSearch, ...(task ? { task } : {}) },
+ // Unsloth-only scope restricts the plain sort browse to the org.
+ search: {
+ ...(unslothOnly ? { owner: "unsloth" } : {}),
+ ...(task ? { task } : {}),
+ },
additionalFields: ALL_FIELDS,
fetch: makeSortFetch(
sortBy,
@@ -875,8 +848,6 @@ export function useHubModelSearch(
unslothOnly,
hasFilters,
filterRange,
- browseTags,
- unslothFirstBrowse,
],
);
diff --git a/studio/frontend/src/features/hub/hub-page.tsx b/studio/frontend/src/features/hub/hub-page.tsx
index edba3f9044d..b8ee4cfd63f 100644
--- a/studio/frontend/src/features/hub/hub-page.tsx
+++ b/studio/frontend/src/features/hub/hub-page.tsx
@@ -122,10 +122,6 @@ import {
supersedingRefresh,
} from "./lib/superseded-refresh";
import { studioPageForTask } from "./lib/unsloth-support";
-import {
- listingTagsForFormat,
- recommendedNeedsLikes,
-} from "./lib/format-filters";
import {
buildDiscoverRows,
detectResultFormat,
@@ -934,10 +930,6 @@ export function ModelsPage() {
direction: effectiveDirection,
channel: listChannel,
ownerScope,
- listingTags:
- mode === "search"
- ? listingTagsForFormat(effectiveDiscoverFormat, checkpointQuantFormats)
- : undefined,
filters: searchFilters,
task:
capabilityFilter === "audio" ? (linkedAudioTask ?? undefined) : undefined,
@@ -1058,7 +1050,6 @@ export function ModelsPage() {
// search and every other format show all matches.
(effectiveDiscoverFormat !== "recommended" ||
hasQuery ||
- (mode === "search" && !recommendedNeedsLikes(effectiveSort)) ||
resolveOwnerProviderLogo(row.owner, row.repo) !== null ||
(row.result.likes ?? 0) >= MIN_ICONLESS_MODEL_LIKES) &&
(effectiveDiscoverFormat === "recommended"
@@ -1087,8 +1078,6 @@ export function ModelsPage() {
hiddenEmbeddingModelIds,
isDatasetMode,
hasQuery,
- mode,
- effectiveSort,
effectiveDiscoverFormat,
checkpointQuantFormats,
diffusionQuantFormats,
diff --git a/studio/frontend/src/features/hub/lib/format-filters.ts b/studio/frontend/src/features/hub/lib/format-filters.ts
index 8a40e5be2df..b6daa35f444 100644
--- a/studio/frontend/src/features/hub/lib/format-filters.ts
+++ b/studio/frontend/src/features/hub/lib/format-filters.ts
@@ -97,23 +97,6 @@ export function matchesRecommended(
return format !== null && checkpointQuantFormats.includes(format);
}
-/** Hub tags for a listing whose format filter only shows GGUF rows, else undefined. */
-export function listingTagsForFormat(
- formatFilter: FormatFilterValue,
- checkpointQuantFormats: readonly string[],
-): readonly string[] | undefined {
- return formatFilter === "gguf" ||
- (formatFilter === "recommended" && checkpointQuantFormats.length === 0)
- ? GGUF_LISTING_TAGS
- : undefined;
-}
-const GGUF_LISTING_TAGS: readonly string[] = ["gguf"];
-
-/** Recommended's likes floor needs a popularity sort: under Newest no fresh upload has likes yet. */
-export function recommendedNeedsLikes(sort: string): boolean {
- return sort !== "createdAt" && sort !== "lastModified";
-}
-
// Inference-only quant formats Unsloth cannot fine-tune. Matched on the repo
// name since the search listing often omits the quant config.
const NON_FINETUNABLE_NAME =
diff --git a/studio/frontend/tests/hub-recommended-format.test.ts b/studio/frontend/tests/hub-recommended-format.test.ts
index b5cde76d792..6375ad4dc2e 100644
--- a/studio/frontend/tests/hub-recommended-format.test.ts
+++ b/studio/frontend/tests/hub-recommended-format.test.ts
@@ -6,10 +6,8 @@ import test from "node:test";
import {
checkpointQuantFormat,
- listingTagsForFormat,
matchesFormat,
matchesRecommended,
- recommendedNeedsLikes,
} from "../src/features/hub/lib/format-filters.ts";
import { readSrcAsync } from "./helpers/kit.ts";
@@ -75,7 +73,7 @@ test("the likes threshold only curates Recommended, and Recommended is the defau
const page = await readSrcAsync("features/hub/hub-page.tsx");
assert.match(
page,
- /effectiveDiscoverFormat !== "recommended" \|\|\s*hasQuery \|\|\s*\(mode === "search" && !recommendedNeedsLikes\(effectiveSort\)\) \|\|\s*resolveOwnerProviderLogo/,
+ /effectiveDiscoverFormat !== "recommended" \|\|\s*hasQuery \|\|\s*resolveOwnerProviderLogo/,
);
assert.doesNotMatch(page, /preset\?\.format \?\? "gguf"/);
const channels = await readSrcAsync("features/hub/lib/channels.ts");
@@ -143,38 +141,3 @@ test("a capable Recommended channel query drops the GGUF-only tag", async () =>
/tags: widenRecommendedChannel\s*\?\s*withoutGgufTag\(liveListChannel\.tags\)\s*:\s*liveListChannel\.tags/,
);
});
-
-test("Newest and Recently updated skip the likes floor no fresh upload can meet", () => {
- for (const sort of ["trendingScore", "downloads", "likes"]) {
- assert.equal(recommendedNeedsLikes(sort), true, sort);
- }
- assert.equal(recommendedNeedsLikes("createdAt"), false);
- assert.equal(recommendedNeedsLikes("lastModified"), false);
-});
-
-test("GGUF-only views ask the Hub for GGUF repos, others list every format", async () => {
- assert.deepEqual(listingTagsForFormat("gguf", []), ["gguf"]);
- assert.deepEqual(listingTagsForFormat("gguf", ["fp8"]), ["gguf"]);
- assert.deepEqual(listingTagsForFormat("recommended", []), ["gguf"]);
- // FP8 / NVFP4 checkpoints pass Recommended here, and they are not GGUF repos.
- assert.equal(listingTagsForFormat("recommended", ["fp8"]), undefined);
- for (const format of ["all", "checkpoint", "mlx", "npu"] as const) {
- assert.equal(listingTagsForFormat(format, []), undefined, format);
- }
- const page = await readSrcAsync("features/hub/hub-page.tsx");
- assert.match(
- page,
- /listingTags:\s*mode === "search"\s*\?\s*listingTagsForFormat\(effectiveDiscoverFormat, checkpointQuantFormats\)\s*:\s*undefined/,
- );
-});
-
-test("a Discover browse floats unsloth repos first under any sort, other pickers keep their listing", async () => {
- const discover = await readSrcAsync("features/hub/hooks/use-discover-search.ts");
- assert.match(discover, /unslothFirstBrowse: true,/);
- const search = await readSrcAsync("features/hub/hooks/use-hub-model-search.ts");
- assert.match(search, /unslothFirstBrowse = false,/);
- assert.match(
- search,
- /if \(\s*\(hasFilters \|\| unslothFirstBrowse\) &&\s*pinUnslothFirst &&\s*!unslothOnly\s*\) \{\s*return mergedModelIterator\(/,
- );
-});