Given a short search query, the model generates structured expansions in three formats that qmd uses for hybrid search:
Prefix
Purpose
Example
lex:
Lexical keywords for BM25/FTS5 search
lex: docker container timeout settings
vec:
Natural language for vector similarity search
vec: how to configure docker container timeout
hyde:
Hypothetical document for HyDE retrieval
hyde: Docker containers can be configured with timeout settings using the --stop-timeout flag...
Example
Input:
/no_think Expand this search query:
docker timeout
Output:
lex: docker container timeout
lex: docker stop timeout configuration
vec: how to configure docker container timeout settings
vec: docker container restart timeout policy
hyde: Docker containers can be configured with timeout settings using the --stop-timeout flag. The default timeout is 10 seconds before SIGKILL is sent.
Why LFM2?
LFM2's hybrid architecture (convolutions + attention) is 2x faster at decode/prefill vs standard transformers of the same size — ideal for on-device query expansion where latency matters. Added as an alternative to the default Qwen3-1.7B model in qmd v1.0.7.
1# Use the pre-built GGUF:2exportQMD_GEN_MODEL="hf:OrcsRise/qmd-query-expansion-lfm2-gguf/qmd-query-expansion-lfm2-q8_0.gguf"3qmd query "docker timeout"