讨论:参考 QMD 设计,默认使用本地向量化模型降低启动成本 / Discussion: Referencing QMD Design, Using Local Vectorization Models by Default to Reduce Startup Costs #601
Replies: 3 comments 3 replies
-
深入调研更新:OpenClaw QMD Backend 实际使用情况基于本地安装测试和对 OpenClaw/QMD 源码的进一步调研,补充一些关键发现: 1. OpenClaw 与 QMD 的模型关系OpenClaw 不暴露 QMD 模型配置 —— 当设置 从 OpenClaw GitHub issue #17263 可以确认:
这意味着:
2. QMD 模型下载实测
总计约 2.1GB,首次使用需要等待模型下载。 3. QMD 官方推荐的模型切换方案# 默认 embeddinggemma-300M(英文优化,~300MB)
# 如需多语言/CJK 支持,切换为 Qwen3-Embedding:
export QMD_EMBED_MODEL="hf:Qwen/Qwen3-Embedding-0.6B-GGUF/Qwen3-Embedding-0.6B-Q8_0.gguf"
qmd embed -f # 强制重新 embed注意:切换模型后必须重新生成所有向量( 4. 对 OpenViking 的启发考虑到上述调研结果,建议 OpenViking 在参考 QMD 时:
|
Beta Was this translation helpful? Give feedback.
-
|
"OpenViking 定位是 OpenClaw 的上下文数据库" 应该改成 "OpenViking 定位是 Agent 的上下文数据库",OpenClaw 是其中之一。与 OpenClaw 深度整合并允许配置推导,可以是一个 addon feature |
Beta Was this translation helpful? Give feedback.
-
|
[English Translation/Summary] In-depth Research Update: OpenClaw QMD Backend Usage AnalysisBased on local installation testing and further investigation of OpenClaw/QMD source code, here are key findings: 1. OpenClaw & QMD Model RelationshipOpenClaw doesn't expose QMD model configuration. When setting Confirmed by OpenClaw GitHub issue #17263: "QMD handles its own embeddings internally — there's no modelPath in the OpenClaw config because QMD uses its own embeddinggemma model" This means:
2. QMD Model Download Testing Results
Total ~2.1GB, requires waiting for model downloads on first use. 3. QMD Official Model Switching Approach# Default: embeddinggemma-300M (English-optimized, ~300MB)
# For multilingual/CJK support, switch to Qwen3-Embedding:
export QMD_EMBED_MODEL="hf:Qwen/Qwen3-Embedding-0.6B-GGUF/Qwen3-Embedding-0.6B-Q8_0.gguf"
qmd embed -f # Force re-embeddingNote: After switching models, must regenerate all vectors ( 4. Implications for OpenVikingBased on these findings, suggestions for OpenViking when referencing QMD:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
背景
QMD (Query Markup Documents) 是 Shopify 创始人 Tobi Lütke 开发的本地混合搜索引擎,最近在 OpenClaw 社区受到广泛关注。
核心建议
1. 默认使用本地向量化模型
QMD 的设计理念值得借鉴:
默认使用本地 GGUF 模型(embedding-gemma-300M,~300MB)
零配置启动:无需 API Key,无需网络请求
隐私优先:数据不向外部传输
可切换:支持通过环境变量切换到其他模型(如 Qwen3-Embedding 支持中文)
当前 OpenViking 需要配置远程 embedding API 才能运行,这对新用户是一道门槛。
2. 复用 OpenClaw 的模型配置
考虑到 OpenViking 定位是 OpenClaw 的上下文数据库,可以探索:
参考实现
QMD 的模型管理策略:
预期收益
降低启动成本:新用户无需申请 API Key 即可体验完整功能
提升隐私性:敏感数据不向第三方 embedding 服务传输
离线可用:无网络环境下仍可正常使用
与 OpenClaw 深度整合:复用已有模型配置,减少重复工作
可能的实现路径
集成 node-llama-cpp 或类似的本地 GGUF 推理能力
提供
embedding.provider: "local"选项作为默认配置检测 OpenClaw 配置,自动复用其模型设置
非常期待听到社区对这个想法的反馈!
Beta Was this translation helpful? Give feedback.
All reactions