Downloads · 30 days
14
2% of all-time downloads
batterydata/bert-base-cased-abstract
bert-base-cased-abstract is a text classification model from batterydata. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as apache-2.0.
Language model: bert-base-cased Language: English Downstream-task: Text Classification Training data: training\data.csv Eval data: val\data.csv Code: See example Infrastructure: 8x DGX A100
Downloads · 30 days
14
2% of all-time downloads
All-time downloads
703
Public
Repo size
1.7 GB
Likes
0
Public
Click a slice to open those files.
.pt867 MB · 67%
From the Hugging Face model README
Language model: bert-base-cased
Language: English
Downstream-task: Text Classification
Training data: training_data.csv
Eval data: val_data.csv
Code: See example
Infrastructure: 8x DGX A100
batch_size = 32
n_epochs = 15
base_LM_model = "bert-base-cased"
learning_rate = 2e-5
"Validation accuracy": 96.84,
"Test accuracy": 96.83,
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
model_name = "batterydata/bert-base-cased-abstract"
# a) Get predictions
nlp = pipeline('text-classification', model=model_name, tokenizer=model_name)
input = {'The typical non-aqueous electrolyte for commercial Li-ion cells is a solution of LiPF6 in linear and cyclic carbonates.'}
res = nlp(input)
# b) Load model & tokenizer
model = AutoModelForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
Shu Huang: sh2009 [at] cam.ac.uk
Jacqueline Cole: jmc61 [at] cam.ac.uk
BatteryBERT: A Pre-trained Language Model for Battery Database Enhancement