Instructions to use SoTrxII/analytical-pattern-embedder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use SoTrxII/analytical-pattern-embedder with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("SoTrxII/analytical-pattern-embedder") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
MoMa analytical pattern embedder
EmbeddingGemma 2 fine-tuned to match a user's task to the Analytical Pattern (AP) that answers it, for the search of the DataGEMS MoMa Management service. Text only, 768 dimensions.
It is a LoRA adapter merged into unsloth/embeddinggemma-2 at revision c8f89cc7ecb4ba5122cd15fdd487422b2b487daf.
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("<this repository>", config_kwargs={"vision_config": None, "audio_config": None})
task = model.encode_query("Which students are at risk of failing?")
aps = model.encode_document(["Translates a natural-language string into a safe SQL query, ..."])
Queries and AP texts are given different prefixes, so use encode_query and
encode_document rather than encode. The AP text the model was trained on is the one
AnalyticalPattern.describe() builds from an AP's operators, not the AP's own description.
Dataset, training and benchmark: https://github.com/datagems-eosc/moma-management/tree/main/packages/analytical-pattern-embedder
- Downloads last month
- 29