Text Classification
Transformers
English
bert
minbert
transformer
sentiment
tokenizer
classification
Instructions to use GlowCheese/minBERT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GlowCheese/minBERT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="GlowCheese/minBERT")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("GlowCheese/minBERT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Commit ·
27888bb
1
Parent(s): 8eff58f
Hotfix
Browse filesFiles changed (2)
- bert.py+1-1
- constants.py+2-2
58 unmodified lines5960616263646558 unmodified linesdef forward(self, hidden_states, attention_mask):"""hidden_states: [bs, seq_len, hidden_state]attention_mask: [bs, 1, 1, seq_len]output: [bs, seq_len, hidden_state]"""58 unmodified lines5960616263646558 unmodified linesdef forward(self, hidden_states, attention_mask):"""hidden_states: [bs, seq_len, hidden_size]attention_mask: [bs, 1, 1, seq_len]output: [bs, seq_len, hidden_state]"""
27 unmodified lines282930313233343527 unmodified lines# Training-specific constantsSEED=11711NUM_CPU_CORES=4EPOCHS=1USE_GPU=FalseBATCH_SIZE_CSE=8BATCH_SIZE_SST=64BATCH_SIZE_CFIMDB=827 unmodified lines282930313233343527 unmodified lines# Training-specific constantsSEED=11711NUM_CPU_CORES=4EPOCHS=10USE_GPU=TrueBATCH_SIZE_CSE=8BATCH_SIZE_SST=64BATCH_SIZE_CFIMDB=8
bert.py+1-1
constants.py+2-2