Problem
mempalace/embedding.py hardcodes ONNXMiniLM_L6_V2 (all-MiniLM-L6-v2), an English-only model. For non-English users (Chinese, Japanese, Arabic, etc.), semantic search quality is significantly degraded because the model cannot understand non-English text.
The README already advertises embeddinggemma-300m (multilingual, 100+ languages) as an onboarding option, but the current codebase has no mechanism to actually use it.
Current behavior
# mempalace/embedding.py — hardcoded
def _build_ef_class():
from chromadb.utils.embedding_functions import ONNXMiniLM_L6_V2
class _MempalaceONNX(ONNXMiniLM_L6_V2):
...
Proposed solution
Allow model selection via config or env var, e.g.:
# ~/.mempalace/config.json
{
"embedding_model": "multilingual" # or "english" (default)
}
Where "multilingual" maps to embeddinggemma-300m (or a configurable HuggingFace model ID) and "english" keeps the current all-MiniLM-L6-v2.
The model switch should:
- Be backward-compatible (default stays all-MiniLM-L6-v2)
- Trigger a
mempalace migrate or mempalace repair to re-index existing palaces (different model = different vector dims)
- Auto-download the model on first use
Context
- README references:
embeddinggemma-300m (multilingual) and all-MiniLM-L6-v2 (English-only)
mempalace/onboarding.py mentions model choice in README but not in code
mempalace/migrate CLI command already exists but doesn't handle model migration yet
- ChromaDB
SentenceTransformerEmbeddingFunction can load arbitrary HuggingFace models, which would be a natural implementation path
Impact
Non-English users currently get poor semantic search results. For a tool advertised as "the best-benchmarked open-source AI memory system", multilingual support is table stakes.
Problem
mempalace/embedding.pyhardcodesONNXMiniLM_L6_V2(all-MiniLM-L6-v2), an English-only model. For non-English users (Chinese, Japanese, Arabic, etc.), semantic search quality is significantly degraded because the model cannot understand non-English text.The README already advertises
embeddinggemma-300m(multilingual, 100+ languages) as an onboarding option, but the current codebase has no mechanism to actually use it.Current behavior
Proposed solution
Allow model selection via config or env var, e.g.:
Where
"multilingual"maps toembeddinggemma-300m(or a configurable HuggingFace model ID) and"english"keeps the currentall-MiniLM-L6-v2.The model switch should:
mempalace migrateormempalace repairto re-index existing palaces (different model = different vector dims)Context
embeddinggemma-300m(multilingual) andall-MiniLM-L6-v2(English-only)mempalace/onboarding.pymentions model choice in README but not in codemempalace/migrateCLI command already exists but doesn't handle model migration yetSentenceTransformerEmbeddingFunctioncan load arbitrary HuggingFace models, which would be a natural implementation pathImpact
Non-English users currently get poor semantic search results. For a tool advertised as "the best-benchmarked open-source AI memory system", multilingual support is table stakes.