đ ModernBERT-large-zeroshot-v1
This is a fine - tuned ModernBERT - large model for zero - shot classification, trained on specific datasets to handle natural language inference tasks.
đ Quick Start
To use this model, you first need to install the necessary libraries. You can use the following command:
pip install transformers torch datasets
Here is a simple example of using the model for zero - shot classification:
classifier = pipeline("zero-shot-classification", "r-f/ModernBERT-large-zeroshot-v1")
sequence_to_classify = "I want to be an actor."
candidate_labels = ["space", "economy", "entertainment"]
output = classifier(sequence_to_classify, candidate_labels, multi_label=False)
print(output)
>>{'sequence': 'I want to be an actor.', 'labels': ['entertainment', 'space', 'economy'], 'scores': [0.9614731073379517, 0.028852475807070732, 0.009674412198364735]}
⨠Features
- This model is a fine - tuned ModernBERT - large for Natural Language Inference.
- It is designed to carry out zero - shot classification.
đĻ Installation
pip install transformers torch datasets
đģ Usage Examples
Basic Usage
classifier = pipeline("zero-shot-classification", "r-f/ModernBERT-large-zeroshot-v1")
sequence_to_classify = "I want to be an actor."
candidate_labels = ["space", "economy", "entertainment"]
output = classifier(sequence_to_classify, candidate_labels, multi_label=False)
print(output)
>>{'sequence': 'I want to be an actor.', 'labels': ['entertainment', 'space', 'economy'], 'scores': [0.9614731073379517, 0.028852475807070732, 0.009674412198364735]}
đ Documentation
Model Overview
Model Card
Property |
Details |
Model Name |
ModernBERT-large-zeroshot-v1 |
Hugging Face Repo |
r-f/ModernBERT-large-zeroshot-v1 |
License |
MIT (or another applicable license) |
Date |
23-12-2024 |
Performance Metrics
- Training Loss: Measures the model's fit to the training data.
- Validation Loss: Measures the model's generalization to unseen data.
- Accuracy: The percentage of correct predictions over all examples.
- F1 Score: A balanced metric between precision and recall.
Training Details
- Model: ModernBERT (Large variant)
- Framework: PyTorch
- Batch Size: 32
- Learning Rate: 2e-5
- Optimizer: AdamW
- Hardware: RTX 4090
đ§ Technical Details
The model is a fine - tuned version of ModernBERT - large for Natural Language Inference. It was trained on the MoritzLaurer/synthetic_zeroshot_mixtral_v0.1 dataset. The fine - tuning process is aimed at enabling the model to perform zero - shot classification tasks.
đ License
This model is licensed under the MIT License. See the LICENSE file for more details.
Acknowledgments