Skip to content

feat(conversation-memory): upgrade to EmbeddingGemma for better multilingual support - #363

Merged
baleen37 merged 1 commit into
mainfrom
feat/conversation-memory-embeddinggemma
Feb 3, 2026
Merged

feat(conversation-memory): upgrade to EmbeddingGemma for better multilingual support#363
baleen37 merged 1 commit into
mainfrom
feat/conversation-memory-embeddinggemma

Conversation

@baleen37

@baleen37 baleen37 commented Feb 3, 2026

Copy link
Copy Markdown
Owner

Summary

Upgrades conversation-memory plugin from all-MiniLM-L6-v2 to EmbeddingGemma-300M for significantly better multilingual (especially Korean) support.

Key Changes

  • Embedding Model: Switch to onnx-community/embeddinggemma-300m-ONNX with Q4 quantization
  • Performance: 51% better Korean performance (83.86 vs 55.4 MRR@10)
  • Dimensions: 768-dim embeddings (vs 384) for better semantic representation
  • Languages: 100+ language support with MTEB Multilingual score of 60.62
  • Package: Migrated from @xenova/transformers to @huggingface/transformers v3

Breaking Changes

⚠️ Database must be recreated due to embedding dimension mismatch (384 → 768).

Migration guide added to README with step-by-step instructions.

Technical Details

  • Model size: ~197MB (Q4 quantization)
  • Memory usage: < 200MB RAM
  • Task prefix: "title: none | text: ..." (automatically applied)
  • Cache directory: ./.cache for model storage

Test Plan

  • Pre-commit hooks pass
  • Manual testing: conversation indexing
  • Manual testing: semantic search
  • Verify model downloads and caches correctly

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Updated embedding model with enhanced 768-dimensional vector support for improved search relevance
    • v2.0 includes multilingual capabilities and optimized memory efficiency
  • Documentation

    • Added comprehensive migration guide for upgrading from v1.x to v2.0
    • Expanded documentation with architecture details, updated examples, and storage structure information

…lingual support

Switch from Xenova/all-MiniLM-L6-v2 to onnx-community/embeddinggemma-300m-ONNX:
- 51% better Korean performance (83.86 vs 55.4 MRR@10)
- 768-dimensional embeddings (vs 384)
- 100+ language support
- Q4 quantization for efficiency (~197MB model)

Breaking change: Database must be recreated due to dimension mismatch.
Migration guide added to README.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@baleen37
baleen37 merged commit f8167a0 into main Feb 3, 2026
1 check passed
@baleen37
baleen37 deleted the feat/conversation-memory-embeddinggemma branch February 3, 2026 11:24
@coderabbitai

coderabbitai Bot commented Feb 3, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The conversation-memory plugin is upgraded to use the HuggingFace transformers library with the EmbeddingGemma model (768-dimensional embeddings with Q4 quantization) replacing Xenova's 384-dimensional variant. Documentation is substantially expanded with migration guidance and architecture details.

Changes

Cohort / File(s) Summary
Documentation & Migration
plugins/conversation-memory/README.md
Expanded with upgrading from v1.x migration steps, What's New in v2.0 section with model metrics, architecture notes for EmbeddingGemma, and updated dependency references (huggingface/transformers).
Dependencies
plugins/conversation-memory/package.json
Swapped transformer provider from @xenova/transformers to @huggingface/transformers.
Vector Schema & Embedding Pipeline
plugins/conversation-memory/src/core/db.ts, plugins/conversation-memory/src/core/embeddings.ts
Updated vector embedding dimension from 384 to 768 in database schema. Migrated embedding model to EmbeddingGemma (ONNX) with Q4 quantization, added mandatory task prefix format ("title: none | text: ..."), and expanded token truncation limit from 2000 to 8000.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Suggested labels

enhancement

Poem

🐰 Gemma hops in with dimensions galore,
768 embeddings, not 384 anymore!
Task prefixes align, transformers renewed,
The memory plugin's embedding mood!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/conversation-memory-embeddinggemma

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

ghost pushed a commit that referenced this pull request Feb 3, 2026
# [4.0.0](v3.4.0...v4.0.0) (2026-02-03)

### Features

* **conversation-memory:** upgrade to EmbeddingGemma for better multilingual support ([#363](#363)) ([f8167a0](f8167a0))

### BREAKING CHANGES

* **conversation-memory:** Database must be recreated due to dimension mismatch.
Migration guide added to README.

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
baleen37 pushed a commit to baleen37/memmem that referenced this pull request Feb 15, 2026
# [4.0.0](baleen37/bstack@v3.4.0...v4.0.0) (2026-02-03)

### Features

* **conversation-memory:** upgrade to EmbeddingGemma for better multilingual support ([#363](baleen37/bstack#363)) ([f8167a0](baleen37/bstack@f8167a0))

### BREAKING CHANGES

* **conversation-memory:** Database must be recreated due to dimension mismatch.
Migration guide added to README.

Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant