--- library_name: transformers license: mit base_model: deepset/gbert-large tags: - generated_from_trainer model-index: - name: german-zeroshot results: [] datasets: - facebook/xnli language: - de metrics: - accuracy pipeline_tag: zero-shot-classification --- # german-zeroshot This model is a fine-tuned version of [deepset/gbert-large](https://huggingface.co/deepset/gbert-large) on facebook/xnli de dataset. It achieves the following results on the evaluation set: - eval_loss: 0.5051 - eval_accuracy: 0.8096 - eval_f1: 0.8102 - eval_precision: 0.8131 - eval_recall: 0.8096 - eval_runtime: 5.9824 - eval_samples_per_second: 416.224 - eval_steps_per_second: 13.038 - epoch: 0.4889 - step: 3000 ```python # 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.3245040476322174, 0.32373329997062683, 0.16423103213310242, 0.09850211441516876, 0.08902951329946518]} #example 2 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': 'Wie lautet die Garantiezeit für dieses Produkt?', 'labels': ['Garantiebedingungen', 'Produktdetails', 'Reklamation', 'Kundendienst', 'Kaufberatung'], 'scores': [0.4313304126262665, 0.2905466556549072, 0.10058070719242096, 0.09384352713823318, 0.08369863778352737]} ``` ## 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 - train_batch_size: 64 - eval_batch_size: 32 - seed: 42 - optimizer: Use adamw_torch with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments - lr_scheduler_type: cosine - lr_scheduler_warmup_steps: 500 - num_epochs: 3 ### Framework versions - Transformers 4.48.0.dev0 - Pytorch 2.4.1+cu121 - Datasets 3.1.0 - Tokenizers 0.21.0