Skip to main content

Ready to use BioBert pytorch weights for HuggingFace pytorch BertModel.

Project description

Biobertology

Ready to use BioBert pytorch weights for HuggingFace pytorch BertModel.

To load the model:

from biobertology import get_biobert, get_tokenizer

biobert = get_biobert(model_dir=None, download=True)
tokenizer = get_tokenizer()

Example of fine tuning biobert here.

How was it converted to pytorch?

Model weights have been downloaded from here and converted

by following the commands described here.pytorch

Specifically, using the command:

pytorch_transformers bert biobert_v1.1_pubmed/model.ckpt-1000000 biobert_v1.1_pubmed/bert_config.json biobert_v1.1_pubmed/pytorch_model.bin

followed by the renaming of the config file:

mv biobert_v1.1_pubmed/bert_config.json biobert_v1.1_pubmed/config.json

all of the other files inside the original weights file have been deleted.

Project details


Release history Release notifications | RSS feed

This version

0.9

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

biobert-pytorch-0.9.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

biobert_pytorch-0.9-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page