feat: add --no-expand flag to vsearch and query commands#160
Open
cryptomonkey84 wants to merge 1 commit intotobi:mainfrom
Open
feat: add --no-expand flag to vsearch and query commands#160cryptomonkey84 wants to merge 1 commit intotobi:mainfrom
cryptomonkey84 wants to merge 1 commit intotobi:mainfrom
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
--no-expandflag tovsearchandquerycommands that skips query expansion, avoiding the need to download and load the 1.28GBqmd-query-expansion-1.7BGGUF model.Problem
On low-RAM machines (8GB), the expansion model download gets OOM-killed before completing, making
vsearchandquerycompletely 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
--no-expandboolean CLI flagstore.expandQueryis temporarily overridden to return[], skipping expansion in bothvectorSearchQueryandhybridQuerytry/finallyTesting
Raw vector search still returns relevant results (57-63% similarity scores in testing). Expansion improves recall but isn't essential.