Instructions to use menadsa/S-Bio_ClinicalBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use menadsa/S-Bio_ClinicalBERT with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("menadsa/S-Bio_ClinicalBERT") sentences = [ "That is a happy person", "That is a happy dog", "That is a very happy person", "Today is a sunny day" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Transformers
How to use menadsa/S-Bio_ClinicalBERT with Transformers:
# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("menadsa/S-Bio_ClinicalBERT") model = AutoModel.from_pretrained("menadsa/S-Bio_ClinicalBERT") - Notebooks
- Google Colab
- Kaggle
This model is broken
will not load -- errors out in hosted API with:
Unable to load weights from pytorch checkpoint file for '/data/menadsa_S-Bio_ClinicalBERT/pytorch_model.bin' at '/data/menadsa_S-Bio_ClinicalBERT/pytorch_model.bin'. If you tried to load a PyTorch model from a TF 2.0 checkpoint, please set from_tf=True.
Yes, the bin file is corrupted.
The bin file is still corrupted.
This is the error in my case: RuntimeError: PytorchStreamReader failed reading zip archive: failed finding central directory. This is an internal miniz error. If you are seeing this error, there is a high likelihood that your checkpoint file is corrupted. This can happen if the checkpoint was not saved properly, was transferred incorrectly, or the file was modified after saving.