Sentence Similarity
sentence-transformers
Safetensors
modernbert
premise-selection
lean
mathlib
text-embeddings-inference
Instructions to use DAPS-Math/DAPS-text-encoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use DAPS-Math/DAPS-text-encoder with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("DAPS-Math/DAPS-text-encoder") 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
File size: 1,236 Bytes
cfbd59a | 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 | ---
license: apache-2.0
base_model: Alibaba-NLP/gte-modernbert-base
base_model_relation: finetune
library_name: sentence-transformers
pipeline_tag: sentence-similarity
tags:
- premise-selection
- lean
- mathlib
---
# DAPS Text Encoder
The text encoder produced by Phase 1 of DAPS, fine-tuned on [Mathlib](https://huggingface.co/datasets/DAPS-Math/DAPS-Mathlib-Graph) from [gte-modernbert-base](https://huggingface.co/Alibaba-NLP/gte-modernbert-base). It produces 768-dimensional embeddings using CLS pooling and can be used independently as a Mathlib text encoder.
For better premise-selection performance, we recommend pairing it with the graph-aware [DAPS Selector](https://huggingface.co/DAPS-Math/DAPS-selector) produced by Phase 2.
```python
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("DAPS-Math/DAPS-text-encoder")
model.max_seq_length = 1024
embeddings = model.encode(
["∀ n : ℕ, n + 0 = n", "∀ a b : ℕ, a + b = b + a"],
normalize_embeddings=True,
)
print(embeddings.shape)
```
DAPS uses a 1024-token input limit. See the [DAPS project page](https://relational-conjecturing.github.io/Dependency-Aware-Premise-Selection/) for the full premise-selection pipeline.
|