Instructions to use Chantland/HRAF_MultiLabel_Hierarchical with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Chantland/HRAF_MultiLabel_Hierarchical with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Chantland/HRAF_MultiLabel_Hierarchical")# Load model directly from transformers import AutoTokenizer, HierarchicalMultiLabelClassifier tokenizer = AutoTokenizer.from_pretrained("Chantland/HRAF_MultiLabel_Hierarchical") model = HierarchicalMultiLabelClassifier.from_pretrained("Chantland/HRAF_MultiLabel_Hierarchical") - Notebooks
- Google Colab
- Kaggle
# Load model directly
from transformers import AutoTokenizer, HierarchicalMultiLabelClassifier
tokenizer = AutoTokenizer.from_pretrained("Chantland/HRAF_MultiLabel_Hierarchical")
model = HierarchicalMultiLabelClassifier.from_pretrained("Chantland/HRAF_MultiLabel_Hierarchical")Text Hierarchical Multi-Label Sequence Classification model used to decode if passages contain a misfortunate event, a cause for misfortune, and/or an action to mollify or prevent some misfortune. This hierarchical model takes the sequence classification of main category misfortune labels (EVENT, CAUSE, and ACTION) and feeds them into the classification of 15 sub-labels of these three misfortune labels. effectively, we are taking our Hraf_Multilabel_K-foldsCrossValDemo and feeding it into Chantland/HRAF_Multilabel_SubClasses. 8293 passages were used for Training and split into 5 folds (~6634 for the train set, ~1659 for the validation set over 5 folds).
Parameters:
Transformer: distilbert-base-uncased
Tokenizer: distilbert-base-uncased
learning rate: 2e-05
weight decay: .01
Dropout: .1
Batch Size: 8
Epochs: 10
Metric for best model: F1 micro (total over all label categories)
Current inference testing results not available.
The quick demo is no longer available at this time in hugging face's API
- Downloads last month
- 2
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Chantland/HRAF_MultiLabel_Hierarchical")