Text Classification
setfit
PyTorch
sentence-transformers
English
mpnet
generated_from_setfit_trainer
Eval Results (legacy)
text-embeddings-inference
Instructions to use tomaarsen/setfit-paraphrase-mpnet-base-v2-sst2-8-shot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- setfit
How to use tomaarsen/setfit-paraphrase-mpnet-base-v2-sst2-8-shot with setfit:
from setfit import SetFitModel model = SetFitModel.from_pretrained("tomaarsen/setfit-paraphrase-mpnet-base-v2-sst2-8-shot") - sentence-transformers
How to use tomaarsen/setfit-paraphrase-mpnet-base-v2-sst2-8-shot with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("tomaarsen/setfit-paraphrase-mpnet-base-v2-sst2-8-shot") 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
Push model using huggingface_hub.
Browse files- README.md +7 -7
- config_setfit.json +2 -2
README.md
CHANGED
|
@@ -26,13 +26,13 @@ widget:
|
|
| 26 |
... ( quills ) did by showing them . '
|
| 27 |
pipeline_tag: text-classification
|
| 28 |
co2_eq_emissions:
|
| 29 |
-
emissions: 2.
|
| 30 |
source: codecarbon
|
| 31 |
training_type: fine-tuning
|
| 32 |
on_cloud: false
|
| 33 |
cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
|
| 34 |
ram_total_size: 31.777088165283203
|
| 35 |
-
hours_used: 0.
|
| 36 |
hardware_used: 1 x NVIDIA GeForce RTX 3090
|
| 37 |
base_model: sentence-transformers/paraphrase-mpnet-base-v2
|
| 38 |
model-index:
|
|
@@ -79,10 +79,10 @@ The model has been trained using an efficient few-shot learning technique that i
|
|
| 79 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
| 80 |
|
| 81 |
### Model Labels
|
| 82 |
-
| Label
|
| 83 |
-
|:------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
| 84 |
-
|
|
| 85 |
-
|
|
| 86 |
|
| 87 |
## Evaluation
|
| 88 |
|
|
@@ -181,7 +181,7 @@ preds = model("a fast , funny , highly enjoyable movie . ")
|
|
| 181 |
### Environmental Impact
|
| 182 |
Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
|
| 183 |
- **Carbon Emitted**: 0.003 kg of CO2
|
| 184 |
-
- **Hours Used**: 0.
|
| 185 |
|
| 186 |
### Training Hardware
|
| 187 |
- **On Cloud**: No
|
|
|
|
| 26 |
... ( quills ) did by showing them . '
|
| 27 |
pipeline_tag: text-classification
|
| 28 |
co2_eq_emissions:
|
| 29 |
+
emissions: 2.5933709269110308
|
| 30 |
source: codecarbon
|
| 31 |
training_type: fine-tuning
|
| 32 |
on_cloud: false
|
| 33 |
cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
|
| 34 |
ram_total_size: 31.777088165283203
|
| 35 |
+
hours_used: 0.027
|
| 36 |
hardware_used: 1 x NVIDIA GeForce RTX 3090
|
| 37 |
base_model: sentence-transformers/paraphrase-mpnet-base-v2
|
| 38 |
model-index:
|
|
|
|
| 79 |
- **Blogpost:** [SetFit: Efficient Few-Shot Learning Without Prompts](https://huggingface.co/blog/setfit)
|
| 80 |
|
| 81 |
### Model Labels
|
| 82 |
+
| Label | Examples |
|
| 83 |
+
|:---------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
| 84 |
+
| negative | <ul><li>'stale and uninspired . '</li><li>"the film 's considered approach to its subject matter is too calm and thoughtful for agitprop , and the thinness of its characterizations makes it a failure as straight drama . ' "</li><li>"that their charm does n't do a load of good "</li></ul> |
|
| 85 |
+
| positive | <ul><li>"broomfield is energized by volletta wallace 's maternal fury , her fearlessness "</li><li>'flawless '</li><li>'insightfully written , delicately performed '</li></ul> |
|
| 86 |
|
| 87 |
## Evaluation
|
| 88 |
|
|
|
|
| 181 |
### Environmental Impact
|
| 182 |
Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
|
| 183 |
- **Carbon Emitted**: 0.003 kg of CO2
|
| 184 |
+
- **Hours Used**: 0.027 hours
|
| 185 |
|
| 186 |
### Training Hardware
|
| 187 |
- **On Cloud**: No
|
config_setfit.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
{
|
|
|
|
| 2 |
"labels": [
|
| 3 |
"negative",
|
| 4 |
"positive"
|
| 5 |
-
]
|
| 6 |
-
"normalize_embeddings": false
|
| 7 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"normalize_embeddings": false,
|
| 3 |
"labels": [
|
| 4 |
"negative",
|
| 5 |
"positive"
|
| 6 |
+
]
|
|
|
|
| 7 |
}
|