Fill-Mask
Transformers
PyTorch
Norwegian
Norwegian Bokmål
Norwegian Nynorsk
BERT
NorBERT
Norwegian
encoder
custom_code
Instructions to use ltg/norbert3-base with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ltg/norbert3-base with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="ltg/norbert3-base", trust_remote_code=True)# Load model directly from transformers import AutoModelForMaskedLM model = AutoModelForMaskedLM.from_pretrained("ltg/norbert3-base", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
Update modeling_norbert.py
Browse files- modeling_norbert.py +0 -1
modeling_norbert.py
CHANGED
|
@@ -246,7 +246,6 @@ class NorbertPreTrainedModel(PreTrainedModel):
|
|
| 246 |
|
| 247 |
if isinstance(module, nn.Linear):
|
| 248 |
nn.init.trunc_normal_(module.weight.data, mean=0.0, std=std, a=-2*std, b=2*std)
|
| 249 |
-
module.weight.data.normal_(mean=0.0, std=self.config.initializer_range)
|
| 250 |
if module.bias is not None:
|
| 251 |
module.bias.data.zero_()
|
| 252 |
elif isinstance(module, nn.Embedding):
|
|
|
|
| 246 |
|
| 247 |
if isinstance(module, nn.Linear):
|
| 248 |
nn.init.trunc_normal_(module.weight.data, mean=0.0, std=std, a=-2*std, b=2*std)
|
|
|
|
| 249 |
if module.bias is not None:
|
| 250 |
module.bias.data.zero_()
|
| 251 |
elif isinstance(module, nn.Embedding):
|