CoolFace
Modelpublic

lingtrain/labse-chuvash-2

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

SentenceTransformer based on sentence-transformers/LaBSE

This is a sentence-transformers model finetuned from sentence-transformers/LaBSE. 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: sentence-transformers/LaBSE <!-- at revision 836121a0533e5664b21c7aacc5d22951f2b8b25b -->
  • Maximum Sequence Length: 256 tokens
  • Output Dimensionality: 768 dimensions
  • Similarity Function: Cosine Similarity <!-- - Training Dataset: Unknown --> <!-- - Language: Unknown --> <!-- - License: Unknown -->

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel 
  (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})
  (2): Dense({'in_features': 768, 'out_features': 768, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
  (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 = [
    'Генри Джастис Форд',
    'Форд, Генри Джастис',
    'Я вышел из ванны свеж и бодр, как будто собирался на бал.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]

# 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: 1,000,000 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: 3 tokens</li><li>mean: 21.82 tokens</li><li>max: 127 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 21.16 tokens</li><li>max: 136 tokens</li></ul> | <ul><li>min: 1.0</li><li>mean: 1.0</li><li>max: 1.0</li></ul> |
  • Samples: | sentence0 | sentence1 | label | |:-----------------------------------------------------------------------------------|:--------------------------------------------------------------|:-----------------| | <code>Темех мар.</code> | <code>Дело десятое.</code> | <code>1.0</code> | | <code>Уругвайӑн тĕн ĕҫченĕсем</code> | <code>Религиозные деятели Уругвая</code> | <code>1.0</code> | | <code>Эп аванах ас тӑватӑп, пилӗк ҫул каялла пахчана эпир лайӑх тасатнӑччӗ.</code> | <code>А пять лет тому назад я знал, что сад был чищен.</code> | <code>1.0</code> |
  • Loss: <code>MultipleNegativesRankingLoss</code> with these parameters:
json
  {
      "scale": 20.0,
      "similarity_fct": "cos_sim"
  }

Training Hyperparameters

Non-Default Hyperparameters
  • eval_strategy: steps
  • per_device_train_batch_size: 12
  • per_device_eval_batch_size: 12
  • num_train_epochs: 1
  • fp16: True
  • multi_dataset_batch_sampler: round_robin
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: 12
  • per_device_eval_batch_size: 12
  • 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: 1
  • 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: 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: round_robin

</details>

Training Logs

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

EpochStepTraining Loss
0.0012100-
0.0024200-
0.0036300-
0.0048400-
0.00605000.5331
0.0072600-
0.0084700-
0.0096800-
0.0108900-
0.012010000.3694
0.01321100-
0.01441200-
0.01561300-
0.01681400-
0.018015000.3141
0.01921600-
0.02041700-
0.02161800-
0.02281900-
0.024020000.2836
0.02522100-
0.02642200-
0.02762300-
0.02882400-
0.030025000.2823
0.03122600-
0.03242700-
0.03362800-
0.03482900-
0.036030000.265
0.03723100-
0.03843200-
0.03963300-
0.04083400-
0.042035000.2599
0.04323600-
0.04443700-
0.04563800-
0.04683900-
0.048040000.234
0.04924100-
0.05044200-
0.05164300-
0.05284400-
0.054045000.1966
0.05524600-
0.05644700-
0.05764800-
0.05884900-
0.060050000.2204
0.06125100-
0.06245200-
0.06365300-
0.06485400-
0.066055000.2272
0.06725600-
0.06845700-
0.06965800-
0.07085900-
0.072060000.2256
0.07326100-
0.07446200-
0.07566300-
0.07686400-
0.078065000.2071
0.07926600-
0.08046700-
0.08166800-
0.08286900-
0.084070000.2113
0.08527100-
0.08647200-
0.08767300-
0.08887400-
0.090075000.2222
0.09127600-
0.09247700-
0.09367800-
0.09487900-
0.096080000.2186
0.09728100-
0.09848200-
0.09968300-
0.10088400-
0.102085000.2137
0.10328600-
0.10448700-
0.10568800-
0.10688900-
0.108090000.1928
0.10929100-
0.11049200-
0.11169300-
0.11289400-
0.114095000.2117
0.11529600-
0.11649700-
0.11769800-
0.11889900-
0.1200100000.1987
0.121210100-
0.122410200-
0.123610300-
0.124810400-
0.1260105000.2011
0.127210600-
0.128410700-
0.129610800-
0.130810900-
0.1320110000.1775
0.133211100-
0.134411200-
0.135611300-
0.136811400-
0.1380115000.2048
0.139211600-
0.140411700-
0.141611800-
0.142811900-
0.1440120000.2064
0.145212100-
0.146412200-
0.147612300-
0.148812400-
0.1500125000.1883
0.151212600-
0.152412700-
0.153612800-
0.154812900-
0.1560130000.2084
0.157213100-
0.158413200-
0.159613300-
0.160813400-
0.1620135000.2077
0.163213600-
0.164413700-
0.165613800-
0.166813900-
0.1680140000.1866
0.169214100-
0.170414200-
0.171614300-
0.172814400-
0.1740145000.1859
0.175214600-
0.176414700-
0.177614800-
0.178814900-
0.1800150000.1735
0.181215100-
0.182415200-
0.183615300-
0.184815400-
0.1860155000.171
0.187215600-
0.188415700-
0.189615800-
0.190815900-
0.1920160000.1465
0.193216100-
0.194416200-
0.195616300-
0.196816400-
0.1980165000.1921
0.199216600-
0.200416700-
0.201616800-
0.202816900-
0.2040170000.1669
0.205217100-
0.206417200-
0.207617300-
0.208817400-
0.2100175000.1656
0.211217600-
0.212417700-
0.213617800-
0.214817900-
0.2160180000.1952
0.217218100-
0.218418200-
0.219618300-
0.220818400-
0.2220185000.1658
0.223218600-
0.224418700-
0.225618800-
0.226818900-
0.2280190000.1774
0.229219100-
0.230419200-
0.231619300-
0.232819400-
0.2340195000.1802
0.235219600-
0.236419700-
0.237619800-
0.238819900-
0.2400200000.1724
0.241220100-
0.242420200-
0.243620300-
0.244820400-
0.2460205000.1653
0.247220600-
0.248420700-
0.249620800-
0.250820900-
0.2520210000.1484
0.253221100-
0.254421200-
0.255621300-
0.256821400-
0.2580215000.1544
0.259221600-
0.260421700-
0.261621800-
0.262821900-
0.2640220000.174
0.265222100-
0.266422200-
0.267622300-
0.268822400-
0.2700225000.1488
0.271222600-
0.272422700-
0.273622800-
0.274822900-
0.2760230000.1696
0.277223100-
0.278423200-
0.279623300-
0.280823400-
0.2820235000.1468
0.283223600-
0.284423700-
0.285623800-
0.286823900-
0.2880240000.1738
0.289224100-
0.290424200-
0.291624300-
0.292824400-
0.2940245000.1667
0.295224600-
0.296424700-
0.297624800-
0.298824900-
0.3000250000.1562
0.301225100-
0.302425200-
0.303625300-
0.304825400-
0.3060255000.1628
0.307225600-
0.308425700-
0.309625800-
0.310825900-
0.3120260000.1392
0.313226100-
0.314426200-
0.315626300-
0.316826400-
0.3180265000.1507
0.319226600-
0.320426700-
0.321626800-
0.322826900-
0.3240270000.1646
0.325227100-
0.326427200-
0.327627300-
0.328827400-
0.3300275000.1433
0.331227600-
0.332427700-
0.333627800-
0.334827900-
0.3360280000.1689
0.337228100-
0.338428200-
0.339628300-
0.340828400-
0.3420285000.1432
0.343228600-
0.344428700-
0.345628800-
0.346828900-
0.3480290000.1534
0.349229100-
0.350429200-
0.351629300-
0.352829400-
0.3540295000.1487
0.355229600-
0.356429700-
0.357629800-
0.358829900-
0.3600300000.1439
0.361230100-
0.362430200-
0.363630300-
0.364830400-
0.3660305000.1397
0.367230600-
0.368430700-
0.369630800-
0.370830900-
0.3720310000.1542
0.373231100-
0.374431200-
0.375631300-
0.376831400-
0.3780315000.1448
0.379231600-
0.380431700-
0.381631800-
0.382831900-
0.3840320000.1608
0.385232100-
0.386432200-
0.387632300-
0.388832400-
0.3900325000.1486
0.391232600-
0.392432700-
0.393632800-
0.394832900-
0.3960330000.1274
0.397233100-
0.398433200-
0.399633300-
0.400833400-
0.4020335000.1451
0.403233600-
0.404433700-
0.405633800-
0.406833900-
0.4080340000.1316
0.409234100-
0.410434200-
0.411634300-
0.412834400-
0.4140345000.1306
0.415234600-
0.416434700-
0.417634800-
0.418834900-
0.4200350000.1382
0.421235100-
0.422435200-
0.423635300-
0.424835400-
0.4260355000.1322
0.427235600-
0.428435700-
0.429635800-
0.430835900-
0.4320360000.1617
0.433236100-
0.434436200-
0.435636300-
0.436836400-
0.4380365000.14
0.439236600-
0.440436700-
0.441636800-
0.442836900-
0.4440370000.1321
0.445237100-
0.446437200-
0.447637300-
0.448837400-
0.4500375000.1464
0.451237600-
0.452437700-
0.453637800-
0.454837900-
0.4560380000.1236
0.457238100-
0.458438200-
0.459638300-
0.460838400-
0.4620385000.147
0.463238600-
0.464438700-
0.465638800-
0.466838900-
0.4680390000.1376
0.469239100-
0.470439200-
0.471639300-
0.472839400-
0.4740395000.1342
0.475239600-
0.476439700-
0.477639800-
0.478839900-
0.4800400000.123
0.481240100-
0.482440200-
0.483640300-
0.484840400-
0.4860405000.1312
0.487240600-
0.488440700-
0.489640800-
0.490840900-
0.4920410000.1325
0.493241100-
0.494441200-
0.495641300-
0.496841400-
0.4980415000.1203
0.499241600-
0.500441700-
0.501641800-
0.502841900-
0.5040420000.1258
0.505242100-
0.506442200-
0.507642300-
0.508842400-
0.5100425000.141
0.511242600-
0.512442700-
0.513642800-
0.514842900-
0.5160430000.1473
0.517243100-
0.518443200-
0.519643300-
0.520843400-
0.5220435000.1247
0.523243600-
0.524443700-
0.525643800-
0.526843900-
0.5280440000.1259
0.529244100-
0.530444200-
0.531644300-
0.532844400-
0.5340445000.1372
0.535244600-
0.536444700-
0.537644800-
0.538844900-
0.5400450000.1413
0.541245100-
0.542445200-
0.543645300-
0.544845400-
0.5460455000.1157
0.547245600-
0.548445700-
0.549645800-
0.550845900-
0.5520460000.127
0.553246100-
0.554446200-
0.555646300-
0.556846400-
0.5580465000.1202
0.559246600-
0.560446700-
0.561646800-
0.562846900-
0.5640470000.1199
0.565247100-
0.566447200-
0.567647300-
0.568847400-
0.5700475000.1309
0.571247600-
0.572447700-
0.573647800-
0.574847900-
0.5760480000.1276
0.577248100-
0.578448200-
0.579648300-
0.580848400-
0.5820485000.1278
0.583248600-
0.584448700-
0.585648800-
0.586848900-
0.5880490000.1175
0.589249100-
0.590449200-
0.591649300-
0.592849400-
0.5940495000.1327
0.595249600-
0.596449700-
0.597649800-
0.598849900-
0.6000500000.1109
0.601250100-
0.602450200-
0.603650300-
0.604850400-
0.6060505000.1248
0.607250600-
0.608450700-
0.609650800-
0.610850900-
0.6120510000.1296
0.613251100-
0.614451200-
0.615651300-
0.616851400-
0.6180515000.1323
0.619251600-
0.620451700-
0.621651800-
0.622851900-
0.6240520000.1155
0.625252100-
0.626452200-
0.627652300-
0.628852400-
0.6300525000.1245
0.631252600-
0.632452700-
0.633652800-
0.634852900-
0.6360530000.1238
0.637253100-
0.638453200-
0.639653300-
0.640853400-
0.6420535000.12
0.643253600-
0.644453700-
0.645653800-
0.646853900-
0.6480540000.1116
0.649254100-
0.650454200-
0.651654300-
0.652854400-
0.6540545000.1305
0.655254600-
0.656454700-
0.657654800-
0.658854900-
0.6600550000.1355
0.661255100-
0.662455200-
0.663655300-
0.664855400-
0.6660555000.1139
0.667255600-
0.668455700-
0.669655800-
0.670855900-
0.6720560000.1251
0.673256100-
0.674456200-
0.675656300-
0.676856400-
0.6780565000.1211
0.679256600-
0.680456700-
0.681656800-
0.682856900-
0.6840570000.1123
0.685257100-
0.686457200-
0.687657300-
0.688857400-
0.6900575000.1071
0.691257600-
0.692457700-
0.693657800-
0.694857900-
0.6960580000.112
0.697258100-
0.698458200-
0.699658300-
0.700858400-
0.7020585000.1038
0.703258600-
0.704458700-
0.705658800-
0.706858900-
0.7080590000.1238
0.709259100-
0.710459200-
0.711659300-
0.712859400-
0.7140595000.1001
0.715259600-
0.716459700-
0.717659800-
0.718859900-
0.7200600000.0948
0.721260100-
0.722460200-
0.723660300-
0.724860400-
0.7260605000.1271
0.727260600-
0.728460700-
0.729660800-
0.730860900-
0.7320610000.1117
0.733261100-
0.734461200-
0.735661300-
0.736861400-
0.7380615000.1122
0.739261600-
0.740461700-
0.741661800-
0.742861900-
0.7440620000.0972
0.745262100-
0.746462200-
0.747662300-
0.748862400-
0.7500625000.1135
0.751262600-
0.752462700-
0.753662800-
0.754862900-
0.7560630000.1092
0.757263100-
0.758463200-
0.759663300-
0.760863400-
0.7620635000.1155
0.763263600-
0.764463700-
0.765663800-
0.766863900-
0.7680640000.1065
0.769264100-
0.770464200-
0.771664300-
0.772864400-
0.7740645000.1211
0.775264600-
0.776464700-
0.777664800-
0.778864900-
0.7800650000.116
0.781265100-
0.782465200-
0.783665300-
0.784865400-
0.7860655000.1138
0.787265600-
0.788465700-
0.789665800-
0.790865900-
0.7920660000.1155
0.793266100-
0.794466200-
0.795666300-
0.796866400-
0.7980665000.1059
0.799266600-
0.800466700-
0.801666800-
0.802866900-
0.8040670000.1189
0.805267100-
0.806467200-
0.807667300-
0.808867400-
0.8100675000.1089
0.811267600-
0.812467700-
0.813667800-
0.814867900-
0.8160680000.1016
0.817268100-
0.818468200-
0.819668300-
0.820868400-
0.8220685000.121
0.823268600-
0.824468700-
0.825668800-
0.826868900-
0.8280690000.1185
0.829269100-
0.830469200-
0.831669300-
0.832869400-
0.8340695000.1026
0.835269600-
0.836469700-
0.837669800-
0.838869900-
0.8400700000.1209
0.841270100-
0.842470200-
0.843670300-
0.844870400-
0.8460705000.1103
0.847270600-
0.848470700-
0.849670800-
0.850870900-
0.8520710000.1098
0.853271100-
0.854471200-
0.855671300-
0.856871400-
0.8580715000.1055
0.859271600-
0.860471700-
0.861671800-
0.862871900-
0.8640720000.1045
0.865272100-
0.866472200-
0.867672300-
0.868872400-
0.8700725000.1126
0.871272600-
0.872472700-
0.873672800-
0.874872900-
0.8760730000.1058
0.877273100-
0.878473200-
0.879673300-
0.880873400-
0.8820735000.1138
0.883273600-
0.884473700-
0.885673800-
0.886873900-
0.8880740000.1071
0.889274100-
0.890474200-
0.891674300-
0.892874400-
0.8940745000.1091
0.895274600-
0.896474700-
0.897674800-
0.898874900-
0.9000750000.1143
0.901275100-
0.902475200-

</details>

Framework Versions

  • Python: 3.12.10
  • Sentence Transformers: 4.1.0
  • Transformers: 4.51.3
  • PyTorch: 2.6.0+cu124
  • Accelerate: 1.8.1
  • Datasets: 3.6.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",
}
MultipleNegativesRankingLoss
bibtex
@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}
}

<!--

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