MemPalace / MemPalace/mempalace
Feature request: support configurable embedding model (e.g. embeddinggemma-300m for multilingual)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 59.2k
- Forks
- 7.6k
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 88
Description
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 migrateormempalace repairto re-index existing palaces (different model = different vector dims) - Auto-download the model on first use
Context
- README references:
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 yet- ChromaDB
SentenceTransformerEmbeddingFunctioncan 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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading mempalace/embedding.py and mempalace/onboarding.py, then inspect the existing mempalace migrate and repair CLI paths. Trace how the current embedding function and model choice are configured, and check the README references for the intended model names. Done means model selection is configurable, the current English model remains the default, and existing palaces have a documented re-indexing path for model changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- huggingface, python
- Domain
- cli, databases, machine-learning
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100