Instructions to use CALDISS-AAU/DA-BERT_Old_News_V3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use CALDISS-AAU/DA-BERT_Old_News_V3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="CALDISS-AAU/DA-BERT_Old_News_V3")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("CALDISS-AAU/DA-BERT_Old_News_V3") model = AutoModelForMaskedLM.from_pretrained("CALDISS-AAU/DA-BERT_Old_News_V3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -8,6 +8,8 @@ base_model:
|
|
| 8 |
- vesteinn/DanskBERT
|
| 9 |
pipeline_tag: fill-mask
|
| 10 |
library_name: transformers
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
# Model Card for Model ID
|
| 13 |
DA-Bert_Old_News_V3 is the third version of a transformer trained on Danish historical texts from the period during Danish Absolutism (1660-1849). It is developed by researchers at Aalborg University. The aim of the model is to create a domain-specific model to capture meaning from texts that are far enough removed in time that they no longer read like contemporary Danish.
|
|
@@ -101,7 +103,7 @@ generator(
|
|
| 101 |
paa en Tid af 11 Dage gjort, fra den 14 til d. 25. April Syv andre fremmede Skibe
|
| 102 |
som tillige med dem vare den indtrofne, have ogsaa gjort god Reyse."
|
| 103 |
)
|
| 104 |
-
|
| 105 |
|
| 106 |
## Training Details
|
| 107 |
|
|
@@ -119,6 +121,29 @@ Trained on the
|
|
| 119 |
|
| 120 |
|
| 121 |
#### Training Hyperparameters
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 122 |
|
| 123 |
- **Training regime:** fp16 mixed precision was used <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 124 |
|
|
@@ -205,4 +230,4 @@ Trained on the
|
|
| 205 |
## Model Card Contact
|
| 206 |
- [CALDISS](www.caldiss.aau.dk)
|
| 207 |
- Matias Appel (mkap@adm.aau.dk)
|
| 208 |
-
- Johan Heinsen (heinsen@dps.aau.dk)
|
|
|
|
| 8 |
- vesteinn/DanskBERT
|
| 9 |
pipeline_tag: fill-mask
|
| 10 |
library_name: transformers
|
| 11 |
+
metrics:
|
| 12 |
+
- perplexity
|
| 13 |
---
|
| 14 |
# Model Card for Model ID
|
| 15 |
DA-Bert_Old_News_V3 is the third version of a transformer trained on Danish historical texts from the period during Danish Absolutism (1660-1849). It is developed by researchers at Aalborg University. The aim of the model is to create a domain-specific model to capture meaning from texts that are far enough removed in time that they no longer read like contemporary Danish.
|
|
|
|
| 103 |
paa en Tid af 11 Dage gjort, fra den 14 til d. 25. April Syv andre fremmede Skibe
|
| 104 |
som tillige med dem vare den indtrofne, have ogsaa gjort god Reyse."
|
| 105 |
)
|
| 106 |
+
```
|
| 107 |
|
| 108 |
## Training Details
|
| 109 |
|
|
|
|
| 121 |
|
| 122 |
|
| 123 |
#### Training Hyperparameters
|
| 124 |
+
**Training parameters:**
|
| 125 |
+
eval_strategy="steps",
|
| 126 |
+
overwrite_output_dir=False,
|
| 127 |
+
per_device_train_batch_size=16, # Training batch size
|
| 128 |
+
gradient_accumulation_steps=4, # Accumulating the gradients before updating the weights
|
| 129 |
+
per_device_eval_batch_size=32, # Evaluating batch size
|
| 130 |
+
logging_steps=500,
|
| 131 |
+
learning_rate=5e-5,
|
| 132 |
+
save_steps=10000,
|
| 133 |
+
max_steps=120000,
|
| 134 |
+
save_total_limit=10,
|
| 135 |
+
load_best_model_at_end=True,
|
| 136 |
+
metric_for_best_model="eval_loss",
|
| 137 |
+
greater_is_better=False,
|
| 138 |
+
fp16=torch.cuda.is_available(),
|
| 139 |
+
warmup_ratio=0.06,
|
| 140 |
+
weight_decay=0.01,
|
| 141 |
+
lr_scheduler_type="cosine",
|
| 142 |
+
dataloader_num_workers=4,
|
| 143 |
+
dataloader_pin_memory=True,
|
| 144 |
+
save_on_each_node=False,
|
| 145 |
+
ddp_find_unused_parameters=False,
|
| 146 |
+
optim="adamw_torch",
|
| 147 |
|
| 148 |
- **Training regime:** fp16 mixed precision was used <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 149 |
|
|
|
|
| 230 |
## Model Card Contact
|
| 231 |
- [CALDISS](www.caldiss.aau.dk)
|
| 232 |
- Matias Appel (mkap@adm.aau.dk)
|
| 233 |
+
- Johan Heinsen (heinsen@dps.aau.dk)
|