SentenceTransformer based on sentence-transformers/clip-ViT-B-32

This is a sentence-transformers model finetuned from sentence-transformers/clip-ViT-B-32. It maps sentences & paragraphs to a None-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.

Model Details

Model Description

  • Model Type: Sentence Transformer
  • Base model: sentence-transformers/clip-ViT-B-32
  • Maximum Sequence Length: 77 tokens
  • Output Dimensionality: None dimensions
  • Similarity Function: Cosine Similarity

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): CLIPModel()
)

Usage

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

pip install -U sentence-transformers

Then you can load this model and run inference.

from sentence_transformers import SentenceTransformer

# Download from the ๐Ÿค— Hub
model = SentenceTransformer("WorkStation0/clip-finetuned-satellite-v.0.11")
# Run inference
sentences = [
    "It's a mountainous area.it is white, brown and green .It's a piece of green mountains.it is a piece of green mountains .this is mountainous region .",
    'Many aircraft are parked next to the terminals near the runways of an airport.Many aircraft are parked next to terminals near airstrips at an airport.Many planes are parked next to the terminals near the runways in an airport.many planes are parked next to terminals near runways at an airport.many planes are parked next to terminals near runways in an airport .',
    'yellow ribbon beach is between green trees and dark green ocean with white waves.yellow ribbon beach lies between green trees and dark green ocean with white waves.Yellow ribbon beach is between green trees and dark green ocean with white waves.Yellow ribbon beach is between green trees and dark green ocean with white waves.yellow ribbon beach is between green trees and dark green ocean with white waves .',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]

Evaluation

Metrics

Triplet

  • Datasets: clip-valid-triplet, clip-train-triplet and clip-test-triplet
  • Evaluated with TripletEvaluator
Metric clip-valid-triplet clip-train-triplet clip-test-triplet
cosine_accuracy 0.9992 0.9997 0.9992

Training Details

Training Dataset

Unnamed Dataset

  • Size: 6,113 training samples
  • Columns: anchor, positive, and negative
  • Approximate statistics based on the first 1000 samples:
    anchor positive negative
    type PIL.PngImagePlugin.PngImageFile string string
    details
    • min: 36 tokens
    • mean: 60.87 tokens
    • max: 77 tokens
    • min: 29 tokens
    • mean: 54.49 tokens
    • max: 77 tokens
  • Samples:
    anchor positive negative
    Many buildings and some green trees are located in an industrial area.there are many parking cars on the area next to the buildings in the industrial region.there are many cars parking on the region beside the buildings in the industrial region .many buildings and some green trees are located in an industrial area.many buildings and some green trees are in an industrial area . It's a piece of white snow mountain.It's a piece of snow white mountain.It's a piece of white snow mountain.It's a piece of white snow mountain.it is a piece of white snow mountain .
    Many buildings are located in a commercial area.Many buildings are located in a commercial area.Many buildings are located in a commercial area.Many buildings are in a commercial area.many buildings are in a commercial area . The mountain of yellow and green has a vein texture.the mountain of yellow and green has a vein texture.the mountain of yellow and green has a texture of vein .mountains with long and narrow ridges traverse in this range .it is a piece of irregular green mountains .
    There's a strong bridge over the river.There are many houses on both sides of the river.there are many houses on both sides of the river .There's a strong bridge over the river.there is a strong bridge over the river . many small green spots are scattered in a piece of kaki nueland.Many small green spots are scattered in a piece of naked khaki.Many small green spots are scattered in a piece of khaki stripe.many small green spots are scattered in a piece of khaki bareland.many small green spots are scattered in a piece of khaki bareland .
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim"
    }
    

Evaluation Dataset

Unnamed Dataset

  • Size: 1,310 evaluation samples
  • Columns: anchor, positive, and negative
  • Approximate statistics based on the first 1000 samples:
    anchor positive negative
    type PIL.PngImagePlugin.PngImageFile string string
    details
    • min: 33 tokens
    • mean: 60.71 tokens
    • max: 77 tokens
    • min: 29 tokens
    • mean: 55.17 tokens
    • max: 77 tokens
  • Samples:
    anchor positive negative
    Many trees are planted around the playground.There's a green football pitch on the red track.there's a green football field on the red track .a lot of trees are planted around the playground.a lot of trees are planted around the playground . It's a piece of uneven kaki nueland.It's a piece of uneven naked khaki.It's a piece of irregular Kaki stripping.It's a piece of unequally brazen khaki.it is a piece of uneven khaki bareland .
    It's a big bridge and a few buildings with some grass.the roads are grey and the ground is brown .two parallel bridges on a black river are close to many green plants and several buildings.two parallel bridges on a black river are near many green plants and several buildings .this is a big bridge and some buildings with a little grass . Cylinder storage tanks are built on two square concrete fields near some trees and a parking lot.Cylinder storage tanks are built on two square concrete grounds near some trees and a parking lot.cylinder storage tanks are built on two square concrete ground near some trees and a parking lot .these storage tanks are painted in different colors located next to the wood .many storage tanks are near some green trees .
    the lake with borders is surrounded by roads a parking lot and rows of houses.the lake with edges is surrounded by roads a parking lot and rows of houses.the lake with bylands is surrounded by roads a parking lot and rows of houses .green ponds sit in this resort surrounded by rows of red houses .some buildings and green trees are in a resort with several green ponds . many storage tanks of different sizes are in a factory.Many storage tanks in different sizes are in a factory.Many storage tanks in different sizes are in a factory.many storage tanks in different sizes are in a factory.many storage tanks in different sizes are in a factory .
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim"
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: epoch
  • per_device_train_batch_size: 2
  • per_device_eval_batch_size: 2
  • gradient_accumulation_steps: 4
  • fp16: True
  • dataloader_num_workers: 2
  • load_best_model_at_end: True

All Hyperparameters

Click to expand
  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: epoch
  • prediction_loss_only: True
  • per_device_train_batch_size: 2
  • per_device_eval_batch_size: 2
  • per_gpu_train_batch_size: None
  • per_gpu_eval_batch_size: None
  • gradient_accumulation_steps: 4
  • eval_accumulation_steps: None
  • torch_empty_cache_steps: None
  • learning_rate: 5e-05
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • max_grad_norm: 1.0
  • num_train_epochs: 3
  • max_steps: -1
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: {}
  • warmup_ratio: 0.0
  • warmup_steps: 0
  • log_level: passive
  • log_level_replica: warning
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • save_safetensors: True
  • save_on_each_node: False
  • save_only_model: False
  • restore_callback_states_from_checkpoint: False
  • no_cuda: False
  • use_cpu: False
  • use_mps_device: False
  • seed: 42
  • data_seed: None
  • jit_mode_eval: False
  • use_ipex: False
  • bf16: False
  • fp16: True
  • fp16_opt_level: O1
  • half_precision_backend: auto
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: None
  • local_rank: 0
  • ddp_backend: None
  • tpu_num_cores: None
  • tpu_metrics_debug: False
  • debug: []
  • dataloader_drop_last: False
  • dataloader_num_workers: 2
  • dataloader_prefetch_factor: None
  • past_index: -1
  • disable_tqdm: False
  • remove_unused_columns: True
  • label_names: None
  • load_best_model_at_end: True
  • ignore_data_skip: False
  • fsdp: []
  • fsdp_min_num_params: 0
  • fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
  • fsdp_transformer_layer_cls_to_wrap: None
  • accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
  • deepspeed: None
  • label_smoothing_factor: 0.0
  • optim: adamw_torch
  • optim_args: None
  • adafactor: False
  • group_by_length: False
  • length_column_name: length
  • ddp_find_unused_parameters: None
  • ddp_bucket_cap_mb: None
  • ddp_broadcast_buffers: False
  • dataloader_pin_memory: True
  • dataloader_persistent_workers: False
  • skip_memory_metrics: True
  • use_legacy_prediction_loop: False
  • push_to_hub: False
  • resume_from_checkpoint: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_private_repo: None
  • hub_always_push: False
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • include_inputs_for_metrics: False
  • include_for_metrics: []
  • eval_do_concat_batches: True
  • fp16_backend: auto
  • push_to_hub_model_id: None
  • push_to_hub_organization: None
  • mp_parameters:
  • auto_find_batch_size: False
  • full_determinism: False
  • torchdynamo: None
  • ray_scope: last
  • ddp_timeout: 1800
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • include_tokens_per_second: False
  • include_num_input_tokens_seen: False
  • neftune_noise_alpha: None
  • optim_target_modules: None
  • batch_eval_metrics: False
  • eval_on_start: False
  • use_liger_kernel: False
  • eval_use_gather_object: False
  • average_tokens_across_devices: False
  • prompts: None
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: proportional

Training Logs

Epoch Step Training Loss Validation Loss clip-valid-triplet_cosine_accuracy clip-train-triplet_cosine_accuracy clip-test-triplet_cosine_accuracy
-1 -1 - - 0.9863 - -
0.0994 76 1.3892 - - - -
0.1989 152 0.7274 - - - -
0.2983 228 0.5566 - - - -
0.3978 304 0.4034 - - - -
0.4972 380 0.4335 - - - -
0.5967 456 0.4176 - - - -
0.6961 532 0.3955 - - - -
0.7956 608 0.3396 - - - -
0.8950 684 0.306 - - - -
0.9944 760 0.2526 - - - -
1.0 765 - 0.0786 1.0 - -
1.0929 836 0.2531 - - - -
1.1923 912 0.3303 - - - -
1.2918 988 0.2122 - - - -
1.3912 1064 0.2478 - - - -
1.4907 1140 0.3588 - - - -
1.5901 1216 0.2023 - - - -
1.6896 1292 0.2395 - - - -
1.7890 1368 0.1154 - - - -
1.8885 1444 0.2729 - - - -
1.9879 1520 0.1708 - - - -
2.0 1530 - 0.0700 0.9992 - -
2.0864 1596 0.1841 - - - -
2.1858 1672 0.1382 - - - -
2.2852 1748 0.1452 - - - -
2.3847 1824 0.2616 - - - -
2.4841 1900 0.2024 - - - -
2.5836 1976 0.2883 - - - -
2.6830 2052 0.2461 - - - -
2.7825 2128 0.3249 - - - -
2.8819 2204 0.1299 - - - -
2.9814 2280 0.2171 - - - -
3.0 2295 - 0.0652 0.9992 - -
-1 -1 - - 0.9992 0.9997 0.9992

Framework Versions

  • Python: 3.11.12
  • Sentence Transformers: 4.1.0
  • Transformers: 4.52.3
  • PyTorch: 2.6.0+cu124
  • Accelerate: 1.7.0
  • Datasets: 2.14.4
  • Tokenizers: 0.21.1

Citation

BibTeX

Sentence Transformers

@inproceedings{reimers-2019-sentence-bert,
    title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
    author = "Reimers, Nils and Gurevych, Iryna",
    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
    month = "11",
    year = "2019",
    publisher = "Association for Computational Linguistics",
    url = "https://arxiv.org/abs/1908.10084",
}

MultipleNegativesRankingLoss

@misc{henderson2017efficient,
    title={Efficient Natural Language Response Suggestion for Smart Reply},
    author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
    year={2017},
    eprint={1705.00652},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}
Downloads last month
8
Safetensors
Model size
151M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for WorkStation0/clip-finetuned-satellite-v.0.11

Finetuned
(4)
this model

Evaluation results