Skip to content

feat: add --no-expand flag to vsearch and query commands#160

Open
cryptomonkey84 wants to merge 1 commit intotobi:mainfrom
cryptomonkey84:fix/no-expand-flag
Open

feat: add --no-expand flag to vsearch and query commands#160
cryptomonkey84 wants to merge 1 commit intotobi:mainfrom
cryptomonkey84:fix/no-expand-flag

Conversation

@cryptomonkey84
Copy link

Adds a --no-expand flag to vsearch and query commands that skips query expansion, avoiding the need to download and load the 1.28GB qmd-query-expansion-1.7B GGUF model.

Problem

On low-RAM machines (8GB), the expansion model download gets OOM-killed before completing, making vsearch and query completely unusable. The 300MB embedding model works fine — it's specifically the query expansion step that's the blocker.

Fixes #158. Related: #147, #155 (same family of resource exhaustion issues).

Changes

  • Added --no-expand boolean CLI flag
  • When set, store.expandQuery is temporarily overridden to return [], skipping expansion in both vectorSearchQuery and hybridQuery
  • Original function restored via try/finally
  • Help text updated for both commands

Testing

qmd vsearch --no-expand "test query"    # Works without 1.28GB model
qmd vsearch "test query"                 # Unchanged behaviour
qmd query --no-expand "test query"       # Works without expansion model

Raw vector search still returns relevant results (57-63% similarity scores in testing). Expansion improves recall but isn't essential.

Skip query expansion to avoid loading the 1.28GB qmd-query-expansion
model. On low-RAM machines (8GB), the expansion model download gets
OOM-killed, making vsearch and query completely unusable.

With --no-expand, searches use the original query only. Results are
still relevant (57-63% similarity scores in testing) — expansion
improves recall but isn't essential.

Fixes tobi#158
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

qmd search and qmd vsearch both can work but qmd query always be auto killed.

1 participant

Comments