CoolFace
Modelpublic

as9122/instructor-xl-stance-mixed

sourceHugging Faceapache-2.0updated 15d agoView on Hugging Face
0likes
Model Card

SentenceTransformer based on hkunlp/instructor-xl

This is a sentence-transformers model finetuned from hkunlp/instructor-xl. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for retrieval.

Model Details

Model Description

  • —Model Type: Sentence Transformer
  • —Base model: hkunlp/instructor-xl <!-- at revision ce48b213095e647a6c3536364b9fa00daf57f436 -->
  • —Maximum Sequence Length: 512 tokens
  • —Output Dimensionality: 768 dimensions
  • —Similarity Function: Cosine Similarity
  • —Supported Modality: Text <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'T5EncoderModel'})
  (1): Pooling({'embedding_dimension': 768, 'pooling_mode': 'mean', 'include_prompt': False})
  (2): Dense({'in_features': 1024, 'out_features': 768, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity', 'module_input_name': 'sentence_embedding', 'module_output_name': 'sentence_embedding'})
  (3): Normalize({})
)

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 = [
    'Show literature challenging Artificial intelligence will ultimately enhance human creativity rather than replace it.',
    'Economic pressures will drive the replacement of human creators. AI can produce vast quantities of high-quality creative content for a fraction of the cost and time, making human professionals unable to compete in the marketplace.',
    "The 'filter bubble' thesis is overstated; empirical research shows that social media often exposes people to more diverse, cross-cutting political views than their offline interactions, which can challenge rather than reinforce their beliefs.",
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.7428, 0.4338],
#         [0.7428, 1.0000, 0.4565],
#         [0.4338, 0.4565, 1.0000]])

<!--

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: 31,800 training samples
  • —Columns: <code>anchor</code>, <code>positive</code>, <code>negative</code>, <code>instructiontext</code>, <code>boostwords</code>, and <code>claim</code>
  • —Approximate statistics based on the first 1000 samples: | | anchor | positive | negative | instructiontext | boostwords | claim | |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------|:-----------------------------------|:----------------------------------------------------------------------------------| | type | string | string | string | string | list | string | | details | <ul><li>min: 11 tokens</li><li>mean: 25.07 tokens</li><li>max: 43 tokens</li></ul> | <ul><li>min: 30 tokens</li><li>mean: 53.01 tokens</li><li>max: 86 tokens</li></ul> | <ul><li>min: 24 tokens</li><li>mean: 54.17 tokens</li><li>max: 120 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 5.75 tokens</li><li>max: 9 tokens</li></ul> | <ul><li>size: 3 elements</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 20.32 tokens</li><li>max: 35 tokens</li></ul> |
  • —Samples: | anchor | positive | negative | instructiontext | boostwords | claim | |:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------|:--------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------| | <code>Extract statements advocating for Bertha von Suttner, a 19th-century peace activist and author, directly influenced Alfred Nobel's decision to create the Nobel Peace Prize.</code> | <code>The claim is true because Alfred Nobel and Bertha von Suttner maintained a long and close correspondence in which she persistently advocated for peace, providing a direct and sustained channel for her to influence his thinking.</code> | <code>The claim is false because Nobel's philosophy on peace was notably different from Suttner's. Nobel held a more cynical and pragmatic view, once remarking that his dynamite factories would end war sooner than her peace congresses. The prize's criteria reflect his practical mindset, not a wholesale adoption of her idealistic pacifism.</code> | <code>Extract statements advocating for</code> | <code>['suttner', 'nobel', 'bertha']</code> | <code>Bertha von Suttner, a 19th-century peace activist and author, directly influenced Alfred Nobel's decision to create the Nobel Peace Prize.</code> | | <code>Retrieve arguments in favor of Bertha von Suttner, a 19th-century peace activist and author, directly influenced Alfred Nobel's decision to create the Nobel Peace Prize.</code> | <code>The claim is true because their letters contain direct discussions about creating a peace prize. In an 1893 letter to Suttner, Nobel expressed his desire to establish a prize for the person who had done the most to advance the pacification of Europe, showing a clear causal link between her advocacy and his idea.</code> | <code>The claim is an oversimplification and likely false because Nobel had his own independent and pre-existing motivations for an interest in peace, primarily his personal anguish over the military use of his inventions. The prize was a way to reconcile his own conflicting legacy, not simply an adoption of Suttner's ideas.</code> | <code>Retrieve arguments in favor of</code> | <code>['suttner', 'nobel', 'bertha']</code> | <code>Bertha von Suttner, a 19th-century peace activist and author, directly influenced Alfred Nobel's decision to create the Nobel Peace Prize.</code> | | <code>Find evidence backing Bertha von Suttner, a 19th-century peace activist and author, directly influenced Alfred Nobel's decision to create the Nobel Peace Prize.</code> | <code>The claim is true because Nobel explicitly read and praised Suttner's influential anti-war novel, "Die Waffen nieder!" ("Lay Down Your Arms!"), demonstrating that her specific work and pacifist message directly impacted his views on the subject.</code> | <code>The claim of 'direct' influence is false because the final text of Nobel's will and the creation of the prizes were a surprise to nearly everyone, including Suttner. If her influence had been so direct and formative, it is likely she would have had more specific knowledge of his ultimate plans before they were revealed.</code> | <code>Find evidence backing</code> | <code>['suttner', 'nobel', 'bertha']</code> | <code>Bertha von Suttner, a 19th-century peace activist and author, directly influenced Alfred Nobel's decision to create the Nobel Peace Prize.</code> |
  • —Loss: <code>MultipleNegativesRankingLoss</code> with these parameters:
json
  {
      "scale": 20.0,
      "similarity_fct": "cos_sim",
      "gather_across_devices": false,
      "directions": [
          "query_to_doc"
      ],
      "partition_mode": "joint",
      "hardness_mode": null,
      "hardness_strength": 0.0
  }

Training Hyperparameters

Non-Default Hyperparameters
  • —num_train_epochs: 2
  • —learning_rate: 2e-05
  • —warmup_steps: 0.1
  • —gradient_accumulation_steps: 2
  • —bf16: True
  • —gradient_checkpointing: True
  • —remove_unused_columns: False
All Hyperparameters

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

  • —per_device_train_batch_size: 8
  • —num_train_epochs: 2
  • —max_steps: -1
  • —learning_rate: 2e-05
  • —lr_scheduler_type: linear
  • —lr_scheduler_kwargs: None
  • —warmup_steps: 0.1
  • —optim: adamwtorchfused
  • —optim_args: None
  • —weight_decay: 0.0
  • —adam_beta1: 0.9
  • —adam_beta2: 0.999
  • —adam_epsilon: 1e-08
  • —optim_target_modules: None
  • —gradient_accumulation_steps: 2
  • —average_tokens_across_devices: True
  • —max_grad_norm: 1.0
  • —label_smoothing_factor: 0.0
  • —bf16: True
  • —fp16: False
  • —bf16_full_eval: False
  • —fp16_full_eval: False
  • —tf32: None
  • —gradient_checkpointing: True
  • —gradient_checkpointing_kwargs: None
  • —torch_compile: False
  • —torch_compile_backend: None
  • —torch_compile_mode: None
  • —use_liger_kernel: False
  • —liger_kernel_config: None
  • —use_cache: False
  • —neftune_noise_alpha: None
  • —torch_empty_cache_steps: None
  • —auto_find_batch_size: False
  • —log_on_each_node: True
  • —logging_nan_inf_filter: True
  • —include_num_input_tokens_seen: no
  • —log_level: passive
  • —log_level_replica: warning
  • —disable_tqdm: False
  • —project: huggingface
  • —trackio_space_id: trackio
  • —per_device_eval_batch_size: 8
  • —prediction_loss_only: True
  • —eval_on_start: False
  • —eval_do_concat_batches: True
  • —eval_use_gather_object: False
  • —eval_accumulation_steps: None
  • —include_for_metrics: []
  • —batch_eval_metrics: False
  • —save_only_model: False
  • —save_on_each_node: False
  • —enable_jit_checkpoint: False
  • —push_to_hub: False
  • —hub_private_repo: None
  • —hub_model_id: None
  • —hub_strategy: every_save
  • —hub_always_push: False
  • —hub_revision: None
  • —load_best_model_at_end: False
  • —ignore_data_skip: False
  • —restore_callback_states_from_checkpoint: False
  • —full_determinism: False
  • —seed: 42
  • —data_seed: None
  • —use_cpu: False
  • —accelerator_config: {'splitbatches': False, 'dispatchbatches': None, 'evenbatches': True, 'useseedablesampler': True, 'nonblocking': False, 'gradientaccumulationkwargs': None}
  • —parallelism_config: None
  • —dataloader_drop_last: False
  • —dataloader_num_workers: 0
  • —dataloader_pin_memory: True
  • —dataloader_persistent_workers: False
  • —dataloader_prefetch_factor: None
  • —remove_unused_columns: False
  • —label_names: None
  • —train_sampling_strategy: random
  • —length_column_name: length
  • —ddp_find_unused_parameters: None
  • —ddp_bucket_cap_mb: None
  • —ddp_broadcast_buffers: False
  • —ddp_backend: None
  • —ddp_timeout: 1800
  • —fsdp: []
  • —fsdp_config: {'minnumparams': 0, 'xla': False, 'xlafsdpv2': False, 'xlafsdpgrad_ckpt': False}
  • —deepspeed: None
  • —debug: []
  • —skip_memory_metrics: True
  • —do_predict: False
  • —resume_from_checkpoint: None
  • —warmup_ratio: None
  • —local_rank: -1
  • —prompts: None
  • —batch_sampler: batch_sampler
  • —multi_dataset_batch_sampler: proportional
  • —router_mapping: {}
  • —learning_rate_mapping: {}

</details>

Training Logs

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

EpochStepTraining Loss
0.0050100.5099
0.0101200.5399
0.0151300.5483
0.0201400.5209
0.0252500.5185
0.0302600.5430
0.0352700.5905
0.0403800.4935
0.0453900.5462
0.05031000.4765
0.05531100.5693
0.06041200.5354
0.06541300.5261
0.07041400.5290
0.07551500.6048
0.08051600.5459
0.08551700.4844
0.09061800.4622
0.09561900.5328
0.10062000.5414
0.10572100.4627
0.11072200.4761
0.11572300.4688
0.12082400.4816
0.12582500.5219
0.13082600.4848
0.13582700.4522
0.14092800.4396
0.14592900.5258
0.15093000.4351
0.15603100.3776
0.16103200.3685
0.16603300.4476
0.17113400.3930
0.17613500.4399
0.18113600.5114
0.18623700.4537
0.19123800.3510
0.19623900.3916
0.20134000.3884
0.20634100.3887
0.21134200.3290
0.21644300.3710
0.22144400.5399
0.22644500.3434
0.23144600.4026
0.23654700.4085
0.24154800.3931
0.24654900.3618
0.25165000.4182
0.25665100.3877
0.26165200.5206
0.26675300.3248
0.27175400.2880
0.27675500.3231
0.28185600.3942
0.28685700.3697
0.29185800.2718
0.29695900.4321
0.30196000.3333
0.30696100.3739
0.31196200.3254
0.31706300.3031
0.32206400.3243
0.32706500.3142
0.33216600.3366
0.33716700.3124
0.34216800.2669
0.34726900.3253
0.35227000.2979
0.35727100.3731
0.36237200.3672
0.36737300.2686
0.37237400.2930
0.37747500.3106
0.38247600.2907
0.38747700.2552
0.39257800.2228
0.39757900.3208
0.40258000.2806
0.40758100.3060
0.41268200.3567
0.41768300.2460
0.42268400.2272
0.42778500.2586
0.43278600.3009
0.43778700.2921
0.44288800.2696
0.44788900.2891
0.45289000.2252
0.45799100.2069
0.46299200.3262
0.46799300.2075
0.47309400.2313
0.47809500.2412
0.48309600.2690
0.48819700.2494
0.49319800.2903
0.49819900.2453
0.503110000.2454
0.508210100.2801
0.513210200.2039
0.518210300.2272
0.523310400.2536
0.528310500.2100
0.533310600.2501
0.538410700.2821
0.543410800.2489
0.548410900.2181
0.553511000.2315
0.558511100.2505
0.563511200.2299
0.568611300.2357
0.573611400.2717
0.578611500.1304
0.583611600.2265
0.588711700.2509
0.593711800.2092
0.598711900.1632
0.603812000.2063
0.608812100.1782
0.613812200.1526
0.618912300.1882
0.623912400.2270
0.628912500.1742
0.634012600.1844
0.639012700.1908
0.644012800.1660
0.649112900.1646
0.654113000.1128
0.659113100.1897
0.664213200.2455
0.669213300.2417
0.674213400.1507
0.679213500.1822
0.684313600.1600
0.689313700.1666
0.694313800.2700
0.699413900.2267
0.704414000.1802
0.709414100.1689
0.714514200.1589
0.719514300.2079
0.724514400.2486
0.729614500.2169
0.734614600.2419
0.739614700.2183
0.744714800.1406
0.749714900.1453
0.754715000.1527
0.759715100.1847
0.764815200.2497
0.769815300.2041
0.774815400.1166
0.779915500.1825
0.784915600.1570
0.789915700.1770
0.795015800.1301
0.815900.1608
0.805016000.1869
0.810116100.2282
0.815116200.1446
0.820116300.1689
0.825216400.1846
0.830216500.1788
0.835216600.2224
0.840316700.1572
0.845316800.1638
0.850316900.2027
0.855317000.1270
0.860417100.1698
0.865417200.1734
0.870417300.1922
0.875517400.1792
0.880517500.2164
0.885517600.1515
0.890617700.1727
0.895617800.1255
0.900617900.1588
0.905718000.1547
0.910718100.1595
0.915718200.1829
0.920818300.1488
0.925818400.1833
0.930818500.1490
0.935818600.1300
0.940918700.1703
0.945918800.1936
0.950918900.1240
0.956019000.1829
0.961019100.2300
0.966019200.1825
0.971119300.1815
0.976119400.2364
0.981119500.2092
0.986219600.1514
0.991219700.1658
0.996219800.1464
1.001019900.1514
1.006020000.1770
1.011120100.1545
1.016120200.1625
1.021120300.1775
1.026220400.2215
1.031220500.1535
1.036220600.1553
1.041320700.1783
1.046320800.1474
1.051320900.1201
1.056421000.1606
1.061421100.1594
1.066421200.1985
1.071421300.1254
1.076521400.2004
1.081521500.1798
1.086521600.1929
1.091621700.1706
1.096621800.1522
1.101621900.1715
1.106722000.1175
1.111722100.1244
1.116722200.1651
1.121822300.1631
1.126822400.1397
1.131822500.1741
1.136922600.1353
1.141922700.2062
1.146922800.1937
1.151922900.1643
1.157023000.1636
1.162023100.1311
1.167023200.1505
1.172123300.1439
1.177123400.1902
1.182123500.1905
1.187223600.1686
1.192223700.2103
1.197223800.2438
1.202323900.1074
1.207324000.1573
1.212324100.1026
1.217424200.1434
1.222424300.1548
1.227424400.1310
1.232524500.1462
1.237524600.1737
1.242524700.1368
1.247524800.1689
1.252624900.1306
1.257625000.1871
1.262625100.1398
1.267725200.1615
1.272725300.1907
1.277725400.1457
1.282825500.2284
1.287825600.1385
1.292825700.1707
1.297925800.1904
1.302925900.1615
1.307926000.1942
1.313026100.1665
1.318026200.1844
1.323026300.1531
1.328126400.1575
1.333126500.1901
1.338126600.1214
1.343126700.1458
1.348226800.1424
1.353226900.1380
1.358227000.1721
1.363327100.1977
1.368327200.1343
1.373327300.2174
1.378427400.1630
1.383427500.1423
1.388427600.2155
1.393527700.2150
1.398527800.1799
1.403527900.1219
1.408628000.1215
1.413628100.1695
1.418628200.2008
1.423628300.1185
1.428728400.1701
1.433728500.2147
1.438728600.2015
1.443828700.1395
1.448828800.1397
1.453828900.1552
1.458929000.1396
1.463929100.1649
1.468929200.1566
1.474029300.1356
1.479029400.2107
1.484029500.1463
1.489129600.1725
1.494129700.1273
1.499129800.1615
1.504229900.1492
1.509230000.1591
1.514230100.1752
1.519230200.1555
1.524330300.1711
1.529330400.1362
1.534330500.1613
1.539430600.1337
1.544430700.1038
1.549430800.1645
1.554530900.2168
1.559531000.1397
1.564531100.2055
1.569631200.1868
1.574631300.1747
1.579631400.1461
1.584731500.1623
1.589731600.1672
1.594731700.1752
1.599731800.1190
1.604831900.1260
1.609832000.1013
1.614832100.1621
1.619932200.1972
1.624932300.1542
1.629932400.1260
1.635032500.2469
1.640032600.1345
1.645032700.1634
1.650132800.1823
1.655132900.1264
1.660133000.2212
1.665233100.1529
1.670233200.1622
1.675233300.1691
1.680333400.1321
1.685333500.1586
1.690333600.1749
1.695333700.1498
1.700433800.1421
1.705433900.1334
1.710434000.1736
1.715534100.1476
1.720534200.1568
1.725534300.1754
1.730634400.1318
1.735634500.1704
1.740634600.1249
1.745734700.1381
1.750734800.2418
1.755734900.1413
1.760835000.1825
1.765835100.1796
1.770835200.1428
1.775835300.1380
1.780935400.1593
1.785935500.1682
1.790935600.1359
1.796035700.1810
1.801035800.2006
1.806035900.2232
1.811136000.1477
1.816136100.1301
1.821136200.1285
1.826236300.1441
1.831236400.1246
1.836236500.1026
1.841336600.1626
1.846336700.1605
1.851336800.1213
1.856436900.1666
1.861437000.1574
1.866437100.1656
1.871437200.1174
1.876537300.1639
1.881537400.2174
1.886537500.1231
1.891637600.1492
1.896637700.1451
1.901637800.1382
1.906737900.1359
1.911738000.1257
1.916738100.2029
1.921838200.1401
1.926838300.1760
1.931838400.1785
1.936938500.1375
1.941938600.1296
1.946938700.1382
1.951938800.1354
1.957038900.1886
1.962039000.1518
1.967039100.1622
1.972139200.1397
1.977139300.2438
1.982139400.1824
1.987239500.1874
1.992239600.1974
1.997239700.1645

</details>

Training Time

  • —Training: 1.1 hours

Framework Versions

  • —Python: 3.12.3
  • —Sentence Transformers: 5.4.1
  • —Transformers: 5.5.4
  • —PyTorch: 2.9.1+cu128
  • —Accelerate: 1.12.0
  • —Datasets: 4.5.0
  • —Tokenizers: 0.22.2

Citation

BibTeX

Stance-Aware Text Retrieval
bibtex
@misc{sparacino2026embeddingmodelsstanceawareargument,
      title={Embedding Models for Stance-Aware Argument Retrieval}, 
      author={Angelo Sparacino and Francesca Toni and Adam Dejl},
      year={2026},
      eprint={2608.28283},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2608.28283}, 
}
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",
}
MultipleNegativesRankingLoss
bibtex
@misc{oord2019representationlearningcontrastivepredictive,
      title={Representation Learning with Contrastive Predictive Coding},
      author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
      year={2019},
      eprint={1807.03748},
      archivePrefix={arXiv},
      primaryClass={cs.LG},
      url={https://arxiv.org/abs/1807.03748},
}

<!--

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. -->