File size: 1,255 Bytes
566f682
 
ad7feb3
 
 
 
 
 
566f682
ad7feb3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
---
license: apache-2.0
library_name: sentence-transformers
pipeline_tag: sentence-similarity
base_model: unsloth/embeddinggemma-2
tags:
- sentence-transformers
- feature-extraction
---

# 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`.

```python
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