Downloads · 30 days
9
2% of all-time downloads
NoWayBack/batteryscibert-uncased-abstract-mtc
batteryscibert-uncased-abstract-mtc is a text classification model from NoWayBack. Use it when you need a label for a piece of text. It is set up for transformers. The card lists the license as mit.
This new model is a fine-tuned version of the BatterySciBERT-uncased model on a few-sample dataset of 1140 abstract of paper. This model is uncased.
Downloads · 30 days
9
2% of all-time downloads
All-time downloads
492
Public
Repo size
879 MB
Likes
2
Public
Click a slice to open those files.
.bin440 MB · 100%
From the Hugging Face model README
This new model is a fine-tuned version
of the BatterySciBERT-uncased model on a few-sample dataset
of 1140
abstract of paper.
This model is uncased.
batch_size = 4
n_epochs = 16
base_LM_model = "batteryscibert-uncased"
learning_rate = 3e-5
"Validation Micro F1-score": 94.54,
"Test Micro F1-score": 93.42,
from transformers import AutoModelForSequenceClassification, AutoTokenizer, pipeline
model_name = "NoWayBack/batteryscibert-uncased-abstract-mtc"
# Get predictions
nlp = pipeline('text-classification', model=model_name, tokenizer=model_name, top_k=5)
input_string = "Sodium-ion batteries are among the most promising alternatives to lithium-based " \
"technologies for grid and other energy storage applications due to their cost benefits " \
"and sustainable resource supply. For the cathode—the component that largely determines the " \
"energy density of a sodium-ion battery cell—one major category of materials is P2-type layered oxides."
res = nlp(input_string)
# Load model & tokenizer
model = AutoModelForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)