CoolFace
Modelpublic

axiomepic/maux-gte-persian-v3-finetuned-bce

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes20downloads
Model Card

SentenceTransformer based on axiomepic/maux-gte-persian-v3-finetuned-bce

This is a sentence-transformers model finetuned from axiomepic/maux-gte-persian-v3-finetuned-bce. It maps sentences & paragraphs to a 768-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: axiomepic/maux-gte-persian-v3-finetuned-bce <!-- at revision untrained -->
  • —Maximum Sequence Length: 8192 tokens
  • —Output Dimensionality: 768 dimensions
  • —Similarity Function: Dot Product <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 8192, 'do_lower_case': False, 'architecture': 'NewModel'})
  (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, '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("axiomepic/maux-gte-persian-v3-finetuned-bce")
# Run inference
sentences = [
    'توالت فرنگی کوچک',
    'نشستن روی توالت فرنگی',
    'leg with dumbbells',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[0.7279, 0.7355, 0.2055],
#         [0.7355, 0.7768, 0.2210],
#         [0.2055, 0.2210, 2.5745]])

<!--

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

Evaluation

Metrics

Binary Classification
MetricValue
dot_accuracy0.6364
dotaccuracythreshold1.2505
dot_f10.5554
dotf1threshold-0.1131
dot_precision0.3883
dot_recall0.9748
dot_ap0.439
dot_mcc0.1287

<!--

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: 52,893 training samples
  • —Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
  • —Approximate statistics based on the first 1000 samples: | | sentence1 | sentence2 | label | |:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------| | type | string | string | float | | details | <ul><li>min: 3 tokens</li><li>mean: 6.59 tokens</li><li>max: 18 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 6.27 tokens</li><li>max: 17 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.38</li><li>max: 1.0</li></ul> |
  • —Samples: | sentence1 | sentence2 | label | |:-----------------------------------|:---------------------------------|:-----------------| | <code>جک سقفی</code> | <code>کامیونت جک</code> | <code>1.0</code> | | <code>سفارت فرانسه در تهران</code> | <code>dutch embassy paris</code> | <code>0.0</code> | | <code>بهترین آبمیوه گیری</code> | <code>فواید آب</code> | <code>0.0</code> |
  • —Loss: <code>_main_.DotProductBCELoss</code>

Evaluation Dataset

Unnamed Dataset
  • —Size: 5,877 evaluation samples
  • —Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
  • —Approximate statistics based on the first 1000 samples: | | sentence1 | sentence2 | label | |:--------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:---------------------------------------------------------------| | type | string | string | float | | details | <ul><li>min: 3 tokens</li><li>mean: 6.55 tokens</li><li>max: 15 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 6.24 tokens</li><li>max: 18 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.38</li><li>max: 1.0</li></ul> |
  • —Samples: | sentence1 | sentence2 | label | |:----------------------------------------|:----------------------------------------|:-----------------| | <code>ظروف آلومینیومی یکبار مصرف</code> | <code>ظروف پلاستیکی</code> | <code>1.0</code> | | <code>اخبار مهاجرین</code> | <code>current events immigration</code> | <code>1.0</code> | | <code>معامله آسان</code> | <code>buy sale trade</code> | <code>1.0</code> |
  • —Loss: <code>_main_.DotProductBCELoss</code>

Training Hyperparameters

Non-Default Hyperparameters
  • —eval_strategy: epoch
  • —per_device_train_batch_size: 16
  • —per_device_eval_batch_size: 64
  • —learning_rate: 2e-05
  • —num_train_epochs: 4
  • —warmup_ratio: 0.1
  • —load_best_model_at_end: True
All Hyperparameters

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

  • —overwrite_output_dir: False
  • —do_predict: False
  • —eval_strategy: epoch
  • —prediction_loss_only: True
  • —per_device_train_batch_size: 16
  • —per_device_eval_batch_size: 64
  • —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: 2e-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: 4
  • —max_steps: -1
  • —lr_scheduler_type: linear
  • —lr_scheduler_kwargs: {}
  • —warmup_ratio: 0.1
  • —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
  • —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: True
  • —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}
  • —parallelism_config: None
  • —deepspeed: None
  • —label_smoothing_factor: 0.0
  • —optim: adamwtorchfused
  • —optim_args: None
  • —adafactor: False
  • —group_by_length: False
  • —length_column_name: length
  • —project: huggingface
  • —trackio_space_id: trackio
  • —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
  • —hub_revision: None
  • —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: no
  • —neftune_noise_alpha: None
  • —optim_target_modules: None
  • —batch_eval_metrics: False
  • —eval_on_start: False
  • —use_liger_kernel: False
  • —liger_kernel_config: None
  • —eval_use_gather_object: False
  • —average_tokens_across_devices: True
  • —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 LossValidation Lossseo-bce-eval_dot_ap
0.003010114.2302--
0.006020113.3976--
0.009130115.9475--
0.012140122.7224--
0.015150112.9675--
0.018160114.5466--
0.021270116.0311--
0.02428099.6088--
0.02729084.4752--
0.030210082.4359--
0.033311077.9756--
0.036312070.7338--
0.039313061.25--
0.042314037.6046--
0.045415034.1171--
0.048416030.6499--
0.051417022.5837--
0.054418017.1006--
0.057519012.3175--
0.06052008.4437--
0.06352105.3229--
0.06652203.8265--
0.06962303.1104--
0.07262402.2156--
0.07562501.8534--
0.07862601.4878--
0.08172701.5639--
0.08472801.375--
0.08772901.2778--
0.09073001.3444--
0.09383101.4949--
0.09683201.3558--
0.09983301.0515--
0.10283401.1467--
0.10593501.0924--
0.10893601.2178--
0.11193701.2049--
0.11493801.1147--
0.11803900.9555--
0.12104001.2939--
0.12404101.1083--
0.12704201.0736--
0.13014301.3217--
0.13314401.138--
0.13614501.1887--
0.13914601.0804--
0.14224701.0579--
0.14524800.9958--
0.14824901.0312--
0.15125001.0218--
0.15435101.0107--
0.15735201.0576--
0.16035301.0445--
0.16335400.9355--
0.16645500.946--
0.16945600.9423--
0.17245701.0467--
0.17545800.9928--
0.17855900.9504--
0.18156000.9529--
0.18456101.0225--
0.18756200.9391--
0.19066300.9984--
0.19366400.965--
0.19666500.93--
0.19966600.9429--
0.20276700.9713--
0.20576801.0207--
0.20876900.8401--
0.21177000.9345--
0.21487100.9107--
0.21787200.9833--
0.22087300.927--
0.22387400.9652--
0.22697500.9116--
0.22997600.8711--
0.23297700.9002--
0.23597800.9852--
0.23907901.0248--
0.24208000.779--
0.24508100.8977--
0.24808200.9285--
0.25118300.9813--
0.25418400.9001--
0.25718500.9476--
0.26018600.934--
0.26328700.8883--
0.26628801.0017--
0.26928900.9306--
0.27229000.904--
0.27539100.8299--
0.27839200.8661--
0.28139300.9472--
0.28439400.8801--
0.28749501.0444--
0.29049600.9591--
0.29349700.864--
0.29649800.9015--
0.29959900.849--
0.302510000.8284--
0.305510100.9114--
0.308510200.9288--
0.311610300.8625--
0.314610400.9262--
0.317610500.8887--
0.320610600.9522--
0.323710700.8593--
0.326710800.8576--
0.329710900.8723--
0.332711000.9361--
0.335811100.8741--
0.338811200.8795--
0.341811300.915--
0.344811400.9236--
0.347911500.8555--
0.350911600.9535--
0.353911700.8852--
0.356911800.9201--
0.360011900.8791--
0.363012000.8594--
0.366012100.8514--
0.369012200.9417--
0.372112300.8887--
0.375112400.9052--
0.378112500.8686--
0.381112600.8952--
0.384212700.8843--
0.387212800.8415--
0.390212900.8904--
0.393213000.9342--
0.396213100.9093--
0.399313200.8211--
0.402313300.9117--
0.405313400.832--
0.408313500.8222--
0.411413600.8366--
0.414413700.871--
0.417413800.8787--
0.420413900.8797--
0.423514000.8222--
0.426514100.8187--
0.429514200.9012--
0.432514300.8047--
0.435614400.8916--
0.438614500.9724--
0.441614600.8306--
0.444614700.8336--
0.447714800.8542--
0.450714900.9075--
0.453715000.7568--
0.456715100.9213--
0.459815200.9079--
0.462815300.8843--
0.465815400.8893--
0.468815500.8085--
0.471915600.9153--
0.474915700.851--
0.477915800.8272--
0.480915900.8105--
0.484016000.8512--
0.487016100.8795--
0.490016200.7917--
0.493016300.8111--
0.496116400.8039--
0.499116500.8209--
0.502116600.9045--
0.505116700.8906--
0.508216800.8735--
0.511216900.8643--
0.514217000.9011--
0.517217100.9391--
0.520317200.8082--
0.523317300.8096--
0.526317400.883--
0.529317500.8514--
0.532417600.8291--
0.535417700.7463--
0.538417800.8582--
0.541417900.9219--
0.544518000.7607--
0.547518100.8536--
0.550518200.7858--
0.553518300.8204--
0.556618400.8731--
0.559618500.8658--
0.562618600.8901--
0.565618700.8024--
0.568718800.8523--
0.571718900.9049--
0.574719000.8477--
0.577719100.7412--
0.580819200.8318--
0.583819300.7609--
0.586819400.7897--
0.589819500.7879--
0.592919600.8383--
0.595919700.8622--
0.598919800.8009--
0.601919900.8361--
0.605020000.8168--
0.608020100.8514--
0.611020200.7768--
0.614020300.8155--
0.617120400.761--
0.620120500.8684--
0.623120600.7832--
0.626120700.8675--
0.629220800.8899--
0.632220900.8539--
0.635221000.8412--
0.638221100.8548--
0.641321200.8051--
0.644321300.8137--
0.647321400.8693--
0.650321500.8512--
0.653421600.7665--
0.656421700.7902--
0.659421800.8232--
0.662421900.8493--
0.665522000.8412--
0.668522100.8504--
0.671522200.8341--
0.674522300.797--
0.677622400.7935--
0.680622500.8604--
0.683622600.8726--
0.686622700.8141--
0.689722800.8169--
0.692722900.8585--
0.695723000.8637--
0.698723100.8091--
0.701823200.8252--
0.704823300.8887--
0.707823400.7881--
0.710823500.9142--
0.713923600.8151--
0.716923700.8422--
0.719923800.8303--
0.722923900.8372--
0.726024000.8334--
0.729024100.7451--
0.732024200.8585--
0.735024300.8679--
0.738124400.8344--
0.741124500.8634--
0.744124600.7852--
0.747124700.8399--
0.750224800.8177--
0.753224900.9176--
0.756225000.7577--
0.759225100.6894--
0.762325200.8084--
0.765325300.898--
0.768325400.8209--
0.771325500.8621--
0.774325600.7687--
0.777425700.8408--
0.780425800.8467--
0.783425900.8426--
0.786426000.8499--
0.789526100.8973--
0.792526200.8532--
0.795526300.8833--
0.798526400.8137--
0.801626500.8812--
0.804626600.8146--
0.807626700.8285--
0.810626800.8989--
0.813726900.8399--
0.816727000.7851--
0.819727100.7952--
0.822727200.7762--
0.825827300.8184--
0.828827400.8423--
0.831827500.8314--
0.834827600.8078--
0.837927700.837--
0.840927800.7494--
0.843927900.8687--
0.846928000.8844--
0.850028100.772--
0.853028200.8961--
0.856028300.8599--
0.859028400.7936--
0.862128500.8054--
0.865128600.7812--
0.868128700.8175--
0.871128800.8121--
0.874228900.8192--
0.877229000.8704--
0.880229100.8535--
0.883229200.8187--
0.886329300.8356--
0.889329400.835--
0.892329500.8279--
0.895329600.8496--
0.898429700.7985--
0.901429800.8032--
0.904429900.8687--
0.907430000.7948--
0.910530100.863--
0.913530200.8589--
0.916530300.7393--
0.919530400.7791--
0.922630500.8215--
0.925630600.8034--
0.928630700.8889--
0.931630800.7151--
0.934730900.8857--
0.937731000.8059--
0.940731100.8435--
0.943731200.7731--
0.946831300.8757--
0.949831400.8846--
0.952831500.8533--
0.955831600.8337--
0.958931700.8618--
0.961931800.7963--
0.964931900.7544--
0.967932000.787--
0.971032100.7714--
0.974032200.8506--
0.977032300.8075--
0.980032400.9149--
0.983132500.7584--
0.986132600.8148--
0.989132700.7667--
0.992132800.7781--
0.995232900.705--
0.998233000.7874--
1.03306-0.80840.4390

</details>

Framework Versions

  • —Python: 3.12.12
  • —Sentence Transformers: 5.1.2
  • —Transformers: 4.57.3
  • —PyTorch: 2.9.0+cu126
  • —Accelerate: 1.12.0
  • —Datasets: 4.0.0
  • —Tokenizers: 0.22.1

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