Feature Extraction
Transformers
Safetensors
sentence-transformers
English
modernbert
splade
sparse
retrieval
sentence-similarity
custom_code
text-embeddings-inference
Instructions to use Linkup-Platform/linkup-sparseup-embed-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Linkup-Platform/linkup-sparseup-embed-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Linkup-Platform/linkup-sparseup-embed-v1", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("Linkup-Platform/linkup-sparseup-embed-v1", trust_remote_code=True) model = AutoModel.from_pretrained("Linkup-Platform/linkup-sparseup-embed-v1", trust_remote_code=True, device_map="auto") - sentence-transformers
How to use Linkup-Platform/linkup-sparseup-embed-v1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("Linkup-Platform/linkup-sparseup-embed-v1", trust_remote_code=True) sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,15 +11,15 @@ tags:
|
|
| 11 |
- modernbert
|
| 12 |
---
|
| 13 |
|
| 14 |
-
#
|
| 15 |
|
| 16 |
-
> **TL;DR:**
|
| 17 |
|
| 18 |
For the full story, see the **[blog post](TODO)**.
|
| 19 |
|
| 20 |
## About
|
| 21 |
|
| 22 |
-
LightOn released open data and a recipe to train **DenseOn** (single-vector) and **LateOn** (late interaction). **
|
| 23 |
|
| 24 |
Three extra knobs *vs* vanilla SPLADE:
|
| 25 |
1. **`logit_shift=15`** — `log(1 + ReLU(x − 15))` so ReLU support starts sparse
|
|
@@ -30,12 +30,12 @@ Prefixes `[Q] ` / `[D] ` are attended but not pooled. Scoring is **dot product**
|
|
| 30 |
|
| 31 |
## BEIR (nDCG@10)
|
| 32 |
|
| 33 |
-
* Controlled comparison against LateOn and DenseOn (same backbone / data).
|
| 34 |
| Model | Avg | Avg (w/o MS MARCO) |
|
| 35 |
| --- | --- | --- |
|
| 36 |
| LateOn | **57.9** | **58.9** |
|
| 37 |
| DenseOn | 56.9 | 57.9 |
|
| 38 |
-
|
|
| 39 |
|
| 40 |
*Comparison against competitive sparse encoders. Best model at <150M parameters.*
|
| 41 |
| Model | Avg (wo/ MS MARCO) |
|
|
@@ -45,12 +45,12 @@ Prefixes `[Q] ` / `[D] ` are attended but not pooled. Scoring is **dot product**
|
|
| 45 |
| ModernBERT-VT | 52.4 |
|
| 46 |
| opensearch-neural-sparse-encoding-v1 | 52.44 |
|
| 47 |
| opensearch-neural-sparse-encoding-doc-v3-gte | 54.6 |
|
| 48 |
-
|
|
| 49 |
| LACONIC-1B** | 58.7 |
|
| 50 |
|
| 51 |
-
##
|
| 52 |
|
| 53 |
-
Using dedicated infra (Seismic), retrieval with
|
| 54 |
|
| 55 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/6273df31c3b822dad2d1eef2/Jjf8ZPgmiTkwi4hGz-gev.png" width="500">
|
| 56 |
|
|
@@ -166,6 +166,7 @@ print(model.highlight(document, kind="document", color=True))
|
|
| 166 |
```
|
| 167 |
‹The› ⟦presence⟧ «of» ⟦communication⟧ ⟦amid⟧ ⟦scientific⟧ ⟦minds⟧ «was» ⟦equally⟧ ⟦important⟧ «to» the ⟦success⟧ «of» «the» ⟦Manhattan⟧ ⟦Project⟧ «as» ‹scientific› ⟦intellect⟧ was«.» ‹The› «only» ⟦cloud⟧ ⟦hanging⟧ «over» the ⟦impressive⟧ ⟦achievement⟧ of the ⟦atomic⟧ ⟦researchers⟧ ‹and› ⟦engineers⟧ ‹is› what their «success» «truly» ⟦meant;⟧ ⟦hundreds⟧ «of» ⟦thousands⟧ «of» ⟦innocent⟧ ⟦lives⟧ ⟦obliterated⟧.
|
| 168 |
```
|
|
|
|
| 169 |
|
| 170 |
### Sentence Transformers
|
| 171 |
|
|
|
|
| 11 |
- modernbert
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# SPARSEUP
|
| 15 |
|
| 16 |
+
> **TL;DR:** SPARSEUP is a strong and efficient sparse retriever trained on the same backbone family and fine-tuning data as DenseOn / LateOn (149M, ModernBERT). Strongest public vocabulary-based sparse encoder we know of under 150M on BEIR-13 (56.4 nDCG@10). Apache 2.0. Use it!
|
| 17 |
|
| 18 |
For the full story, see the **[blog post](TODO)**.
|
| 19 |
|
| 20 |
## About
|
| 21 |
|
| 22 |
+
LightOn released open data and a recipe to train **DenseOn** (single-vector) and **LateOn** (late interaction). **SPARSEUP** fills the missing slot: a learned sparse bag over the BPE vocab, so the three architectures can be compared with backbone and data held fixed. The model is initialized from `LateOn-unsupervised` with ModernBERT’s MLM `head` / `decoder.bias` grafted on (`decoder.weight` stays tied to LateOn embeddings). Contrastive fine-tuning on LightOn’s mixture (7 hard negatives sampled from 50, plus in-batch). No cross-encoder distillation.
|
| 23 |
|
| 24 |
Three extra knobs *vs* vanilla SPLADE:
|
| 25 |
1. **`logit_shift=15`** — `log(1 + ReLU(x − 15))` so ReLU support starts sparse
|
|
|
|
| 30 |
|
| 31 |
## BEIR (nDCG@10)
|
| 32 |
|
| 33 |
+
* Controlled comparison against LateOn and DenseOn (same backbone / data). SPARSEUP uses Seismic (approximate); their numbers are exact search.*
|
| 34 |
| Model | Avg | Avg (w/o MS MARCO) |
|
| 35 |
| --- | --- | --- |
|
| 36 |
| LateOn | **57.9** | **58.9** |
|
| 37 |
| DenseOn | 56.9 | 57.9 |
|
| 38 |
+
| SPARSEUP | 55.4 | 56.4 |
|
| 39 |
|
| 40 |
*Comparison against competitive sparse encoders. Best model at <150M parameters.*
|
| 41 |
| Model | Avg (wo/ MS MARCO) |
|
|
|
|
| 45 |
| ModernBERT-VT | 52.4 |
|
| 46 |
| opensearch-neural-sparse-encoding-v1 | 52.44 |
|
| 47 |
| opensearch-neural-sparse-encoding-doc-v3-gte | 54.6 |
|
| 48 |
+
| SPARSEUP | **56.4** |
|
| 49 |
| LACONIC-1B** | 58.7 |
|
| 50 |
|
| 51 |
+
## SPARSEUP is fast
|
| 52 |
|
| 53 |
+
Using dedicated infra (Seismic), retrieval with SPARSEUP is sub-*ms* on MS MARCO (single-threaded).
|
| 54 |
|
| 55 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/6273df31c3b822dad2d1eef2/Jjf8ZPgmiTkwi4hGz-gev.png" width="500">
|
| 56 |
|
|
|
|
| 166 |
```
|
| 167 |
‹The› ⟦presence⟧ «of» ⟦communication⟧ ⟦amid⟧ ⟦scientific⟧ ⟦minds⟧ «was» ⟦equally⟧ ⟦important⟧ «to» the ⟦success⟧ «of» «the» ⟦Manhattan⟧ ⟦Project⟧ «as» ‹scientific› ⟦intellect⟧ was«.» ‹The› «only» ⟦cloud⟧ ⟦hanging⟧ «over» the ⟦impressive⟧ ⟦achievement⟧ of the ⟦atomic⟧ ⟦researchers⟧ ‹and› ⟦engineers⟧ ‹is› what their «success» «truly» ⟦meant;⟧ ⟦hundreds⟧ «of» ⟦thousands⟧ «of» ⟦innocent⟧ ⟦lives⟧ ⟦obliterated⟧.
|
| 168 |
```
|
| 169 |
+
<img src="https://cdn-uploads.huggingface.co/production/uploads/6273df31c3b822dad2d1eef2/E05aAsyYwDzWCrha9EPhP.png" width="1000">
|
| 170 |
|
| 171 |
### Sentence Transformers
|
| 172 |
|