metadata
tags:
- setfit
- sentence-transformers
- text-classification
- generated_from_setfit_trainer
widget:
- text: Insert a descriptive caption for the image
- text: Make the photo lighter
- text: Move the logo to the top layer
- text: Make the shape smaller
- text: Flip the icon vertically
metrics:
- accuracy
pipeline_tag: text-classification
library_name: setfit
inference: true
base_model: nomic-ai/nomic-embed-text-v1.5
model-index:
- name: SetFit with nomic-ai/nomic-embed-text-v1.5
results:
- task:
type: text-classification
name: Text Classification
dataset:
name: Unknown
type: unknown
split: test
metrics:
- type: accuracy
value: 0.5701459034792368
name: Accuracy
SetFit with nomic-ai/nomic-embed-text-v1.5
This is a SetFit model that can be used for Text Classification. This SetFit model uses nomic-ai/nomic-embed-text-v1.5 as the Sentence Transformer embedding model. A LogisticRegression instance is used for classification.
The model has been trained using an efficient few-shot learning technique that involves:
- Fine-tuning a Sentence Transformer with contrastive learning.
- Training a classification head with features from the fine-tuned Sentence Transformer.
Model Details
Model Description
- Model Type: SetFit
- Sentence Transformer body: nomic-ai/nomic-embed-text-v1.5
- Classification head: a LogisticRegression instance
- Maximum Sequence Length: 8192 tokens
- Number of Classes: 63 classes
Model Sources
- Repository: SetFit on GitHub
- Paper: Efficient Few-Shot Learning Without Prompts
- Blogpost: SetFit: Efficient Few-Shot Learning Without Prompts
Model Labels
Label | Examples |
---|---|
setBorderStyle |
|
setChildIndex |
|
undo |
|
setTextListStyle |
|
align |
|
resetImageSettings |
|
rotate |
|
ungroup |
|
setBlendMode |
|
addText |
|
setParagraphSpacing |
|
addAsset |
|
addAssetsUIAction |
|
redo |
|
applyAnimationObjectPreset |
|
moveRelativeTo |
|
resizePage |
|
setBlur |
|
group |
|
displayHelpQA |
|
applyPageLevelAnimation |
|
duplicatePage |
|
setBackgroundColor |
|
setLetterSpacing |
|
setWarmth |
|
setSaturation |
|
replaceText |
|
setLineSpacing |
|
setSharpness |
|
delete |
|
setContrast |
|
setTextLayout |
|
generateImageFromText |
|
flip |
|
generateTemplates |
|
setHighlight |
|
removeBackground |
|
fixTypography |
|
setBrightness |
|
changeContentInImage |
|
setImageAsBackground |
|
resize |
|
setFontSize |
|
showUploadUI |
|
replaceAsset |
|
distributeAroundObject |
|
select |
|
setOpacity |
|
setDropShadow |
|
proposeAssets |
|
setShadow |
|
setCropShape |
|
setTextAlignment |
|
setFontStyle |
|
duplicateSceneNode |
|
setFontType |
|
setTextDecorationEffect |
|
scatter |
|
removeContentFromImage |
|
setFillColor |
|
setTextShadow |
|
previewFilterEffects |
|
duplicateSceneNodeToPage |
|
Evaluation
Metrics
Label | Accuracy |
---|---|
all | 0.5701 |
Uses
Direct Use for Inference
First install the SetFit library:
pip install setfit
Then you can load this model and run inference.
from setfit import SetFitModel
# Download from the 🤗 Hub
model = SetFitModel.from_pretrained("setfit_model_id")
# Run inference
preds = model("Make the photo lighter")
Training Details
Training Set Metrics
Training set | Min | Median | Max |
---|---|---|---|
Word count | 3 | 5.2063 | 11 |
Label | Training Sample Count |
---|---|
addAsset | 8 |
addAssetsUIAction | 8 |
addText | 8 |
align | 8 |
applyAnimationObjectPreset | 8 |
applyPageLevelAnimation | 8 |
changeContentInImage | 8 |
delete | 8 |
displayHelpQA | 8 |
distributeAroundObject | 8 |
duplicatePage | 8 |
duplicateSceneNode | 8 |
duplicateSceneNodeToPage | 8 |
fixTypography | 8 |
flip | 8 |
generateImageFromText | 8 |
generateTemplates | 8 |
group | 8 |
moveRelativeTo | 8 |
previewFilterEffects | 8 |
proposeAssets | 8 |
redo | 8 |
removeBackground | 8 |
removeContentFromImage | 8 |
replaceAsset | 8 |
replaceText | 8 |
resetImageSettings | 8 |
resize | 8 |
resizePage | 8 |
rotate | 8 |
scatter | 8 |
select | 8 |
setBackgroundColor | 8 |
setBlendMode | 8 |
setBlur | 8 |
setBorderStyle | 8 |
setBrightness | 8 |
setChildIndex | 8 |
setContrast | 8 |
setCropShape | 8 |
setDropShadow | 8 |
setFillColor | 8 |
setFontSize | 8 |
setFontStyle | 8 |
setFontType | 8 |
setHighlight | 8 |
setImageAsBackground | 8 |
setLetterSpacing | 8 |
setLineSpacing | 8 |
setOpacity | 8 |
setParagraphSpacing | 8 |
setSaturation | 8 |
setShadow | 8 |
setSharpness | 8 |
setTextAlignment | 8 |
setTextDecorationEffect | 8 |
setTextLayout | 8 |
setTextListStyle | 8 |
setTextShadow | 8 |
setWarmth | 8 |
showUploadUI | 8 |
undo | 8 |
ungroup | 8 |
Training Hyperparameters
- batch_size: (64, 64)
- num_epochs: (1, 1)
- max_steps: -1
- sampling_strategy: oversampling
- body_learning_rate: (2e-05, 1e-05)
- head_learning_rate: 0.01
- loss: CosineSimilarityLoss
- distance_metric: cosine_distance
- margin: 0.25
- end_to_end: False
- use_amp: False
- warmup_proportion: 0.1
- l2_weight: 0.01
- seed: 42
- eval_max_steps: -1
- load_best_model_at_end: False
Training Results
Epoch | Step | Training Loss | Validation Loss |
---|---|---|---|
0.0003 | 1 | 0.1733 | - |
0.0128 | 50 | 0.1425 | - |
0.0256 | 100 | 0.0954 | - |
0.0384 | 150 | 0.0483 | - |
0.0512 | 200 | 0.0297 | - |
0.0640 | 250 | 0.0189 | - |
0.0768 | 300 | 0.0122 | - |
0.0896 | 350 | 0.0099 | - |
0.1024 | 400 | 0.0085 | - |
0.1152 | 450 | 0.0067 | - |
0.1280 | 500 | 0.0059 | - |
0.1408 | 550 | 0.0076 | - |
0.1536 | 600 | 0.0061 | - |
0.1664 | 650 | 0.0049 | - |
0.1792 | 700 | 0.003 | - |
0.1920 | 750 | 0.0023 | - |
0.2048 | 800 | 0.002 | - |
0.2176 | 850 | 0.0037 | - |
0.2304 | 900 | 0.0007 | - |
0.2432 | 950 | 0.0015 | - |
0.2560 | 1000 | 0.0017 | - |
0.2688 | 1050 | 0.0014 | - |
0.2816 | 1100 | 0.0003 | - |
0.2944 | 1150 | 0.0006 | - |
0.3072 | 1200 | 0.001 | - |
0.3200 | 1250 | 0.0007 | - |
0.3328 | 1300 | 0.0002 | - |
0.3456 | 1350 | 0.0012 | - |
0.3584 | 1400 | 0.0006 | - |
0.3712 | 1450 | 0.0003 | - |
0.3840 | 1500 | 0.0005 | - |
0.3968 | 1550 | 0.0002 | - |
0.4096 | 1600 | 0.0004 | - |
0.4224 | 1650 | 0.0009 | - |
0.4352 | 1700 | 0.0007 | - |
0.4480 | 1750 | 0.0003 | - |
0.4608 | 1800 | 0.0001 | - |
0.4736 | 1850 | 0.0006 | - |
0.4864 | 1900 | 0.0004 | - |
0.4992 | 1950 | 0.0004 | - |
0.5120 | 2000 | 0.0001 | - |
0.5248 | 2050 | 0.0004 | - |
0.5376 | 2100 | 0.0003 | - |
0.5504 | 2150 | 0.0012 | - |
0.5632 | 2200 | 0.0006 | - |
0.5760 | 2250 | 0.0001 | - |
0.5888 | 2300 | 0.0003 | - |
0.6016 | 2350 | 0.0007 | - |
0.6144 | 2400 | 0.0003 | - |
0.6272 | 2450 | 0.0004 | - |
0.6400 | 2500 | 0.0006 | - |
0.6528 | 2550 | 0.0001 | - |
0.6656 | 2600 | 0.0003 | - |
0.6784 | 2650 | 0.0006 | - |
0.6912 | 2700 | 0.001 | - |
0.7040 | 2750 | 0.0004 | - |
0.7168 | 2800 | 0.0008 | - |
0.7296 | 2850 | 0.0003 | - |
0.7424 | 2900 | 0.0007 | - |
0.7552 | 2950 | 0.0007 | - |
0.7680 | 3000 | 0.0007 | - |
0.7808 | 3050 | 0.0003 | - |
0.7937 | 3100 | 0.0003 | - |
0.8065 | 3150 | 0.0003 | - |
0.8193 | 3200 | 0.0007 | - |
0.8321 | 3250 | 0.0001 | - |
0.8449 | 3300 | 0.0006 | - |
0.8577 | 3350 | 0.0007 | - |
0.8705 | 3400 | 0.0003 | - |
0.8833 | 3450 | 0.0009 | - |
0.8961 | 3500 | 0.0003 | - |
0.9089 | 3550 | 0.0004 | - |
0.9217 | 3600 | 0.0004 | - |
0.9345 | 3650 | 0.0001 | - |
0.9473 | 3700 | 0.0001 | - |
0.9601 | 3750 | 0.0007 | - |
0.9729 | 3800 | 0.0006 | - |
0.9857 | 3850 | 0.0005 | - |
0.9985 | 3900 | 0.0003 | - |
Framework Versions
- Python: 3.12.11
- SetFit: 1.1.3
- Sentence Transformers: 5.1.0
- Transformers: 4.54.1
- PyTorch: 2.7.1
- Datasets: 4.0.0
- Tokenizers: 0.21.4
Citation
BibTeX
@article{https://doi.org/10.48550/arxiv.2209.11055,
doi = {10.48550/ARXIV.2209.11055},
url = {https://arxiv.org/abs/2209.11055},
author = {Tunstall, Lewis and Reimers, Nils and Jo, Unso Eun Seo and Bates, Luke and Korat, Daniel and Wasserblat, Moshe and Pereg, Oren},
keywords = {Computation and Language (cs.CL), FOS: Computer and information sciences, FOS: Computer and information sciences},
title = {Efficient Few-Shot Learning Without Prompts},
publisher = {arXiv},
year = {2022},
copyright = {Creative Commons Attribution 4.0 International}
}