kaixkhazaki/german-zeroshot
042
<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. -->
german-zeroshot
This model is a fine-tuned version of deepset/gbert-large on facebook/xnli de dataset. It achieves the following results on the evaluation set:
- Loss: 0.4592
- Accuracy: 0.8486
Usage
# Use a pipeline as a high-level helper
pipe = pipeline(
"zero-shot-classification",
model="kaixkhazaki/german-zeroshot",
tokenizer="kaixkhazaki/german-zeroshot",
device=0 if torch.cuda.is_available() else -1 # Use GPU if available
)
#Enter your text and possible candidates of classification
sequence = "Können Sie mir die Schritte zur Konfiguration eines VPN auf einem Linux-Server erklären?"
candidate_labels = [
"Technische Dokumentation",
"IT-Support",
"Netzwerkadministration",
"Linux-Konfiguration",
"VPN-Setup"
]
pipe(sequence,candidate_labels)
>>
{'sequence': 'Können Sie mir die Schritte zur Konfiguration eines VPN auf einem Linux-Server erklären?',
'labels': ['VPN-Setup', 'Linux-Konfiguration', 'Netzwerkadministration', 'IT-Support', 'Technische Dokumentation'],
'scores': [0.53142249584198, 0.26030370593070984, 0.09126164764165878, 0.06451434642076492, 0.052497804164886475]}
#example 2
sequence = "Wie lautet die Garantiezeit für dieses Produkt?"
candidate_labels = [
"Garantiebedingungen",
"Kundendienst",
"Produktdetails",
"Reklamation",
"Kaufberatung"
]
pipe(sequence,candidate_labels)
>>
{'sequence': 'Wie lautet die Garantiezeit für dieses Produkt?',
'labels': ['Garantiebedingungen', 'Kundendienst', 'Produktdetails', 'Reklamation', 'Kaufberatung'],
'scores': [0.414899080991745, 0.2377401739358902, 0.1381743848323822, 0.12171833217144012, 0.08746808022260666]}
Model description
More information needed
Intended uses & limitations
More information needed
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- trainbatchsize: 64
- evalbatchsize: 32
- seed: 42
- optimizer: Use adamwtorch with betas=(0.9,0.999) and epsilon=1e-08 and optimizerargs=No additional optimizer arguments
- lrschedulertype: cosine
- lrschedulerwarmup_steps: 500
- num_epochs: 3
Training results
Framework versions
- Transformers 4.48.0.dev0
- Pytorch 2.4.1+cu121
- Datasets 3.1.0
- Tokenizers 0.21.0
