From d702da7746dde6e716ccb39050877649789c8b5b Mon Sep 17 00:00:00 2001 From: Biogenic Ooze Date: Thu, 19 Nov 2026 17:03:58 +0300 Subject: [PATCH 1/2] feat(hub): group configured Strata variants by weights repository --- ...-strata-profiles-from-the-model-catalog.md | 14 +++++++ docs/decisions/INDEX.md | 1 + .../strata/__tests__/strata-catalog.test.ts | 18 +++++++++ web-app/src/services/strata/catalog.ts | 39 +++++++++++++------ 4 files changed, 60 insertions(+), 12 deletions(-) create mode 100644 docs/decisions/2026-11-19-reuse-strata-profiles-from-the-model-catalog.md diff --git a/docs/decisions/2026-11-19-reuse-strata-profiles-from-the-model-catalog.md b/docs/decisions/2026-11-19-reuse-strata-profiles-from-the-model-catalog.md new file mode 100644 index 000000000..12349e57c --- /dev/null +++ b/docs/decisions/2026-11-19-reuse-strata-profiles-from-the-model-catalog.md @@ -0,0 +1,14 @@ +--- +date: 2026-11-19 +title: Group configured Strata models by weights repository +--- + +# Group configured Strata models by weights repository + +Catalog-defined models can reuse an engine profile across independent releases. +Group their compatible quantizations by family, source host and repository of +the first weight shard. The source of auxiliary files such as Engram is shared +between releases. Each choice retains its own installation ID and disk check. + +The browser SDK and bundled app core must both support the optional +`strata-profile-models` collection before a desktop release exposes it. diff --git a/docs/decisions/INDEX.md b/docs/decisions/INDEX.md index 6cf3c4a7a..ecac96f27 100644 --- a/docs/decisions/INDEX.md +++ b/docs/decisions/INDEX.md @@ -577,6 +577,7 @@ decision is reversed, add a new one that says which record it supersedes. ## Strata (3) - **2026-11-16** — [Group Strata quantizations in the Hub](2026-11-16-group-strata-quantizations-in-the-hub.md) +- [2026-11-19 — Group configured Strata models by weights repository](2026-11-19-reuse-strata-profiles-from-the-model-catalog.md) - **2026-11-16** — [Curate Strata in the Mac Model Hub](2026-11-16-curate-strata-in-the-mac-model-hub.md) - **2026-11-16** — [Keep Strata source acquisition in desktop](2026-11-16-keep-strata-source-acquisition-in-desktop.md) diff --git a/web-app/src/services/strata/__tests__/strata-catalog.test.ts b/web-app/src/services/strata/__tests__/strata-catalog.test.ts index 0ae76e268..b7185c249 100644 --- a/web-app/src/services/strata/__tests__/strata-catalog.test.ts +++ b/web-app/src/services/strata/__tests__/strata-catalog.test.ts @@ -49,6 +49,24 @@ describe('Strata Hub catalog', () => { ]) }) + it('groups configured variants by their weights repository and preserves independent install IDs', () => { + const [base] = strataCatalogRows(fixture) + const d = base.strata! + const configured = (variant_id: string, repo: string) => ({ + ...base, + strata: { + ...d, variant_id, profile_id: d.variant_id, + sources: d.sources.map(source => source.id === 'weights' ? { ...source, repo } : source), + }, + }) + const a = configured('a-small', 'owner/model-a') + const b = configured('a-large', 'owner/model-a') + const c = configured('b-small', 'owner/model-b') + expect(groupStrataCatalogRows([base, a, b, c], d.compatible_variants[0])).toEqual([ + base, { ...a, strataVariants: [a.strata, b.strata] }, c, + ]) + }) + it('projects pinned variants with their full size and dedicated engine', () => { const [model] = strataCatalogRows(fixture) expect(model.model_name).toBe('strata/ud-q4-k-xl-mtp') diff --git a/web-app/src/services/strata/catalog.ts b/web-app/src/services/strata/catalog.ts index 29f282c98..93670883e 100644 --- a/web-app/src/services/strata/catalog.ts +++ b/web-app/src/services/strata/catalog.ts @@ -5,33 +5,48 @@ import { unifiedModelCatalog } from '@/services/unified-model-catalog' export const DEFAULT_STRATA_QWEN38 = 'iq3-xxs-dflash2' +type HubDescriptor = NonNullable & { profile_id?: string } + +const defaultProfiles = new Set([ + DEFAULT_STRATA_QWEN38, + 'ud-q4-k-xl-mtp', + 'ista-2-00bpw-dspark', +]) + +function isDefaultProfile(d: HubDescriptor) { + return defaultProfiles.has(d.profile_id ?? d.variant_id) +} + +function groupKey(d: HubDescriptor) { + if (d.profile_id) { + const weight = d.files.find(file => file.path === d.inputs.weights[0]) + const source = d.sources.find(source => source.id === weight?.source) + return source ? `${d.family}/${source.host}/${source.repo}` : d.variant_id + } + const release = d.family === 'qwen38' + ? /^(unsloth|swift|coder|gyro|nvfp4)-/.exec(d.variant_id)?.[1] ?? 'original' + : '' + return `${d.family}/${release}` +} + export function groupStrataCatalogRows( models: readonly CatalogModel[], backendId?: string ): CatalogModel[] { - const defaultVariants = new Set([ - DEFAULT_STRATA_QWEN38, - 'ud-q4-k-xl-mtp', - 'ista-2-00bpw-dspark', - ]) const groups = new Map() for (const model of models) { const descriptor = model.strata if (!descriptor) continue - const id = descriptor.variant_id - if (backendId ? !descriptor.compatible_variants.includes(backendId) : !defaultVariants.has(id)) + if (backendId ? !descriptor.compatible_variants.includes(backendId) : !isDefaultProfile(descriptor)) continue - const release = descriptor.family === 'qwen38' - ? /^(unsloth|swift|coder|gyro|nvfp4)-/.exec(id)?.[1] ?? 'original' - : '' - const key = `${descriptor.family}/${release}` + const key = groupKey(descriptor) const group = groups.get(key) if (group) group.push(model) else groups.set(key, [model]) } return [...groups.values()].map((group) => { - const primary = group.find(({ strata }) => defaultVariants.has(strata!.variant_id)) ?? group[0]! + const primary = group.find(({ strata }) => isDefaultProfile(strata!)) ?? group[0]! return group.length > 1 ? { ...primary, strataVariants: group.map(({ strata }) => strata!) } : primary From 8f15add626f84fb4129616675a0210b50734e5c6 Mon Sep 17 00:00:00 2001 From: Biogenic Ooze Date: Thu, 19 Nov 2026 17:25:47 +0300 Subject: [PATCH 2/2] fix(hub): label Strata quants when variants share a card title --- .../containers/hub/StrataDownloadOptions.tsx | 11 +++++----- .../hub/__tests__/strata-downloads.test.tsx | 21 ++++++++++++++++++- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/web-app/src/containers/hub/StrataDownloadOptions.tsx b/web-app/src/containers/hub/StrataDownloadOptions.tsx index 7bfc467df..ea1204e8e 100644 --- a/web-app/src/containers/hub/StrataDownloadOptions.tsx +++ b/web-app/src/containers/hub/StrataDownloadOptions.tsx @@ -34,9 +34,10 @@ import { import { switchToModel } from '@/utils/switchModel' import { route } from '@/constants/routes' -function quantLabel(name: string) { - // Catalog names carry the quant label as a suffix, including special precision profiles. - return name.match(/\b(?:(?:UD-)?I?Q\d(?:_[a-z0-9]+)+(?:-v\d+)?|NVFP4[- ][a-z0-9]+|Gyro-[SM]|\d+(?:\.\d+)? bpw|ISTA-DAS Coder)$/i)?.[0] ?? name +function quantLabel({ name, inputs }: StrataModelDescriptor) { + const suffix = /\b(?:(?:UD-)?I?Q\d(?:_[a-z0-9]+)+(?:-v\d+)?|NVFP4[- ][a-z0-9]+|Gyro-[SM]|\d+(?:\.\d+)? bpw|ISTA-DAS Coder)$/i + const weightsName = inputs.weights[0]?.replace(/(?:-\d{5}-of-\d{5})?\.gguf$/i, '') + return name.match(suffix)?.[0] ?? weightsName?.match(suffix)?.[0] ?? name } export function StrataQuantSelect({ @@ -53,7 +54,7 @@ export function StrataQuantSelect({ const { t } = useTranslation() if (variants.length < 2) return null const selected = variants.find((variant) => variant.variant_id === selectedId) ?? variants[0]! - const label = quantLabel(selected.name) + const label = quantLabel(selected) return ( @@ -82,7 +83,7 @@ export function StrataQuantSelect({ value={variant.variant_id} className="justify-between gap-4" > - {quantLabel(variant.name)} + {quantLabel(variant)} {formatBytes(variant.requirements.download_bytes)} diff --git a/web-app/src/containers/hub/__tests__/strata-downloads.test.tsx b/web-app/src/containers/hub/__tests__/strata-downloads.test.tsx index 753d9a959..79960f934 100644 --- a/web-app/src/containers/hub/__tests__/strata-downloads.test.tsx +++ b/web-app/src/containers/hub/__tests__/strata-downloads.test.tsx @@ -7,7 +7,7 @@ import { installStrata, listStrataJobs } from '@/services/strata/install' import { strataCatalogRows } from '@/services/strata/catalog' import fixture from '@/services/strata/__tests__/fixtures/catalog.json' import { useModelProvider } from '@/hooks/useModelProvider' -import { StrataDownloadOptions } from '../StrataDownloadOptions' +import { StrataDownloadOptions, StrataQuantSelect } from '../StrataDownloadOptions' vi.mock('@tanstack/react-router', () => ({ useNavigate: () => vi.fn() })) vi.mock('@/hooks/useServiceHub', () => ({ useServiceHub: () => ({}) })) @@ -59,6 +59,25 @@ afterEach(() => { vi.resetAllMocks() }) +it('shows three distinct quants for a shared DeepSeek card title', async () => { + const user = userEvent.setup() + const quants = ['IQ1_M', 'IQ2_XXS', 'IQ2_XS'] + const variants = quants.map(quant => ({ + ...descriptor, + name: 'DeepSeek-V4.1-Flash-1017 Uncensored', + variant_id: quant.toLowerCase(), + inputs: { ...descriptor.inputs, weights: [`DeepSeek-V4.1-Flash-1017-GSQ-RCO-${quant}-00001-of-00004.gguf`] }, + })) + const onChange = vi.fn() + render() + await user.click(screen.getByRole('button', { name: 'hub:strata.quantization: IQ2_XXS' })) + for (const quant of quants) { + expect(screen.getByRole('menuitemradio', { name: new RegExp('^' + quant + ' ') })).toBeVisible() + } + await user.click(screen.getByRole('menuitemradio', { name: /^IQ1_M / })) + expect(onChange).toHaveBeenCalledWith('iq1_m') +}) + it('shows the refusal from core and disables acquisition for this model and backend', async () => { vi.mocked(engineBuildCatalog).mockResolvedValue({ host_backend_id: 'macos-arm64-metal',