Hafnium49's picture
New: eSEN + l-MM + l-OFM named vector endpoint
8d82b32 verified
metadata
title: Crystal-Embedder-Quad
emoji: πŸ”¬
colorFrom: blue
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
license: mit
hardware: cpu-basic

Crystal-Embedder-Quad

Computes eSEN + l-MM + l-OFM physics embeddings for crystal structures.

Returns named vectors compatible with the crystal-chroma-fusion Qdrant collection.

API

POST /embed

Request:

{"cif": "<CIF file content>"}

Response:

{
  "vectors": {
    "esen": [0.12, -0.34, ...],
    "l_mm": [0.56, 0.78, ...],
    "l_ofm": [0.11, -0.22, ...]
  },
  "dims": {"esen": 128, "l_mm": 758, "l_ofm": 188}
}

GET /health

Returns model loading status and vector dimensions.

Vectors

Vector Dimensions Distance Model Source
esen 128 Cosine eSEN-MD-Direct (OC25) facebook/OC25
l_mm 758 Euclid l-MM_v1 (MEGNet) MatterVial
l_ofm 188 Euclid l-OFM_v1 (MEGNet) MatterVial

Architecture

  • eSEN: Backbone forward hook β†’ node_embedding β†’ l=0 scalar invariants β†’ mean-pool β†’ 128-dim
  • l-MM: MatMiner-encoded MEGNet autoencoder latent β†’ 758-dim
  • l-OFM: OFM-encoded MEGNet autoencoder latent β†’ 188-dim

All vectors are L2-normalized before returning.

Companion Service

Use alongside Crystal-Embedder-Orb (crystal-embedder-orb) which provides the orb (1792-dim) vector. Call both services in parallel, then merge vectors for a complete 4-vector Qdrant query.

Local Development

docker build -t crystal-embedder-quad .
docker run -p 7860:7860 crystal-embedder-quad
curl http://localhost:7860/health