Skip to content

Embeddings

By default, Remem generates embeddings locally with the pplx-embed-context-v1-0.6b model inside the Go server, so production does not depend on an external embedding API. The model is installed once into its own directory on first start, from Hugging Face or from Docker Hub; see Docker Compose.

Remem can also accept vectors from your application. See Use your own embedder for external model configuration and REST examples.

PropertyValue
Modelpplx-embed-context-v1-0.6b
Dimensions1,024
Similarity metricCosine
InferenceCPU, local, in-process

The model is configured via the [embedding] section of remem.toml:

[embedding]
model = "pplx-embed-context-v1-0.6b"
cache_size = 10000 # embeddings kept in LRU cache

Once installed, the built-in model needs no internet connection at runtime and no external embedding API. It uses 1,024 dimensions. To use a different embedding model, configure the external provider and send vectors from your application; changing embedding.model alone does not load an arbitrary model. Changing models requires new embeddings, not just a rebuild of the vector index.

  • On store_memory — the content is embedded and the vector is stored in the HNSW index
  • On search_memories with search_type: "semantic" or search_type: "hybrid" — the query is embedded at search time

Relationship discovery is controlled by the [discovery] section of remem.toml:

[discovery]
enabled = true
threshold = 0.6
top_k = 5

When a memory is stored, its embedding is compared against existing memories; pairs with cosine similarity at or above discovery.threshold get linked, capped at discovery.top_k new edges per memory. This runs on a background worker, so store_memory returns before discovery completes.

Lower values create denser graphs with more loose connections. Higher values create sparser graphs with only strong connections.

For long documents, consider:

  • Storing paragraph-level chunks as separate memories and linking them with part_of connections
  • Summarising the content and storing the summary as the memory content