--- tags: - sentence-transformers - sentence-similarity - feature-extraction - generated_from_trainer - dataset_size:5777 - loss:BatchAllTripletLoss base_model: cl-nagoya/sup-simcse-ja-base widget: - source_sentence: 科目:金属。名称:ライニング壁スチールパネル。 sentences: - 科目:金属。名称:内壁-内壁EXP・Jカバー壁B。 - 科目:鉄骨。名称:滑り支承用耐火被覆-FK。 - 科目:既製コンクリート。名称:地下二重壁押出成型セメントパネル。 - source_sentence: 科目:金属。名称:地下1階湧水槽3タラップA。 sentences: - 科目:金属。名称:ブラインドボックス下り天井軽量鉄骨天井下地。 - 科目:ユニット及びその他。名称:P-#フロア案内サインA。 - 科目:建具。名称:AW-#欄間FIX窓付引違い窓。 - source_sentence: 科目:内外装。名称:天井廻縁。 sentences: - 科目:植栽。名称:客土。 - 科目:ユニット及びその他。名称:P-#室名サインB。 - 科目:土工。名称:埋戻し(A種)。 - source_sentence: 科目:内外装。名称:4F議場壁化粧吸音板。 sentences: - 科目:地業。名称:建設発生土処分。 - 科目:免震。名称:SS#免震装置設置手間。 - 科目:地業。名称:施工費(P1)。 - source_sentence: 科目:土工。名称:水替。 sentences: - 科目:既製コンクリート。名称:地下二重壁押出成型セメントパネル足元金物。 - 科目:木工。名称:4F議場木製リブ(一般部)。 - 科目:既製コンクリート。名称:押出成形セメント板水抜パイプ。 pipeline_tag: sentence-similarity library_name: sentence-transformers --- # SentenceTransformer based on cl-nagoya/sup-simcse-ja-base This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [cl-nagoya/sup-simcse-ja-base](https://huggingface.co/cl-nagoya/sup-simcse-ja-base). 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:** [cl-nagoya/sup-simcse-ja-base](https://huggingface.co/cl-nagoya/sup-simcse-ja-base) - **Maximum Sequence Length:** 512 tokens - **Output Dimensionality:** 768 dimensions - **Similarity Function:** Cosine Similarity ### Model Sources - **Documentation:** [Sentence Transformers Documentation](https://sbert.net) - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers) - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers) ### Full Model Architecture ``` SentenceTransformer( (0): Transformer({'max_seq_length': 512, '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}) ) ``` ## 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("Detomo/cl-nagoya-sup-simcse-ja-for-standard-name-v1_0") # 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] ``` ## Training Details ### Training Dataset #### Unnamed Dataset * Size: 5,777 training samples * Columns: sentence and label * Approximate statistics based on the first 1000 samples: | | sentence | label | |:--------|:-----------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | type | string | int | | details | | | * Samples: | sentence | label | |:-----------------------------------|:---------------| | 科目:共通仮設費。名称:仮囲い。 | 0 | | 科目:共通仮設費。名称:電動パネルゲート。 | 1 | | 科目:共通仮設費。名称:タワークレーン。 | 2 | * Loss: [BatchAllTripletLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#batchalltripletloss) ### Training Hyperparameters #### Non-Default Hyperparameters - `per_device_train_batch_size`: 256 - `per_device_eval_batch_size`: 256 - `learning_rate`: 1e-05 - `weight_decay`: 0.01 - `num_train_epochs`: 200 - `warmup_ratio`: 0.1 - `fp16`: True - `batch_sampler`: group_by_label #### All Hyperparameters
Click to expand - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: no - `prediction_loss_only`: True - `per_device_train_batch_size`: 256 - `per_device_eval_batch_size`: 256 - `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`: 1e-05 - `weight_decay`: 0.01 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 1.0 - `num_train_epochs`: 200 - `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 - `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`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False} - `fsdp_transformer_layer_cls_to_wrap`: None - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': 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`: group_by_label - `multi_dataset_batch_sampler`: proportional
### Training Logs | Epoch | Step | Training Loss | |:--------:|:----:|:-------------:| | 3.0870 | 20 | 0.8892 | | 6.1739 | 40 | 0.8935 | | 9.2609 | 60 | 0.862 | | 13.0870 | 80 | 0.803 | | 16.1739 | 100 | 0.8154 | | 19.2609 | 120 | 0.7741 | | 23.0870 | 140 | 0.7383 | | 26.1739 | 160 | 0.7381 | | 29.2609 | 180 | 0.7082 | | 33.0870 | 200 | 0.6593 | | 36.1739 | 220 | 0.6816 | | 39.2609 | 240 | 0.6507 | | 43.0870 | 260 | 0.6357 | | 46.1739 | 280 | 0.643 | | 49.2609 | 300 | 0.6336 | | 53.0870 | 320 | 0.6392 | | 56.1739 | 340 | 0.6153 | | 59.2609 | 360 | 0.6385 | | 63.0870 | 380 | 0.6034 | | 66.1739 | 400 | 0.6194 | | 69.2609 | 420 | 0.6334 | | 73.0870 | 440 | 0.5934 | | 76.1739 | 460 | 0.6216 | | 79.2609 | 480 | 0.6211 | | 83.0870 | 500 | 0.5974 | | 86.1739 | 520 | 0.6612 | | 89.2609 | 540 | 0.5143 | | 93.0870 | 560 | 0.5871 | | 96.1739 | 580 | 0.5752 | | 99.2609 | 600 | 0.5661 | | 103.0870 | 620 | 0.5879 | | 106.1739 | 640 | 0.5866 | | 109.2609 | 660 | 0.5677 | | 113.0870 | 680 | 0.4864 | | 116.1739 | 700 | 0.5891 | | 119.2609 | 720 | 0.617 | | 123.0870 | 740 | 0.5785 | | 126.1739 | 760 | 0.534 | | 129.2609 | 780 | 0.5854 | | 133.0870 | 800 | 0.5971 | | 136.1739 | 820 | 0.5309 | | 139.2609 | 840 | 0.5514 | | 143.0870 | 860 | 0.5656 | | 146.1739 | 880 | 0.5106 | | 149.2609 | 900 | 0.4831 | | 153.0870 | 920 | 0.497 | | 156.1739 | 940 | 0.4606 | | 159.2609 | 960 | 0.4699 | | 163.0870 | 980 | 0.5007 | | 166.1739 | 1000 | 0.5483 | | 169.2609 | 1020 | 0.4527 | | 173.0870 | 1040 | 0.448 | | 176.1739 | 1060 | 0.4639 | | 179.2609 | 1080 | 0.6067 | | 183.0870 | 1100 | 0.4516 | | 186.1739 | 1120 | 0.4747 | | 189.2609 | 1140 | 0.4732 | | 193.0870 | 1160 | 0.5844 | | 196.1739 | 1180 | 0.4461 | | 199.2609 | 1200 | 0.4609 | ### Framework Versions - Python: 3.11.11 - Sentence Transformers: 3.3.1 - Transformers: 4.48.3 - PyTorch: 2.5.1+cu124 - Accelerate: 1.3.0 - Datasets: 3.3.2 - 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", } ``` #### BatchAllTripletLoss ```bibtex @misc{hermans2017defense, title={In Defense of the Triplet Loss for Person Re-Identification}, author={Alexander Hermans and Lucas Beyer and Bastian Leibe}, year={2017}, eprint={1703.07737}, archivePrefix={arXiv}, primaryClass={cs.CV} } ```