|
Download README.md from Angshul/SpliNet-Embedder: direct link, hf CLI and curl.
- Browser
- Download file 1.89 kB
-
https://huggingface.co/Angshul/SpliNet-Embedder/resolve/main/README.md
- Command line
-
hf download hf://Angshul/SpliNet-Embedder/README.md
-
curl -L -o README.md https://huggingface.co/Angshul/SpliNet-Embedder/resolve/main/README.md
1.89 kB
| license: agpl-3.0 | |
| pipeline_tag: feature-extraction | |
| language: | |
| - en | |
| tags: | |
| - sentence-embeddings | |
| - sentence-similarity | |
| - splinet | |
| - torchscript | |
| # SpliNet Embedder | |
| Sentence-embedding version of SpliNet. | |
| The complete encoder was fine-tuned end-to-end on **134,378 positive QQP duplicate pairs** using symmetric contrastive learning. | |
| ## Model | |
| | Property | Value | | |
| |---|---:| | |
| | Encoder parameters | **82,270,464** | | |
| | Embedding dimension | **768** | | |
| | Maximum input length | **512 tokens** | | |
| | Pooling | Masked mean | | |
| | Output | L2-normalized | | |
| | Fine-tuning pairs | **134,378** | | |
| | Epochs | **1** | | |
| | Optimization steps | **8,958** | | |
| ## Full evaluation | |
| | Benchmark | Metric | Score | | |
| |---|---|---:| | |
| | STSBenchmark | Pearson | **0.5257** | | |
| | STSBenchmark | Spearman | **0.5174** | | |
| | SciFact | nDCG@10 | **0.1928** | | |
| | SciFact | MAP@10 | **0.1686** | | |
| | SciFact | MRR@10 | **0.1766** | | |
| | SciFact | Recall@10 | **0.2614** | | |
| | SciFact | Recall@100 | **0.4413** | | |
| | Twenty Newsgroups | Mean V-measure | **0.1532** | | |
| | Twenty Newsgroups | Mean homogeneity | **0.1510** | | |
| | Twenty Newsgroups | Mean completeness | **0.1555** | | |
| Twenty Newsgroups evaluation used **59,545 texts** across all ten subsets. | |
| ## Files | |
| - `splinet_embedder.ts` — complete deployable TorchScript encoder | |
| - `splinet_embedder_full_qqp.pt` — original trained checkpoint | |
| - `spiece.model` — tokenizer | |
| - `api.py` — Python/FastAPI interface | |
| - `model_info.json` — metadata | |
| - `evaluation/` — benchmark results | |
| - `training/` — final training metadata | |
| ## Usage | |
| Install `requirements.txt`, then: | |
| from api import encode, similarity | |
| z = encode(['first sentence', 'second sentence']) | |
| print(z.shape) | |
| To serve: | |
| python api.py | |
| Endpoints: `/health`, `/model-info`, `/embed`, `/similarity`. | |
| Base model: https://huggingface.co/Angshul/SpliNet | |
| Source: https://github.com/AngshulMajumdar/SpliNet | |