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) - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse files- modeling_havelock.py +1 -0
modeling_havelock.py
CHANGED
|
@@ -92,6 +92,7 @@ class HavelockTokenConfig(PretrainedConfig):
|
|
| 92 |
super().__init__(**kwargs)
|
| 93 |
self.num_types = num_types
|
| 94 |
self.use_crf = use_crf
|
|
|
|
| 95 |
|
| 96 |
|
| 97 |
class HavelockTokenClassifier(PreTrainedModel):
|
|
|
|
| 92 |
super().__init__(**kwargs)
|
| 93 |
self.num_types = num_types
|
| 94 |
self.use_crf = use_crf
|
| 95 |
+
self.post_init()
|
| 96 |
|
| 97 |
|
| 98 |
class HavelockTokenClassifier(PreTrainedModel):
|