Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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.
1 change: 1 addition & 0 deletions docs/decisions/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
11 changes: 6 additions & 5 deletions web-app/src/containers/hub/StrataDownloadOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand All @@ -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 (
<DropdownMenu modal={false}>
Expand Down Expand Up @@ -82,7 +83,7 @@ export function StrataQuantSelect({
value={variant.variant_id}
className="justify-between gap-4"
>
<span className="min-w-0 break-words">{quantLabel(variant.name)}</span>
<span className="min-w-0 break-words">{quantLabel(variant)}</span>
<span className="shrink-0 text-muted-foreground tabular-nums">
{formatBytes(variant.requirements.download_bytes)}
</span>
Expand Down
21 changes: 20 additions & 1 deletion web-app/src/containers/hub/__tests__/strata-downloads.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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: () => ({}) }))
Expand Down Expand Up @@ -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(<StrataQuantSelect variants={variants} selectedId="iq2_xxs" onChange={onChange} />)
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',
Expand Down
18 changes: 18 additions & 0 deletions web-app/src/services/strata/__tests__/strata-catalog.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
39 changes: 27 additions & 12 deletions web-app/src/services/strata/catalog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,48 @@ import { unifiedModelCatalog } from '@/services/unified-model-catalog'

export const DEFAULT_STRATA_QWEN38 = 'iq3-xxs-dflash2'

type HubDescriptor = NonNullable<CatalogModel['strata']> & { 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<string, CatalogModel[]>()
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
Expand Down