feat(qmd): switch to Qwen3 4B embedding and reranker models

Use Qwen3-Embedding-4B and Qwen3-Reranker-4B (both Q4_K_M) for QMD local
search, and make the switch reach existing installations:

- Rewrite the setup-owned models block on every install and update, while
  still recording the user's original block only once.
- When the new embedding size no longer matches stored vectors, the daemon
  clears the old vectors and re-embeds the repository.
- Delete setup-downloaded model files the current models no longer use.
- Skip npm and pnpm lockfiles and minified bundles when indexing
  repositories, which saves embedding work and removes search noise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Julian LechnerandClaude Opus 5.5 committed 2026-11-16 09:51:58 +01:00
1 parent 3fcd7bcbfd
commit ca4cb2a144
8 files changed
+113 -10

No files matched your search

+2 -2
View File
@@ -8,8 +8,8 @@ import { dirname, join, resolve } from 'node:path';
import { pathToFileURL } from 'node:url';
export const MODELS = {
embed: 'hf:Qwen/Qwen3-Embedding-0.6B-GGUF/Qwen3-Embedding-0.6B-Q8_0.gguf',
rerank: 'hf:ggml-org/Qwen3-Reranker-0.6B-Q8_0-GGUF/qwen3-reranker-0.6b-q8_0.gguf',
embed: 'hf:Qwen/Qwen3-Embedding-4B-GGUF/Qwen3-Embedding-4B-Q4_K_M.gguf',
rerank: 'hf:giladgd/Qwen3-Reranker-4B-GGUF/Qwen3-Reranker-4B.Q4_K_M.gguf',
generate: 'hf:tobil/qmd-query-expansion-1.7B-gguf/qmd-query-expansion-1.7B-q4_k_m.gguf',
};
export const MASK = '**/*.{md,py,cs,ts,tsx,js,jsx,mjs,go,rs,java,ps1,sh,json,yml,yaml,xml,sql}';