breathe-memory/memory_nexus
mvyshhnyvetska 06b392a19b Fix wrong short-text embeddings on Apple Silicon; copyright 37lab OÜ
- memory_nexus: load the sentence-transformer with eager attention when
  the MPS backend is available, and fall back to CPU if the model rejects
  it. PyTorch's default attention kernel on MPS returns wrong vectors for
  XLM-RoBERTa-based models (multilingual-e5, bge-m3) when a short text is
  encoded on its own: about 0.80 cosine to the CPU result for
  multilingual-e5-large, 1.00 with this change. all-MiniLM-L6-v2 was not
  affected.
- tests: loader behaviour with a faked sentence-transformers, plus an
  opt-in check against a real model on a real MPS device.
- README: document the MPS issue and that e5 query/passage prefixes are
  not added by the bundled store.
- LICENSE, README footer: 37lab OÜ.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
2026-11-23 17:57:30 +01:00
..
__init__.py Initial release: breathe-memory v0.1.0 2026-03-26 13:50:00 +01:00
models.py Initial release: breathe-memory v0.1.0 2026-03-26 13:50:00 +01:00
postgres.py Fix wrong short-text embeddings on Apple Silicon; copyright 37lab OÜ 2026-11-23 17:57:30 +01:00
store.py Initial release: breathe-memory v0.1.0 2026-03-26 13:50:00 +01:00