CoolFace
Modelpublic

CloudlessSky/fullname_encoder_v1

sourceHugging Faceupdated 1y agoView on Hugging Face
0likes97downloads
Model Card

SentenceTransformer based on intfloat/multilingual-e5-small

This is a sentence-transformers model finetuned from intfloat/multilingual-e5-small. 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: intfloat/multilingual-e5-small <!-- at revision c007d7ef6fd86656326059b28395a7a03a7c5846 -->
  • 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})
  (2): 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("CloudlessSky/fullname_encoder_v1")
# Run inference
sentences = [
    'ромазанов хусин алеевич',
    'роиазанов хусир алеевич',
    'морозов тимофей васильевич',
]
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: 2,000,000 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 | int | | details | <ul><li>min: 6 tokens</li><li>mean: 10.9 tokens</li><li>max: 19 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 11.86 tokens</li><li>max: 27 tokens</li></ul> | <ul><li>0: ~48.70%</li><li>1: ~51.30%</li></ul> |
  • Samples: | sentence1 | sentence2 | label | |:-------------------------------------------|:------------------------------------------|:---------------| | <code>лебедев александр арсентьевич</code> | <code>лебедев александр арсеньевич</code> | <code>0</code> | | <code>кирюхин сергей никитович</code> | <code>мухин сергей никитович</code> | <code>0</code> | | <code>додонов иван сидорович</code> | <code>сидоров иван спиридонович</code> | <code>0</code> |
  • Loss: <code>ContrastiveLoss</code> with these parameters:
json
  {
      "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE",
      "margin": 0.5,
      "size_average": true
  }

Evaluation Dataset

Unnamed Dataset
  • Size: 663,132 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 | int | | details | <ul><li>min: 5 tokens</li><li>mean: 10.92 tokens</li><li>max: 22 tokens</li></ul> | <ul><li>min: 2 tokens</li><li>mean: 11.77 tokens</li><li>max: 24 tokens</li></ul> | <ul><li>0: ~50.20%</li><li>1: ~49.80%</li></ul> |
  • Samples: | sentence1 | sentence2 | label | |:-------------------------------------------|:----------------------------------------|:---------------| | <code>иванисько ульян иванович</code> | <code>ульян иванисько иванович</code> | <code>1</code> | | <code>топычканов иван александрович</code> | <code>кабанов иван александрович</code> | <code>0</code> | | <code>джавадов камал джавад оглы</code> | <code>джавадов джавад камал оглы</code> | <code>1</code> |
  • Loss: <code>ContrastiveLoss</code> with these parameters:
json
  {
      "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE",
      "margin": 0.5,
      "size_average": true
  }

Training Hyperparameters

Non-Default Hyperparameters
  • eval_strategy: steps
  • per_device_train_batch_size: 64
  • per_device_eval_batch_size: 128
  • num_train_epochs: 8
All Hyperparameters

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

  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: steps
  • prediction_loss_only: True
  • per_device_train_batch_size: 64
  • per_device_eval_batch_size: 128
  • 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.0
  • num_train_epochs: 8
  • 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}
  • tp_size: 0
  • 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
  • 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

</details>

Training Logs

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

EpochStepTraining LossValidation Loss
0.0165000.0143-
0.03210000.0119-
0.04815000.0112-
0.06420000.0108-
0.0825000.0105-
0.09630000.0098-
0.11235000.0101-
0.12840000.0096-
0.14445000.0096-
0.1650000.0093-
0.17655000.0093-
0.19260000.0089-
0.20865000.0087-
0.22470000.0086-
0.2475000.0084-
0.25680000.0083-
0.27285000.0082-
0.28890000.008-
0.30495000.0079-
0.32100000.0080.0055
0.336105000.0077-
0.352110000.0077-
0.368115000.0076-
0.384120000.0073-
0.4125000.0074-
0.416130000.0074-
0.432135000.0074-
0.448140000.0075-
0.464145000.0072-
0.48150000.007-
0.496155000.007-
0.512160000.0069-
0.528165000.0071-
0.544170000.0067-
0.56175000.007-
0.576180000.0068-
0.592185000.0068-
0.608190000.0069-
0.624195000.0067-
0.64200000.00670.0044
0.656205000.0065-
0.672210000.0064-
0.688215000.0065-
0.704220000.0065-
0.72225000.0064-
0.736230000.0064-
0.752235000.0063-
0.768240000.0064-
0.784245000.0063-
0.8250000.0063-
0.816255000.0062-
0.832260000.0063-
0.848265000.0062-
0.864270000.006-
0.88275000.006-
0.896280000.006-
0.912285000.0061-
0.928290000.0061-
0.944295000.0059-
0.96300000.0060.0039
0.976305000.0059-
0.992310000.0059-
1.008315000.0057-
1.024320000.0056-
1.04325000.0056-
1.056330000.0056-
1.072335000.0056-
1.088340000.0056-
1.104345000.0054-
1.12350000.0056-
1.1360355000.0055-
1.152360000.0053-
1.168365000.0055-
1.184370000.0054-
1.2375000.0056-
1.216380000.0054-
1.232385000.0053-
1.248390000.0055-
1.264395000.0054-
1.28400000.00550.0037
1.296405000.0053-
1.312410000.0052-
1.328415000.0052-
1.3440420000.0054-
1.3600425000.0055-
1.376430000.0053-
1.392435000.0054-
1.408440000.0053-
1.424445000.0053-
1.44450000.0053-
1.456455000.0053-
1.472460000.0051-
1.488465000.0053-
1.504470000.0052-
1.52475000.0052-
1.536480000.0052-
1.552485000.005-
1.568490000.005-
1.584495000.0052-
1.6500000.00530.0036
1.616505000.0052-
1.6320510000.0052-
1.6480515000.005-
1.6640520000.0051-
1.6800525000.005-
1.696530000.0051-
1.712535000.0051-
1.728540000.005-
1.744545000.0049-
1.76550000.0049-
1.776555000.0049-
1.792560000.0051-
1.808565000.0049-
1.8240570000.0049-
1.8400575000.0051-
1.8560580000.0049-
1.8720585000.005-
1.888590000.0049-
1.904595000.0049-
1.92600000.00480.0034
1.936605000.005-
1.952610000.0048-
1.968615000.0048-
1.984620000.0049-
2.0625000.0049-
2.016630000.0046-
2.032635000.0045-
2.048640000.0045-
2.064645000.0046-
2.08650000.0044-
2.096655000.0046-
2.112660000.0045-
2.128665000.0046-
2.144670000.0045-
2.16675000.0044-
2.176680000.0045-
2.192685000.0046-
2.208690000.0046-
2.224695000.0045-
2.24700000.00460.0033
2.2560705000.0045-
2.2720710000.0045-
2.288715000.0045-
2.304720000.0045-
2.32725000.0045-
2.336730000.0045-
2.352735000.0046-
2.368740000.0045-
2.384745000.0045-
2.4750000.0044-
2.416755000.0044-
2.432760000.0045-
2.448765000.0045-
2.464770000.0045-
2.48775000.0045-
2.496780000.0044-
2.512785000.0044-
2.528790000.0044-
2.544795000.0046-
2.56800000.00450.0032
2.576805000.0045-
2.592810000.0044-
2.608815000.0043-
2.624820000.0045-
2.64825000.0043-
2.656830000.0044-
2.672835000.0043-
2.6880840000.0043-
2.7040845000.0043-
2.7200850000.0044-
2.7360855000.0044-
2.752860000.0044-
2.768865000.0044-
2.784870000.0043-
2.8875000.0043-
2.816880000.0042-
2.832885000.0044-
2.848890000.0044-
2.864895000.0044-
2.88900000.00430.0031
2.896905000.0043-
2.912910000.0044-
2.928915000.0043-
2.944920000.0043-
2.96925000.0042-
2.976930000.0042-
2.992935000.0042-
3.008940000.0041-
3.024945000.0038-
3.04950000.004-
3.056955000.0038-
3.072960000.0039-
3.088965000.0039-
3.104970000.0039-
3.12975000.0039-
3.136980000.0039-
3.152985000.0038-
3.168990000.004-
3.184995000.004-
3.21000000.0040.0031
3.2161005000.0039-
3.2321010000.0038-
3.2481015000.004-
3.26401020000.0039-
3.28001025000.0041-
3.2961030000.004-
3.3121035000.0039-
3.3281040000.0039-
3.3441045000.004-
3.361050000.004-
3.3761055000.004-
3.3921060000.0041-
3.4081065000.004-
3.4241070000.0039-
3.441075000.0039-
3.4561080000.004-
3.4721085000.0039-
3.4881090000.0038-
3.5041095000.0039-
3.521100000.00390.0030
3.5361105000.0041-
3.5521110000.0039-
3.5681115000.0041-
3.5841120000.0038-
3.61125000.0038-
3.6161130000.0039-
3.6321135000.0038-
3.6481140000.0039-
3.6641145000.0038-
3.681150000.0038-
3.69601155000.004-
3.71201160000.0038-
3.72801165000.0039-
3.74401170000.0039-
3.761175000.0038-
3.7761180000.0039-
3.7921185000.0039-
3.8081190000.0038-
3.8241195000.0039-
3.841200000.00390.0029
3.8561205000.0039-
3.8721210000.0039-
3.8881215000.0037-
3.9041220000.0038-
3.921225000.0038-
3.9361230000.0038-
3.9521235000.0039-
3.9681240000.0038-
3.9841245000.0039-
4.01250000.0039-
4.0161255000.0034-
4.0321260000.0035-
4.0481265000.0036-
4.0641270000.0035-
4.081275000.0035-
4.0961280000.0035-
4.1121285000.0035-
4.1281290000.0036-
4.1441295000.0035-
4.161300000.00350.0029
4.1761305000.0035-
4.1921310000.0035-
4.2081315000.0035-
4.2241320000.0036-
4.241325000.0036-
4.2561330000.0036-
4.2721335000.0035-
4.2881340000.0034-
4.3041345000.0036-
4.321350000.0035-
4.3361355000.0036-
4.3521360000.0036-
4.3681365000.0035-
4.3841370000.0036-
4.41375000.0035-
4.4161380000.0034-
4.4321385000.0034-
4.4481390000.0034-
4.4641395000.0035-
4.481400000.00350.0029
4.4961405000.0034-
4.51201410000.0035-
4.52801415000.0035-
4.54401420000.0036-
4.56001425000.0035-
4.5761430000.0034-
4.5921435000.0034-
4.6081440000.0035-
4.6241445000.0035-
4.641450000.0036-
4.6561455000.0036-
4.6721460000.0035-
4.6881465000.0035-
4.7041470000.0033-
4.721475000.0035-
4.7361480000.0035-
4.7521485000.0036-
4.7681490000.0036-
4.7841495000.0035-
4.81500000.00350.0028
4.8161505000.0035-
4.8321510000.0035-
4.8481515000.0035-
4.8641520000.0036-
4.881525000.0036-
4.8961530000.0035-
4.9121535000.0035-
4.9281540000.0035-
4.9441545000.0035-
4.961550000.0035-
4.9761555000.0035-
4.9921560000.0034-
5.0081565000.0033-
5.0241570000.0032-
5.041575000.0032-
5.0561580000.0033-
5.0721585000.0032-
5.0881590000.0032-
5.1041595000.0031-
5.121600000.00320.0028
5.1361605000.0032-
5.1521610000.0032-
5.1681615000.0033-
5.1841620000.0033-
5.21625000.0031-
5.2161630000.0033-
5.2321635000.0032-
5.2481640000.0032-
5.2641645000.0032-
5.281650000.0033-
5.2961655000.0033-
5.3121660000.0031-
5.3281665000.0032-
5.3441670000.0032-
5.361675000.0033-
5.3761680000.0033-
5.3921685000.0032-
5.4081690000.0032-
5.4241695000.0032-
5.441700000.00320.0027
5.4561705000.0031-
5.47201710000.0031-
5.48801715000.0032-
5.5041720000.0031-
5.521725000.0031-
5.5361730000.0032-
5.5521735000.0031-
5.5681740000.0032-
5.5841745000.0032-
5.61750000.0032-
5.6161755000.0032-
5.6321760000.0032-
5.6481765000.0032-
5.6641770000.0032-
5.681775000.0032-
5.6961780000.0032-
5.7121785000.0033-
5.7281790000.0032-
5.7441795000.0031-
5.761800000.00330.0027
5.7761805000.0033-
5.7921810000.003-
5.8081815000.0032-
5.8241820000.0032-
5.841825000.0032-
5.8561830000.0032-
5.8721835000.0033-
5.8881840000.0032-
5.9041845000.0032-
5.921850000.0032-
5.9361855000.0031-
5.9521860000.0031-
5.9681865000.0031-
5.9841870000.0033-
6.01875000.0031-
6.0161880000.0028-
6.0321885000.0029-
6.0481890000.003-
6.0641895000.003-
6.081900000.00290.0027
6.0961905000.0029-
6.1121910000.0029-
6.1281915000.003-
6.1441920000.0029-
6.161925000.003-
6.1761930000.003-
6.1921935000.0029-
6.2081940000.0029-
6.2241945000.0029-
6.241950000.003-
6.2561955000.0029-
6.2721960000.0029-
6.2881965000.0029-
6.3041970000.0029-
6.321975000.003-
6.3361980000.0029-
6.3521985000.0029-
6.3681990000.003-
6.3841995000.0029-
6.42000000.00290.0028
6.4162005000.0029-
6.4322010000.0029-
6.4482015000.0031-
6.4642020000.0029-
6.482025000.003-
6.4962030000.003-
6.51202035000.003-
6.52802040000.0029-
6.54402045000.003-
6.56002050000.0029-
6.5762055000.0028-
6.5922060000.003-
6.6082065000.0029-
6.6242070000.003-
6.642075000.003-
6.6562080000.003-
6.6722085000.0029-
6.6882090000.003-
6.7042095000.003-
6.722100000.00290.0027
6.7362105000.0029-
6.7522110000.0029-
6.7682115000.0029-
6.7842120000.0029-
6.82125000.0029-
6.8162130000.003-
6.8322135000.0028-
6.8482140000.003-
6.8642145000.0029-
6.882150000.0029-
6.8962155000.0029-
6.9122160000.0029-
6.9282165000.0029-
6.9442170000.0028-
6.962175000.003-
6.9762180000.003-
6.9922185000.0029-
7.0082190000.0028-
7.0242195000.0028-
7.042200000.00280.0027
7.0562205000.0027-
7.0722210000.0027-
7.0882215000.0027-
7.1042220000.0026-
7.122225000.0028-
7.1362230000.0027-
7.1522235000.0028-
7.1682240000.0027-
7.1842245000.0027-
7.22250000.0028-
7.2162255000.0027-
7.2322260000.0028-
7.2482265000.0027-
7.2642270000.0027-
7.282275000.0027-
7.2962280000.0027-
7.3122285000.0028-
7.3282290000.0027-
7.3442295000.0028-
7.362300000.00280.0027
7.3762305000.0028-
7.3922310000.0028-
7.4082315000.0028-
7.4242320000.0027-
7.442325000.0027-
7.4562330000.0028-
7.47202335000.0028-
7.48802340000.0028-
7.5042345000.0028-
7.522350000.0028-
7.5362355000.0027-
7.5522360000.0027-
7.5682365000.0028-
7.5842370000.0028-
7.62375000.0027-
7.6162380000.0028-
7.6322385000.0026-
7.6482390000.0027-
7.6642395000.0027-
7.682400000.00280.0027
7.6962405000.0028-
7.7122410000.0027-
7.7282415000.0028-
7.7442420000.0027-
7.762425000.0027-
7.7762430000.0027-
7.7922435000.0028-
7.8082440000.0027-
7.8242445000.0027-
7.842450000.0027-
7.8562455000.0029-
7.8722460000.0028-
7.8882465000.0027-
7.9042470000.0026-
7.922475000.0027-
7.9362480000.0027-
7.9522485000.0027-
7.9682490000.0028-
7.9842495000.0027-
8.02500000.00280.0027

</details>

Framework Versions

  • Python: 3.10.16
  • Sentence Transformers: 4.1.0
  • Transformers: 4.51.3
  • PyTorch: 2.6.0+cu118
  • Accelerate: 1.6.0
  • Datasets: 3.5.0
  • Tokenizers: 0.21.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",
}
ContrastiveLoss
bibtex
@inproceedings{hadsell2006dimensionality,
    author={Hadsell, R. and Chopra, S. and LeCun, Y.},
    booktitle={2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06)},
    title={Dimensionality Reduction by Learning an Invariant Mapping},
    year={2006},
    volume={2},
    number={},
    pages={1735-1742},
    doi={10.1109/CVPR.2006.100}
}

<!--

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