Downloads · 30 days
10
7% of all-time downloads
pdjohn/C-EBERT-610m
C-EBERT-610m is a token classification model from pdjohn. Use it when you need labels on individual words, such as names. It is set up for transformers. The card lists the license as apache-2.0.
A multi-task model to extract causal attributions from German text.
Downloads · 30 days
10
7% of all-time downloads
All-time downloads
153
Public
Parameters
608M
1.2 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.2 GB · 99%
From the Hugging Face model README
A multi-task model to extract causal attributions from German text.
Multi-Task Architecture: Extends EuroBERT-610m with token and relation classification heads, using a joint loss function \(\mathcal{L}{\text{total}} = \alpha \mathcal{L}{\text{token}} + \beta \mathcal{L}_{\text{relation}}\): | Task | Output Type | Labels / Classes | | :--- | :--- | :--- | | 1. Token Classification | Sequence Labeling (BIO) | 5 Span Labels (O, B-INDICATOR, I-INDICATOR, B-ENTITY, I-ENTITY) | | 2. Relation Classification | Sentence-Pair Classification | 14 Relation Labels (e.g., MONO_POS_CAUSE, DIST_NEG_EFFECT) |
Dataset: 4,540 manually annotated relations (see the excerpt Bundestag Causal Attribution).
Find the implementation library here.
from causalbert.infer import load_model, sentence_analysis
model, tokenizer, config, device = load_model("pdjohn/C-EBERT")
sentences = ["Autoverkehr verursacht Bienensterben."]
analysis = sentence_analysis(model, tokenizer, config, sentences, batch_size=8)
print(analysis[0]['derived_relations'])
# Output: [(['Autoverkehr', 'verursacht'], ['Bienensterben']), {'label': 'MONO_POS_CAUSE', 'confidence': 0.954}]
## Evaluation & Performance
Evaluated on a stratified held-out test set of environmental discourse data.
<|parallel_sep|> token to handle sentence-pair classification for relation extraction.See train.py for the full configuration details.
Evaluated on a stratified held-out test set (1,135 Relations).
| Task | Accuracy | F1 (Macro/Micro) |
|---|---|---|
| Token Classification (BIO) | 0.879 | 0.783 (Micro) |
| Relation Classification | 0.732 | 0.425 (Macro) |