SAVRN
Search Contact SAVRN

Open-weight model · Zero-shot classification

BiomedCLIP-vit-bert-hf

by Junda Zhu chuhac/BiomedCLIP-vit-bert-hf

1. pure torch and huggingface-based implementation of the original microsoft/BiomedCLIP-PubMedBERT256-vitbasepatch16224 2. rename the checkpoint state key names.

Parameters196M
Context512
Weights1.6 GB
Licensemit
AccessOpen weights
Monthly Downloads12.8k

Runs On

What it takes to serve BiomedCLIP-vit-bert-hf (196M parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 0.4 GB 0.5 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 0.2 GB 0.2 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 0.1 GB 0.1 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Sep 18, 2026.

Model Card

By Junda Zhu, published under mit, revision c44fed22e304.

1. pure torch and huggingface-based implementation of the original microsoft/BiomedCLIP-PubMedBERT256-vitbasepatch16224 2. rename the checkpoint state key names.

Read Junda Zhu's full model card

Huggingface-friendly BiomedCLIP

  1. pure torch and huggingface-based implementation of the original microsoft/BiomedCLIP-PubMedBERT_256-vit_base_patch16_224
  2. rename the checkpoint state key names.

Usage

from transformers import AutoModel, AutoProcessor

model = AutoModel.from_pretrained("chuhac/BiomedCLIP-vit-bert-hf", trust_remote_code=True)
processor = AutoProcessor.from_pretrained("chuhac/BiomedCLIP-vit-bert-hf", trust_remote_code=True)

Configuration

Architecture
BiomedCLIPModel
Context length (tokens)
512
Layers
12
Hidden size
768
Feed-forward size
3,072
Attention heads
12
Vocabulary size
30,522
Stored precision
float32
Model type
clip

Identity and Version

Repository
chuhac/BiomedCLIP-vit-bert-hf
Publisher
Junda Zhu
Task
Zero-shot classification
Modality
Text
Library
transformers
Parameters
196M parameters
Languages
en
Revision
c44fed22e30460c0ea1b033a41b68fdab375d64c
First published
2024-05-08
Last updated
2024-05-31

Files and Weights

11 files, 1.6 GB in total. The weights are 2 files totalling 1.6 GB in bin, safetensors.

Weights2 files · 1.6 GB
Configuration5 files · 52.6 KB
Tokenizer2 files · 679.6 KB
Documentation1 file · 546 B
Repository1 file · 1.5 KB
Every file
FileTypeSizeSHA-256
model.safetensorsWeights783.7 MB 8d6e9edd2275
pytorch_model.binWeights783.7 MB 5bdc400de59a
config.jsonConfiguration2.9 KB
configuration_biomed_clip.pyConfiguration2.7 KB
modeling_biomed_clip.pyConfiguration39.6 KB
preprocessor_config.jsonConfiguration349 B
processing_biomed_clip.pyConfiguration7.2 KB
README.mdDocumentation546 B
.gitattributesRepository1.5 KB
tokenizer.jsonTokenizer679.2 KB
tokenizer_config.jsonTokenizer394 B

License and Download

License
mit
Access
Open weights, no gate
Download size
1.6 GB
Download from Junda Zhu

Released by Junda Zhu through its official repository on Hugging Face. Read the license.

Memory Requirements

PrecisionWeights in memory
As published1.6 GB
16-bit0.4 GB
8-bit0.2 GB
4-bit0.1 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About BiomedCLIP-vit-bert-hf

How much GPU memory does BiomedCLIP-vit-bert-hf need?

About 0.5 GB at 16-bit and 0.1 GB at 4-bit: the weights (196M parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run BiomedCLIP-vit-bert-hf on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use BiomedCLIP-vit-bert-hf commercially?

Yes. BiomedCLIP-vit-bert-hf is released under MIT License. The MIT License is a short permissive license. It permits commercial use, modification and redistribution, provided the copyright notice and permission notice are included.

What is BiomedCLIP-vit-bert-hf's context length?

512 tokens, from the maximum position embeddings in its published configuration.

Similar Models

This model was trained using SentenceTransformers Cross-Encoder class. This model is based on microsoft/deberta-v3-base The model was trained on the SNLI and MultiNLI datasets. For a given sentence pair, it will output three scores corresponding to the labels: contradiction, entailment, neutral. For futher evaluation results, see SBERT.net - Pretrained Cross-Encoder. Pre-trained models can be used like this: You can use the model also directly with Transformers library (without SentenceTransformers library): This model can also be used for zero-shot-classification

Open weights apache-2.0 184M parameters 512 tokens sentence-transformers

This model was trained on the MultiNLI, Fever-NLI and Adversarial-NLI (ANLI) datasets, which comprise 763 913 NLI hypothesis-premise pairs. This base model outperforms almost all large models on the ANLI benchmark. The base model is DeBERTa-v3-base from Microsoft. The v3 variant of DeBERTa substantially outperforms previous versions of the model by including a different pre-training objective, see annex 11 of the original DeBERTa paper. For highest performance (but less speed), I recommend using https://huggingface.co/MoritzLaurer/DeBERTa-v3-large-mnli-fever-anli-ling-wanli. DeBERTa-v3-base-mnli-fever-anli was trained on the MultiNLI, Fever-NLI and Adversarial-NLI (ANLI) datasets, which…

Open weights mit 184M parameters 512 tokens transformers

Model · Zero-shot classification

deberta-v3-base-tasksource-nli

Damien Sileo

NOTE Deprecated: use https://huggingface.co/tasksource/deberta-small-long-nli for longer context and better accuracy. This is DeBERTa-v3-base fine-tuned with multi-task learning on 600+ tasks of the tasksource collection. This checkpoint has strong zero-shot validation performance on many tasks (e.g. 70% on WNLI), and can be used for: - Zero-shot entailment-based classification for arbitrary labels [ZS]. - Natural language inference [NLI] - Hundreds of previous tasks with tasksource-adapters [TA]. - Further fine-tuning on a new task or tasksource task (classification, token classification or multiple-choice) [FT]. NLI training data of this model includes label-nli, a NLI dataset specially…

Open weights apache-2.0 184M parameters 512 tokens transformers

This model was trained on the MultiNLI dataset, which consists of 392 702 NLI hypothesis-premise pairs. The base model is DeBERTa-v3-base from Microsoft. The v3 variant of DeBERTa substantially outperforms previous versions of the model by including a different pre-training objective, see annex 11 of the original DeBERTa paper. For a more powerful model, check out DeBERTa-v3-base-mnli-fever-anli which was trained on even more data. This model was trained on the MultiNLI dataset, which consists of 392 702 NLI hypothesis-premise pairs. DeBERTa-v3-base-mnli was trained using the Hugging Face trainer with the following hyperparameters. The model was evaluated using the matched test set and…

Open weights 184M parameters 512 tokens transformers

Model · Zero-shot classification

deberta-base-long-nli

Tasksource

deberta-v3-base with context length of 1280 fine-tuned on tasksource for 250k steps. I oversampled long NLI tasks (ConTRoL, doc-nli). Training data include helpsteer v1/v2, logical reasoning tasks (FOLIO, FOL-nli, LogicNLI...), OASST, hh/rlhf, linguistics oriented NLI tasks, tasksource-dpo, fact verification tasks. This checkpoint has strong zero-shot validation performance on many tasks (e.g. 70% on WNLI), and can be used for: - Zero-shot entailment-based classification for arbitrary labels [ZS]. - Natural language inference [NLI] - Further fine-tuning on a new task or tasksource task (classification, token classification, reward modeling or multiple-choice) [FT]. Zero-shot GPT-4 scores…

Open weights apache-2.0 184M parameters 1,280 tokens transformers

Models in this series are designed for efficient zeroshot classification with the Hugging Face pipeline. These models can do classification without training data and run on both GPUs and CPUs. An overview of the latest zeroshot classifiers is available in my Zeroshot Classifier Collection. The main update of this zeroshot-v2.0 series of models is that several models are trained on fully commercially-friendly data for users with strict license requirements. These models can do one universal classification task: determine whether a hypothesis is "true" or "not true" given a text (entailment vs. notentailment). This task format is based on the Natural Language Inference task (NLI). The task is…

Open weights mit 184M parameters 512 tokens transformers