Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

address review (codex): exclude mmproj projector GGUFs from quant variants

[._.]/ Adam Eivy32a426ffc690
diff --git a/server/services/huggingFaceCatalog.js b/server/services/huggingFaceCatalog.js
index 0d98e522c8..6e15be7d04 100644
--- a/server/services/huggingFaceCatalog.js
+++ b/server/services/huggingFaceCatalog.js
@@ -157,10 +157,18 @@ function siblingsOf(model) {
return Array.isArray(model?.siblings) ? model.siblings : []
}
+// Multimodal projector / auxiliary GGUFs (llama.cpp's `mmproj-*`) are not
+// standalone model quants — they ship alongside a model and the runtime loads
+// them automatically. They must never be offered as an installable variant or
+// chosen as the RAM-aware default (a projector is small, so on a tight box the
+// "largest that fits" picker would otherwise land on it). Excluded here so both
+// the variant list and pickGgufFile's default skip them.
+const AUX_GGUF_RE = /mmproj/i
+
function ggufFilesOf(model) {
return siblingsOf(model)
.map((s) => ({ name: normalizeText(s.rfilename || s.name), size: Number.isFinite(s.size) ? s.size : null }))
- .filter((file) => /\.gguf$/i.test(file.name))
+ .filter((file) => /\.gguf$/i.test(file.name) && !AUX_GGUF_RE.test(file.name))
}
function hasGgufSignal(model) {
diff --git a/server/services/huggingFaceCatalog.test.js b/server/services/huggingFaceCatalog.test.js
index fbd9a031b0..650386e4ca 100644
--- a/server/services/huggingFaceCatalog.test.js
+++ b/server/services/huggingFaceCatalog.test.js
@@ -301,6 +301,23 @@ describe('huggingFaceCatalog', () => {
expect(result.installed).toBe(true)
})
+ it('excludes multimodal projector (mmproj) GGUFs from variants and the default pick', async () => {
+ const repo = 'unsloth/Qwen2-VL-7B-GGUF'
+ fetch
+ .mockResolvedValueOnce(listing(repo, ['Qwen2-VL-7B-Q4_K_M.gguf', 'mmproj-Qwen2-VL-7B-f16.gguf']))
+ .mockResolvedValueOnce(blobs(repo, {
+ 'Qwen2-VL-7B-Q4_K_M.gguf': 5_000_000_000,
+ 'mmproj-Qwen2-VL-7B-f16.gguf': 1_400_000_000,
+ }))
+
+ // 8 GB box: with the projector counted, the tight-budget fallback (smallest)
+ // would wrongly land on the 1.4 GB projector. It must be excluded entirely.
+ const [result] = await searchHuggingFaceModels({ backend: 'ollama', query: 'qwen2-vl', systemMemoryBytes: 8 * 1024 ** 3 })
+
+ expect(result.variants.map((v) => v.quant)).toEqual(['Q4_K_M'])
+ expect(result.id).toBe(`hf.co/${repo}:Q4_K_M`)
+ })
+
it('marks per-quant installed state for Ollama variants and aligns the result flag with the default', async () => {
const repo = 'empero-ai/Qwythos-9B-Installed-GGUF'
fetch