CoolFace
Modelpublic

pedro-thenewsroom/climate-misinfo-embed

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes12downloads
Model Card

SentenceTransformer based on TaylorAI/bge-micro-v2

This is a sentence-transformers model finetuned from TaylorAI/bge-micro-v2. It maps sentences & paragraphs to a 384-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: TaylorAI/bge-micro-v2 <!-- at revision 3edf6d7de0faa426b09780416fe61009f26ae589 -->
  • Maximum Sequence Length: 512 tokens
  • Output Dimensionality: 384 dimensions
  • Similarity Function: Cosine Similarity <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel 
  (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
)

Usage

Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

bash
pip install -U sentence-transformers

Then you can load this model and run inference.

python
from sentence_transformers import SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
    'Founded by some 30 leaders of the Christian Right, the Alliance Defending Freedom is a legal advocacy and training group that has supported the recriminalization of sexual acts between consenting LGBTQ adults in the U.S. and criminalization abroad; has defended state-sanctioned sterilization of trans people abroad; has contended that LGBTQ people are more likely to engage in pedophilia; and claims that a ‘homosexual agenda’ will destroy Christianity and society. ADF also works to develop “religious liberty” legislation and case law that will allow the denial of goods and services to LGBTQ people on the basis of religion. Since the election of President Trump, ADF has become one of the most influential groups informing the administration’s attack on LGBTQ rights.',
    'Fossil fuels have powered centuries of progress, lifted billions out of poverty, and remain the backbone of global energy, while alternatives, though promising, cannot yet match their scale, reliability, or affordability.',
    'Climate change is nothing more than a fabricated agenda pushed by corrupt elites, politicians, and scientists to control the masses, gain wealth, and suppress freedom.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]

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

<!--

Direct Usage (Transformers)

<details><summary>Click to see the direct usage in Transformers</summary>

</details> -->

<!--

Downstream Usage (Sentence Transformers)

You can finetune this model on your own dataset.

<details><summary>Click to expand</summary>

</details> -->

<!--

Out-of-Scope Use

List how the model may foreseeably be misused and address what users ought not to do with the model. -->

<!--

Bias, Risks and Limitations

What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model. -->

<!--

Recommendations

What are recommendations with respect to the foreseeable issues? For example, filtering explicit content. -->

Training Details

Training Dataset

Unnamed Dataset
  • Size: 53,963 training samples
  • Columns: <code>sentence0</code>, <code>sentence1</code>, and <code>label</code>
  • Approximate statistics based on the first 1000 samples: | | sentence0 | sentence1 | label | |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------| | type | string | string | float | | details | <ul><li>min: 7 tokens</li><li>mean: 64.1 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 32 tokens</li><li>mean: 38.4 tokens</li><li>max: 44 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.09</li><li>max: 1.0</li></ul> |
  • Samples: | sentence0 | sentence1 | label | |:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------| | <code>To that end, we have been working on the Murdoch press of late, with good initial results.</code> | <code>The so-called consensus on climate change relies on flawed models, manipulated data, and a refusal to address legitimate scientific uncertainties, all to serve a predetermined political narrative.</code> | <code>0.0</code> | | <code>Scientists who dare question the almost religious belief in climate change, and yes, they do exist, are ignored or undermined in news reports as are policy makers and pundits who take similar views.</code> | <code>The Earth's climate has always changed due to natural cycles and external factors, and the role of human activity or CO2 emissions in driving these changes is negligible or unsupported by evidence.</code> | <code>0.0</code> | | <code>What about ‘global warming?’ What matters is the degree and rate of change. There have been times on earth when it has been much warmer than today, and times when it’s been much colder. The latter are called ice ages. One of the former is called ‘The Climate Optimum.’ It was a time of higher average global temperature and high CO2.</code> | <code>The Earth's climate has always changed due to natural cycles and external factors, and the role of human activity or CO2 emissions in driving these changes is negligible or unsupported by evidence.</code> | <code>1.0</code> |
  • Loss: <code>CosineSimilarityLoss</code> with these parameters:
json
  {
      "loss_fct": "torch.nn.modules.loss.MSELoss"
  }

Training Hyperparameters

Non-Default Hyperparameters
  • per_device_train_batch_size: 16
  • per_device_eval_batch_size: 16
  • num_train_epochs: 20
  • multi_dataset_batch_sampler: round_robin
All Hyperparameters

<details><summary>Click to expand</summary>

  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: no
  • prediction_loss_only: True
  • per_device_train_batch_size: 16
  • per_device_eval_batch_size: 16
  • per_gpu_train_batch_size: None
  • per_gpu_eval_batch_size: None
  • gradient_accumulation_steps: 1
  • 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
  • num_train_epochs: 20
  • 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: False
  • 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: 0
  • dataloader_prefetch_factor: None
  • past_index: -1
  • disable_tqdm: False
  • remove_unused_columns: True
  • label_names: None
  • load_best_model_at_end: False
  • ignore_data_skip: False
  • fsdp: []
  • fsdp_min_num_params: 0
  • fsdp_config: {'minnumparams': 0, 'xla': False, 'xlafsdpv2': False, 'xlafsdpgrad_ckpt': False}
  • fsdp_transformer_layer_cls_to_wrap: None
  • accelerator_config: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': 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
  • dispatch_batches: None
  • split_batches: 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: round_robin

</details>

Training Logs

<details><summary>Click to expand</summary>

EpochStepTraining Loss
0.14825000.2358
0.296510000.0696
0.444715000.0618
0.592920000.0597
0.741225000.0586
0.889430000.0549
1.037735000.0587
1.185940000.0549
1.334145000.0521
1.482450000.0504
1.630655000.0501
1.778860000.0489
1.927165000.0493
2.075370000.0456
2.223575000.0398
2.371880000.0416
2.520085000.0411
2.668290000.0396
2.816595000.0373
2.9647100000.04
3.1130105000.0319
3.2612110000.0325
3.4094115000.0284
3.5577120000.0292
3.7059125000.0302
3.8541130000.0287
4.0024135000.0287
4.1506140000.0205
4.2988145000.0204
4.4471150000.023
4.5953155000.0223
4.7436160000.0214
4.8918165000.0208
5.0400170000.0186
5.1883175000.0133
5.3365180000.0148
5.4847185000.0131
5.6330190000.0151
5.7812195000.0135
5.9294200000.0151
6.0777205000.0108
6.2259210000.0095
6.3741215000.0088
6.5224220000.01
6.6706225000.0113
6.8189230000.0122
6.9671235000.0091
7.1153240000.007
7.2636245000.0076
7.4118250000.0072
7.5600255000.007
7.7083260000.0079
7.8565265000.0064
8.0047270000.0078
8.1530275000.0053
8.3012280000.0054
8.4495285000.0046
8.5977290000.0046
8.7459295000.0055
8.8942300000.0046
9.0424305000.0039
9.1906310000.0043
9.3389315000.0036
9.4871320000.004
9.6353325000.0034
9.7836330000.0034
9.9318335000.0036
10.0800340000.0033
10.2283345000.0024
10.3765350000.0023
10.5248355000.0031
10.6730360000.0033
10.8212365000.0031
10.9695370000.0033
11.1177375000.0021
11.2659380000.002
11.4142385000.0021
11.5624390000.0024
11.7106395000.0023
11.8589400000.0018
12.0071405000.0034
12.1554410000.0019
12.3036415000.0016
12.4518420000.0017
12.6001425000.0016
12.7483430000.0015
12.8965435000.0018
13.0448440000.0017
13.1930445000.0013
13.3412450000.0016
13.4895455000.0012
13.6377460000.0016
13.7859465000.0019
13.9342470000.0018
14.0824475000.0014
14.2307480000.0019
14.3789485000.0017
14.5271490000.0009
14.6754495000.0009
14.8236500000.0009
14.9718505000.0018
15.1201510000.0014
15.2683515000.0012
15.4165520000.0012
15.5648525000.001
15.7130530000.0014
15.8613535000.0018
16.0095540000.0014
16.1577545000.0011
16.3060550000.001
16.4542555000.0009
16.6024560000.0013
16.7507565000.0015
16.8989570000.0011
17.0471575000.0007
17.1954580000.0007
17.3436585000.001
17.4918590000.0011
17.6401595000.0011
17.7883600000.001
17.9366605000.0012
18.0848610000.001
18.2330615000.0007
18.3813620000.0009
18.5295625000.001
18.6777630000.0009
18.8260635000.0011
18.9742640000.0007
19.1224645000.0012
19.2707650000.0005
19.4189655000.0008
19.5672660000.001
19.7154665000.0009
19.8636670000.001

</details>

Framework Versions

  • Python: 3.9.6
  • Sentence Transformers: 3.4.1
  • Transformers: 4.48.2
  • PyTorch: 2.7.0.dev20250131
  • Accelerate: 1.3.0
  • Datasets: 3.2.0
  • Tokenizers: 0.21.0

Citation

BibTeX

Sentence Transformers
bibtex
@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",
}

<!--

Glossary

Clearly define terms in order to be accessible across audiences. -->

<!--

Model Card Authors

Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction. -->

<!--

Model Card Contact

Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors. -->