Downloads · 30 days
15
11% of all-time downloads
sekarkrishna/sapbert-int8
sapbert-int8 is a feature extraction model from sekarkrishna. Use it when you need embeddings to search or compare text. It is set up for onnxruntime. The card lists the license as apache-2.0.
ONNX INT8 quantized version of cambridgeltl/SapBERT-from-PubMedBERT-fulltext for efficient biomedical entity embeddings.
Downloads · 30 days
15
11% of all-time downloads
All-time downloads
139
Public
Repo size
110 MB
Likes
0
Public
Click a slice to open those files.
.onnx110 MB · 99%
From the Hugging Face model README
ONNX INT8 quantized version of cambridgeltl/SapBERT-from-PubMedBERT-fulltext for efficient biomedical entity embeddings.
| Property | Value |
|---|---|
| Base Model | cambridgeltl/SapBERT-from-PubMedBERT-fulltext |
| Format | ONNX |
| Quantization | INT8 (dynamic quantization) |
| Embedding Dimension | 768 |
| Quantized by | JustEmbed |
This is a quantized ONNX export of SapBERT, a biomedical entity linking model trained on UMLS concepts. The INT8 quantization reduces model size and improves inference speed while maintaining high accuracy for biomedical text embeddings.
SapBERT (Self-Alignment Pre-training for BERT) was developed by the Cambridge Language Technology Lab for biomedical entity representation learning.
model_quantized.onnx — INT8 quantized ONNX modeltokenizer.json — Fast tokenizerconfig.json — Model configurationfrom justembed import Embedder
embedder = Embedder("sapbert-int8")
vectors = embedder.embed(["aspirin", "acetylsalicylic acid"])
import onnxruntime as ort
from transformers import AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained(".")
session = ort.InferenceSession("model_quantized.onnx")
inputs = tokenizer("aspirin", return_tensors="np")
outputs = session.run(None, dict(inputs))
This model is a derivative work of cambridgeltl/SapBERT-from-PubMedBERT-fulltext.
The original model is licensed under Apache License 2.0. This quantized version is distributed under the same license. See the LICENSE file for the full text.
@inproceedings{liu2021self,
title={Self-Alignment Pretraining for Biomedical Entity Representations},
author={Liu, Fangyu and Shareghi, Ehsan and Meng, Zaiqiao and Basaldella, Marco and Collier, Nigel},
booktitle={Proceedings of NAACL},
year={2021}
}