Feature Extraction
Transformers
PyTorch
Safetensors
Hebrew
bert
custom_code
text-embeddings-inference
Instructions to use dicta-il/dictabert-joint with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use dicta-il/dictabert-joint with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="dicta-il/dictabert-joint", trust_remote_code=True)# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("dicta-il/dictabert-joint", trust_remote_code=True) model = AutoModel.from_pretrained("dicta-il/dictabert-joint", trust_remote_code=True) - Notebooks
- Google Colab
- Kaggle
Update BertForJointParsing.py
Browse files- BertForJointParsing.py +4 -1
BertForJointParsing.py
CHANGED
|
@@ -40,7 +40,10 @@ class ModuleRef:
|
|
| 40 |
return self.module(*args, **kwargs)
|
| 41 |
|
| 42 |
class BertForJointParsing(BertPreTrainedModel):
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
def __init__(self, config, do_syntax=None, do_ner=None, do_prefix=None, do_lex=None, do_morph=None, syntax_head_size=64):
|
| 46 |
super().__init__(config)
|
|
|
|
| 40 |
return self.module(*args, **kwargs)
|
| 41 |
|
| 42 |
class BertForJointParsing(BertPreTrainedModel):
|
| 43 |
+
tied_weights_keys = {
|
| 44 |
+
"cls.predictions.decoder.weight": "bert.embeddings.word_embeddings.weight",
|
| 45 |
+
"cls.predictions.decoder.bias": "cls.predictions.bias",
|
| 46 |
+
}
|
| 47 |
|
| 48 |
def __init__(self, config, do_syntax=None, do_ner=None, do_prefix=None, do_lex=None, do_morph=None, syntax_head_size=64):
|
| 49 |
super().__init__(config)
|