Agent Skillsmatrixorigin/Memoria › local-embedding

local-embedding

GitHub

提供本地嵌入功能的构建、配置与模型管理指南,支持离线运行及隐私保护。

skills/local-embedding/SKILL.md matrixorigin/Memoria

Trigger Scenarios

需要离线或本地运行文本嵌入 避免使用远程API密钥 配置本地ONNX Runtime嵌入

Install

npx skills add matrixorigin/Memoria --skill local-embedding -g -y
More Options

Use without installing

npx skills use matrixorigin/Memoria@local-embedding

指定 Agent (Claude Code)

npx skills add matrixorigin/Memoria --skill local-embedding -a claude-code -g -y

安装 repo 全部 skill

npx skills add matrixorigin/Memoria --all -g -y

预览 repo 内 skill

npx skills add matrixorigin/Memoria --list

SKILL.md

Frontmatter
{
    "name": "local-embedding",
    "description": "Run embedding on-device with ONNX Runtime. Build from source, model selection, offline mode. Use when setting up local embedding without an API key."
}

Build from Source

Pre-built binaries do NOT include local embedding.

cd Memoria
make build-local
sudo cp memoria/target/release/memoria /usr/local/bin/

Binary is ~50-80MB (bundles ONNX Runtime). Expected.

Configure

memoria init --tool kiro    # No --embedding-* flags needed

Leave EMBEDDING_* env vars empty in mcp.json → local embedding is the default.

How It Works

  1. First query → model downloads to ~/.cache/fastembed/ (~30MB default)
  2. Model loads via ONNX Runtime (~3-5s)
  3. Subsequent queries are fast (in-process)

Models

Model Dim Size Notes
all-MiniLM-L6-v2 384 ~30MB Default. Fast, English
BAAI/bge-m3 1024 ~1.2GB Best quality, multilingual

Change model in mcp.json env block:

{ "EMBEDDING_MODEL": "BAAI/bge-m3", "EMBEDDING_DIM": "1024" }

⚠️ Choose BEFORE first startup. Dimension is locked into schema.

When to Use

Local Remote (OpenAI/SiliconFlow)
Privacy ✅ Offline ⚠️ Text sent to API
Cost Free API key
First query ~3-5s Fast
Build From source Pre-built works
Offline

Recommendation: Use remote unless you need offline/strict privacy.

Troubleshooting

Problem Fix
"compiled without local-embedding" Build from source: make build-local
Model download fails Set HF_ENDPOINT for mirror, or manually download to ~/.cache/fastembed/
High memory Default ~100MB. bge-m3 ~1-2GB. Choose based on available RAM

Version History

  • 63f0289 Current 2026-07-25 08:42

Same Skill Collection

plugins/clawhub/thememoria/SKILL.md
plugins/openclaw/skills/memoria-memory/SKILL.md
plugins/openclaw/skills/memoria-recovery/SKILL.md
skills/api-reference/SKILL.md
skills/architecture/SKILL.md
skills/deployment/SKILL.md
skills/plugin-development/SKILL.md
skills/release/SKILL.md
skills/setup/SKILL.md

Metadata

Files
0
Version
efd3d65
Hash
f963c2bf
Indexed
2026-07-25 08:42

Главная - Вики-сайт
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-08-20 08:18
浙ICP备14020137号-1 $Гость$