AI SeedbankHelp preserve open and free AI for humanity's future

← All models

TimKond_S-PubMedBert-MedQuAD

TimKond · View on Hugging Face ↗

Get this model

Download TorrentMagnet Link

Seeders: · Leechers:

Model card

The complete upstream card, rendered from this payload's README.md — the same hash-verified bytes the torrent distributes. Images and off-site links are removed; the original card on Hugging Face carries them.


license: mit pipeline_tag: sentence-similarity tags:

  • sentence-transformers
  • feature-extraction
  • sentence-similarity
  • transformers

S-PubMedBert-MedQuAD

This is a sentence-transformers model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.

Usage (Sentence-Transformers)

Using this model becomes easy when you have sentence-transformers installed:

pip install -U sentence-transformers

Then you can use the model like this:

from sentence_transformers import SentenceTransformer
sentences = ["This is an example sentence", "Each sentence is converted"]

model = SentenceTransformer('TimKond/S-PubMedBert-MedQuAD')
embeddings = model.encode(sentences)
print(embeddings)

Usage (HuggingFace Transformers)

Without sentence-transformers, you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.

from transformers import AutoTokenizer, AutoModel
import torch


#Mean Pooling - Take attention mask into account for correct averaging
def mean_pooling(model_output, attention_mask):
    token_embeddings = model_output[0] #First element of model_output contains all token embeddings
    input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
    return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)


# Sentences we want sentence embeddings for
sentences = ['This is an example sentence', 'Each sentence is converted']

# Load model from HuggingFace Hub
tokenizer = AutoTokenizer.from_pretrained('TimKond/S-PubMedBert-MedQuAD')
model = AutoModel.from_pretrained('TimKond/S-PubMedBert-MedQuAD')

# Tokenize sentences
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')

# Compute token embeddings
with torch.no_grad():
    model_output = model(**encoded_input)

# Perform pooling. In this case, max pooling.
sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])

print("Sentence embeddings:")
print(sentence_embeddings)

Evaluation Results

For an automated evaluation of this model, see the Sentence Embeddings Benchmark: https://seb.sbert.net

Training

The model was trained with the parameters:

DataLoader:

torch.utils.data.DataLoader of length 82590 with parameters:

{'batch_size': 2, 'shuffle':True}

Loss:

sentence_transformers.losses.SoftmaxLoss with parameters:

{'num_labels': 2, 'sentence_embedding_dimension': '768'}

Parameters of the fit()-Method:

{
    "callback": null,
    "epochs": 1,
    "evaluation_steps": 0,
    "evaluator": None,
    "max_grad_norm": 1,
    "optimizer_class": "<class 'transformers.optimization.AdamW'>",
    "optimizer_params": {
        "correct_bias": false,
        "eps": 1e-06,
        "lr": 2e-05
    },
    "scheduler": "WarmupLinear",
    "steps_per_epoch": null,
    "warmup_steps": 8259,
    "weight_decay": 0.01
}

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel 
  (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
)

Citing & Authors

Magnet link

Opens the swarm directly in your torrent client — no file download needed. Copy-paste works too:

magnet:?xt=urn:btih:bb6fdb3eae91f15b4cb73a8c36e089f779bb86e1&dn=TimKond_S-PubMedBert-MedQuAD

Open magnet in torrent client · infohash bb6fdb3eae91f15b4cb73a8c36e089f779bb86e1

Files & hashes

PathSizesha1sha256
1_Pooling/config.json190 B (190 B)4e09f293dfe90bba49f87cfe7996271f07be2666a37f83ada23e7887be6b88f4998927dbeac0038af301553c7cd5461413bf1a56
README.md3.7 KB (3,795 B)2150397fb29c5c225901cf9025512b4d2d2eafc691170e5783067aee928316adbafd55e8a6115a0da487571204060b8ebeae6800
config.json634 B (634 B)6c49e5020b0ac1f16cba21203b11eab0fd17930ff29209c2c85f6eeff0a9d028b2c290a8bae83fbf50094e88bc1931bd2d48afb9
config_sentence_transformers.json124 B (124 B)9fab07dc03d80b17eecd1cc5a382c4e1d28d36b857b37e681a9fdba7d2d7eddf16fa0b4e38bac20b893dcc93032d19ba1144cf4f
model.safetensors417.7 MB (437,955,512 B)3a2dff15ba5d824f33d99d961541dcc30ab6cc3a2760b8bc1e5d07b2993876a508ce71f0c811c9bf2202c73ca4423cd0e47da55e
modules.json229 B (229 B)f7640f94e81bb7f4f04daf1668850b38763a13d98f4b264b80206c830bebbdcae377e137925650a433b689343a63bdc9b3145460
pytorch_model.bin417.7 MB (438,007,537 B)db1d76522bd31b2f87bdcfb02bc20a766be304ccf78b94740bd4b98020b72081dc20ecfb7fced9982a8f0b5b48e7d5da0892d48d
sentence_bert_config.json53 B (53 B)f789d99277496b282d19020415c5ba9ca79ac875ec8e29d6dcb61b611b7d3fdd2982c4524e6ad985959fa7194eacfb655a8d0d51
special_tokens_map.json112 B (112 B)e7b0375001f109a6b8873d756ad4f7bbb15fbaa5303df45a03609e4ead04bc3dc1536d0ab19b5358db685b6f3da123d05ec200e3
tokenizer.json436.3 KB (446,771 B)80eaaf87c9801793e8eecc370e452a1d33e0b921cedfc72fd9bdb70db1c94d8cf3360ad64945742f690edfdfcefcc6edf27ad4dc
tokenizer_config.json355 B (355 B)02512c2b0ceb83ea3dfa94e71d73840fbc198483392526c553edf95f161e2dbd4fad228b910036f3075a806ccd47f247c5d85d7b
vocab.txt219.8 KB (225,062 B)9d65c8495e044c70ce1a30e2ae8e2f0b3738dbae7b36651908a88bc38bda41b728b2a598191e0d3b553cbacf7b1e5f026d5b5b9f

Cite this release

Canonical URL
https://aiseedbank.org/models/TimKond_S-PubMedBert-MedQuAD/
Slug
TimKond_S-PubMedBert-MedQuAD
Infohash
bb6fdb3eae91f15b4cb73a8c36e089f779bb86e1
License
mit
Signing key fingerprint
85a3b32c3712427b

Every file carries a locally computed sha256 — verify a download against the signed sums: TimKond_S-PubMedBert-MedQuAD.SHA256SUMS (+ minisign signature).

Provenance

Upstream repositoryTimKond/S-PubMedBert-MedQuAD
Revision (pinned)b73d84decb1da6bd4c1cf084a1b6c6602157d267
Fetched at2026-09-03T20:35:40Z
License at fetchmit
Snapshot toolhuggingface · seedbank 0.1.0

Trackers

✓ verified · rehash-vs-hf-metadata at 2026-09-03T20:35:51Z

mit836.0 MB (876,640,374 bytes)sentence-transformerspytorchsafetensorsbertfeature-extractionsentence-similaritytransformerstext-embeddings-inferenceendpoints_compatible