Zero-Shot Classification
PyTorch
Transformers
sentence-transformers
English
zeroshot_classifier
bert
text-classification
Instructions to use claritylab/zero-shot-vanilla-binary-bert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use claritylab/zero-shot-vanilla-binary-bert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="claritylab/zero-shot-vanilla-binary-bert")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("claritylab/zero-shot-vanilla-binary-bert") model = AutoModelForSequenceClassification.from_pretrained("claritylab/zero-shot-vanilla-binary-bert") - sentence-transformers
How to use claritylab/zero-shot-vanilla-binary-bert with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("claritylab/zero-shot-vanilla-binary-bert") sentences = [ "The weather is lovely today.", "It's so sunny outside!", "He drove to the stadium." ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [3, 3] - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -3,10 +3,6 @@ tags:
|
|
| 3 |
- transformers
|
| 4 |
- sentence-transformers
|
| 5 |
- zeroshot_classifier
|
| 6 |
-
datasets:
|
| 7 |
-
- claritylab/UTCD
|
| 8 |
-
language:
|
| 9 |
-
- en
|
| 10 |
---
|
| 11 |
|
| 12 |
# Zero-shot Vanilla Binary BERT
|
|
@@ -18,7 +14,7 @@ The code for training and evaluating this model can be found [here](https://gith
|
|
| 18 |
## Model description
|
| 19 |
|
| 20 |
This model was trained via the binary classification framework. It is intended for zero-shot text classification.
|
| 21 |
-
It was trained
|
| 22 |
|
| 23 |
- **Finetuned from model:** [`bert-base-uncased`](https://huggingface.co/bert-base-uncased)
|
| 24 |
|
|
@@ -47,4 +43,5 @@ You can use the model like this:
|
|
| 47 |
[9.9996781e-01 3.2211588e-05]
|
| 48 |
[9.9985993e-01 1.4002046e-04]
|
| 49 |
[9.9976152e-01 2.3845369e-04]]
|
| 50 |
-
```
|
|
|
|
|
|
| 3 |
- transformers
|
| 4 |
- sentence-transformers
|
| 5 |
- zeroshot_classifier
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
---
|
| 7 |
|
| 8 |
# Zero-shot Vanilla Binary BERT
|
|
|
|
| 14 |
## Model description
|
| 15 |
|
| 16 |
This model was trained via the binary classification framework. It is intended for zero-shot text classification.
|
| 17 |
+
It was trained as a baseline with the aspect-normalized [UTCD](https://huggingface.co/datasets/claritylab/UTCD) dataset.
|
| 18 |
|
| 19 |
- **Finetuned from model:** [`bert-base-uncased`](https://huggingface.co/bert-base-uncased)
|
| 20 |
|
|
|
|
| 43 |
[9.9996781e-01 3.2211588e-05]
|
| 44 |
[9.9985993e-01 1.4002046e-04]
|
| 45 |
[9.9976152e-01 2.3845369e-04]]
|
| 46 |
+
```
|
| 47 |
+
|