Token Classification
Transformers
Safetensors
English
modernbert
fill-mask
orality
linguistics
multi-label
custom_code
Instructions to use HavelockAI/bert-token-classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use HavelockAI/bert-token-classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="HavelockAI/bert-token-classifier", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("HavelockAI/bert-token-classifier", trust_remote_code=True) model = AutoModelForMaskedLM.from_pretrained("HavelockAI/bert-token-classifier", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- modeling_havelock.py +1 -0
modeling_havelock.py
CHANGED
|
@@ -88,6 +88,7 @@ class HavelockTokenConfig(PretrainedConfig):
|
|
| 88 |
|
| 89 |
model_type = "havelock_token_classifier"
|
| 90 |
_tied_weights_keys = []
|
|
|
|
| 91 |
|
| 92 |
def __init__(self, num_types: int = 1, use_crf: bool = False, **kwargs):
|
| 93 |
super().__init__(**kwargs)
|
|
|
|
| 88 |
|
| 89 |
model_type = "havelock_token_classifier"
|
| 90 |
_tied_weights_keys = []
|
| 91 |
+
all_tied_weights_keys = {}
|
| 92 |
|
| 93 |
def __init__(self, num_types: int = 1, use_crf: bool = False, **kwargs):
|
| 94 |
super().__init__(**kwargs)
|