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

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support