Model Card for Model ID
The language model classifies hail events from historical texts in standardised German.
Model Details
Model Description
This is a fine-tuned German BERT model that has been trained to classify text into three categories: H0, H1 and H2.
- H0: Passage without a hail event.
- H1: A passage describing hail without hail impact. The hailstones are smaller than 2 cm.
- H2: Passage describing hail impact or large accumulation. Hail impact begins at a size of 2 cm. Texts often contain size comparisons, such as hailstones the size of a cherry, walnut, pigeon or hen's egg.
Damage descriptions also qualify, such as leaves, twigs or branches breaking off trees, dents or damage to fruit and vegetables, broken windowpanes or roofs, bark stripped from trees, broken roof tiles, damaged metal cladding and damaged window frames.
Quantity descriptions, such as 'hail was knee-deep in the streets', also fall under this category.
Relative descriptions are also considered.
Training was performed using Hugging Face Transformers with mixed precision (fp16).
- Developed by: Franck Schätz
- Model type: Transformer-based sequence classifier
- Language(s) (NLP): German
- License: Apache-2.0
- Finetuned from model [optional]: microsoft/deberta-v3-base (bert-base-german-cased)
Model Sources [optional]
<!-- Provide the basic links for the model. -->
- Repository:
- Paper [optional]: Paper is in progress
Uses
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
Direct Use
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
- Classification and recognition of historical descriptions of hail events in German-speaking countries into three categories (H0, H1, H2).
- Recognition of hail-related events in texts on climate or environmental history.
Downstream Use [optional]
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
- Event extraction pipelines
- Historical climate reconstruction
- Pre-processing for environmental humanities research
Out-of-Scope Use
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
- Modern social media texts
- Creative writing or generative applications
- Semantic search without further adaptation
Bias, Risks, and Limitations
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
- The model reflects patterns in the historical corpus used for training.
- It may confuse similar weather phenomena such as heavy rain, sleet, or snowstorms.
- Spelling variants (especially pre-1900) can reduce accuracy.
Recommendations
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
- Manual validation is recommended for high-stakes research.
- Retraining is advised when applying the model to different eras or regions (e.g. after 1900 or mediterranean region
).
How to Get Started with the Model
Use the code below to get started with the model.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("your-username/hail-phaseB-bert")
model = AutoModelForSequenceClassification.from_pretrained("your-username/hail-phaseB-bert")
text = "Am 12. Juli 1845 fiel in der Gegend um Ulm ein heftiges Hagelwetter."
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
label_id = outputs.logits.argmax(-1).item()
print("Hail" if label_id == 1 else "No hail")
Training Details
Training Data
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
- Manually annotated German historical weather descriptions
- Classes (3):
H0, H1, H2(see above)
Training Procedure
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
- Split: 80% train / 10% validation / 10% test
Preprocessing [optional]
Preprocessing is used to filter out events in the data that cannot be clearly classified. Events that cannot be classified,
such as in the following quote: ‘In 1689, the cold autumn and late spring began, and with them the prolonged period of high prices,
the harbingers of which were probably the severe hailstorms in 1686/1687,’ are classified as -99 in the data set.
These are removed during preprocessing.
The original quote reads as follows: "Im Jahre 1689 fingen sich die kalte Herbst, und späte Frühling, und mit denselben die
lang anhaltende Teuerung an, derer Vorboten vermutlich die starke Hagelwetter im Jahre 1686/1687 gewesen."
Training Hyperparameters
- Training regime: fp16 <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
Speeds, Sizes, Times [optional]
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
| Parameter | Value |
|---|
| Learning rate | 3e-5 |
| Max length | 256 |
| Label smoothing | 0.05 |
| Scheduler | Cosine |
| Batch size | 16 |
| Epochs | 5 |
| Weight decay | 0.01 |
| Warmup ratio | 0.06 |
| Seed | 42 |
Evaluation
<!-- This section describes the evaluation protocols and provides the results. -->
Testing Data, Factors & Metrics
Testing Data
<!-- This should link to a Dataset Card if possible. -->
[More Information Needed]
Factors
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
[More Information Needed]
Metrics
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
| Metric | Validation | Test |
|---|
| Accuracy | 0.956 | 0.964 |
| F1 (macro) | 0.910 | 0.933 ± 0.003 |
| F1 (weighted) | 0.956 | 0.956 |
| Loss | 0.33 | 0.29 |
Results
[More Information Needed]
Summary
Model Examination [optional]
<!-- Relevant interpretability work for the model goes here -->
[More Information Needed]
Environmental Impact
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
Carbon emissions can be estimated using the Machine Learning Impact calculator presented in Lacoste et al. (2019).
- Hardware: NVIDIA GeForce RTX 3080 (12GB)
- Training time: ~1.8 hour per run
- Precision: fp16 mixed
- Region: EU
- Estimated emissions: < 1 kg CO₂e
Technical Specifications [optional]
Model Architecture and Objective
- Architecture: BERT (12 layers, 768 hidden size, 12 attention heads)
- Optimizer: AdamW
- Framework: Transformers 4.x, PyTorch 2.x
Compute Infrastructure
[More Information Needed]
Hardware
NVIDIA GeForce RTX 3080 (12GB)
Software
Only the most important Python libraries used for preprocessing and fine-tuning are listed.
Preprocessing: Pandas
Finetuning: PyTorch, Transformers and Sklearn.Metrics
Citation [optional]
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
BibTeX:
@misc{hail_phaseB_2025,
title={Hail Classification – Phase B: Fine-Tuning a German BERT Model for Historical Climate Event Detection},
author={[Franck Schätz, Rüdiger Glaser]},
year={2025},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/your-username/hail-phaseB-bert}}
}
APA:
[More Information Needed]
Glossary [optional]
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
A quote is a text excerpt that contains all relevant information about a weather observation. According to Schätz (2023), this includes:
– Event type (e.g. hail),
– Time details (e.g. date or period),
– Location or area (as geo-coordinates) and
– Event severity. The latter is characterised in the form of a class. Possible classes are H0 (no hail), H1 (hail) and H2 (severe hail with hailstorm).
More Information [optional]
[More Information Needed]
Model Card Authors [optional]
Franck Schätz ([email protected])
Model Card Contact
Franck Schätz ([email protected])