SentenceTransformer(
(0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: Qwen3Model
(1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': False, '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': True, 'include_prompt': True})
(2): Normalize()
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("sentence_transformers_model_id")
5# Run inference
6sentences = [
7 '비영리 연구법인인데 독립된 연구시설이 있고, 장비 수입 관련해서 ‘연구개발 시설’로 인정받을 수 있는지 궁금해요. 또 한편으로는 수납·지급 대행 같은 면세 금융용역도 병행하고 과세 매출도 있어서 공통매입세액을 나눠야 하는데, 이 두 가지를 같이 따져서 처리 기준을 알고 싶습니다.',
8 '부가가치세법 시행규칙 | 제40조 | 영세율과 면세, 면세, 면세하는 과학용 등의 수입 재화와 관련한 과학기술 연구개발 시설의 범위\n\n제40조(면세하는 과학용 등의 수입 재화와 관련한 과학기술 연구개발 시설의 범위) 영 제51조제2호에서 "연구원, 연구기관 등 재정경제부령으로 정하는 과학기술 연구개발 시설"이란 다음 각 호의 어느 하나에 해당하는 연구원 등을 말한다. <개정 2020.3.13, 2024.3.22, 2025.3.21, 2025.10.31, 2026.1.2>\n1. 「특정연구기관 육성법」 제2조에 따른 연구기관\n2. 「산업기술혁신 촉진법」 제42조에 따라 산업통상부장관의 허가를 받아 설립된 연구소\n3. 「산업교육진흥 및 산학연협력촉진에 관한 법률」 제25조에 따라 설립된 산학협력단\n4. 「산업기술연구조합 육성법」에 따라 설립된 산업기술연구조합(기술개발을 위한 공동연구시설을 갖추고 자연계분야의 학사 이상의 학위를 가진 연구전담요원 3인 이상을 상시 확보하고 있음을 과학기술정보통신부장관이 확인한 산업기술연구조합으로 한정한다)\n5. 「과학기술분야 정부출연연구기관 등의 설립ㆍ운영 및 육성에 관한 법률」 제8조에 따라 설립된 연구기관\n6. 「국방과학연구소법」에 따라 설립된 국방과학연구소\n7. 「한국해양과학기술원법」에 따라 설립된 한국해양과학기술원\n8. 「우주항공청의 설치 및 운영에 관한 특별법」 제19조에 따라 설립된 한국항공우주연구원 및 같은 법 제20조에 따라 설립된 한국천문연구원\n9. 산업기술연구를 목적으로 「민법」 제32조 및 「협동조합 기본법」에 따라 설립된 비영리법인으로서 독립된 연구시설을 갖추고 있는 법인임을 산업통상부장관, 과학기술정보통신부장관 또는 재정경제부장관이 확인ㆍ추천하는 기관',
9 '부가가치세법 시행령 | 제49조 | 영세율과 면세, 면세, 면세하는 수입 미가공식료품의 범위\n\n제49조(면세하는 수입 미가공식료품의 범위)\n① 법 제27조제1호에 따른 가공되지 아니한 식료품(이하 이 조에서 "수입 미가공식료품"이라 한다)의 범위에 관하여는 제34조제1항 및 제2항을 준용한다. 다만, 관세가 감면되지 아니하는 수입 미가공식료품으로서 재정경제부령으로 정하는 것은 제외한다. <개정 2025.12.30>\n② 제1항에서 규정한 사항 외에 수입 미가공식료품의 범위에 관하여 필요한 사항은 재정경제부령으로 정한다. <개정 2025.12.30>',
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13# [3, 1024]
14
15# Get the similarity scores for the embeddings
16similarities = model.similarity(embeddings, embeddings)
17print(similarities.shape)
18# [3, 3]vat-legal-retrievalInformationRetrievalEvaluator| Metric | Value |
|---|---|
| cosine_accuracy@10 | 1.0 |
| cosine_accuracy@20 | 1.0 |
| cosine_accuracy@30 | 1.0 |
| cosine_precision@1 | 0.8839 |
| cosine_precision@3 | 0.6385 |
| cosine_precision@5 | 0.4354 |
| cosine_precision@10 | 0.2317 |
| cosine_recall@1 | 0.3874 |
| cosine_recall@3 | 0.8206 |
| cosine_recall@5 | 0.9288 |
| cosine_recall@10 | 0.9846 |
| cosine_ndcg@10 | 0.9062 |
| cosine_mrr@10 | 0.9362 |
| cosine_map@100 | 0.8437 |
sentence_0 and sentence_1| sentence_0 | sentence_1 | |
|---|---|---|
| type | string | string |
| details |
|
|
| sentence_0 | sentence_1 |
|---|---|
주사업장 총괄 납부를 하려고 사업자 단위 과세를 포기하는 절차를 밟는 중인데요. 포기 신고서 제출 시기(며칠 전까지)와 제출처, 신고서 기재사항이 무엇인지 알고 싶습니다. 그리고 선발행 세금계산서의 경우 7일 이내 입금이 안 되면 원칙적으로 공급시기가 어떻게 되는지, 예외로 인정되는 경우(계약서에 지급기일 기재 등)가 있는지도 함께 알고 싶어요. | 부가가치세법 |
부동산 임대업을 하는데 임대료를 후불로 받고 있고 과세기간을 넘겨 정산합니다. 이런 경우 매출 인식 시점이 과세기간 종료일로 고정되는 건가요? 그리고 임차인이 파산해서 임대료를 못 받으면 대손세액 공제를 받을 수 있는지, 계산은 어떻게 되는지 알고 싶어요. | 부가가치세법 |
비영리 연구법인인데 독립된 연구시설이 있고, 장비 수입 관련해서 ‘연구개발 시설’로 인정받을 수 있는지 궁금해요. 또 한편으로는 수납·지급 대행 같은 면세 금융용역도 병행하고 과세 매출도 있어서 공통매입세액을 나눠야 하는데, 이 두 가지를 같이 따져서 처리 기준을 알고 싶습니다. | 부가가치세법 시행규칙 |
MultipleNegativesRankingLoss with these parameters:
1{
2 "scale": 20.0,
3 "similarity_fct": "cos_sim"
4}eval_strategy: stepsper_device_train_batch_size: 4per_device_eval_batch_size: 4num_train_epochs: 2multi_dataset_batch_sampler: round_robinoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 4per_device_eval_batch_size: 4per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 5e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1num_train_epochs: 2max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: Nonewarmup_ratio: 0.0warmup_steps: 0log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Truesave_safetensors: Truesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseno_cuda: Falseuse_cpu: Falseuse_mps_device: Falseseed: 42data_seed: Nonejit_mode_eval: Falsebf16: Falsefp16: Falsefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_rank: 0ddp_backend: Nonetpu_num_cores: Nonetpu_metrics_debug: Falsedebug: []dataloader_drop_last: Falsedataloader_num_workers: 0dataloader_prefetch_factor: Nonepast_index: -1disable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Falseignore_data_skip: Falsefsdp: []fsdp_min_num_params: 0fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}fsdp_transformer_layer_cls_to_wrap: Noneaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}parallelism_config: Nonedeepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torchoptim_args: Noneadafactor: Falsegroup_by_length: Falselength_column_name: lengthproject: huggingfacetrackio_space_id: trackioddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falsedataloader_pin_memory: Truedataloader_persistent_workers: Falseskip_memory_metrics: Trueuse_legacy_prediction_loop: Falsepush_to_hub: Falseresume_from_checkpoint: Nonehub_model_id: Nonehub_strategy: every_savehub_private_repo: Nonehub_always_push: Falsehub_revision: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseinclude_for_metrics: []eval_do_concat_batches: Truefp16_backend: autopush_to_hub_model_id: Nonepush_to_hub_organization: Nonemp_parameters:auto_find_batch_size: Falsefull_determinism: Falsetorchdynamo: Noneray_scope: lastddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: noneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseliger_kernel_config: Noneeval_use_gather_object: Falseaverage_tokens_across_devices: Trueprompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: round_robin| Epoch | Step | Training Loss | vat-legal-retrieval_cosine_ndcg@10 |
|---|---|---|---|
| 0.0554 | 50 | - | 0.7107 |
| 0.1107 | 100 | - | 0.6960 |
| 0.1661 | 150 | - | 0.6921 |
| 0.2215 | 200 | - | 0.6862 |
| 0.2769 | 250 | - | 0.6640 |
| 0.3322 | 300 | - | 0.6872 |
| 0.3876 | 350 | - | 0.6554 |
| 0.4430 | 400 | - | 0.6832 |
| 0.4983 | 450 | - | 0.7280 |
| 0.5537 | 500 | 0.2768 | 0.7378 |
| 0.6091 | 550 | - | 0.7710 |
| 0.6645 | 600 | - | 0.7717 |
| 0.7198 | 650 | - | 0.7851 |
| 0.7752 | 700 | - | 0.7797 |
| 0.8306 | 750 | - | 0.7794 |
| 0.8859 | 800 | - | 0.7837 |
| 0.9413 | 850 | - | 0.8243 |
| 0.9967 | 900 | - | 0.8206 |
| 1.0 | 903 | - | 0.8230 |
| 1.0520 | 950 | - | 0.8293 |
| 1.1074 | 1000 | 0.2163 | 0.8283 |
| 1.1628 | 1050 | - | 0.8159 |
| 1.2182 | 1100 | - | 0.8298 |
| 1.2735 | 1150 | - | 0.8422 |
| 1.3289 | 1200 | - | 0.8646 |
| 1.3843 | 1250 | - | 0.8674 |
| 1.4396 | 1300 | - | 0.8675 |
| 1.4950 | 1350 | - | 0.8738 |
| 1.5504 | 1400 | - | 0.8711 |
| 1.6058 | 1450 | - | 0.8748 |
| 1.6611 | 1500 | 0.1325 | 0.8915 |
| 1.7165 | 1550 | - | 0.8915 |
| 1.7719 | 1600 | - | 0.8964 |
| 1.8272 | 1650 | - | 0.9049 |
| 1.8826 | 1700 | - | 0.9041 |
| 1.9380 | 1750 | - | 0.9035 |
| 1.9934 | 1800 | - | 0.9062 |
1@inproceedings{reimers-2019-sentence-bert,
2 title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
3 author = "Reimers, Nils and Gurevych, Iryna",
4 booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
5 month = "11",
6 year = "2019",
7 publisher = "Association for Computational Linguistics",
8 url = "https://arxiv.org/abs/1908.10084",
9}1@misc{henderson2017efficient,
2 title={Efficient Natural Language Response Suggestion for Smart Reply},
3 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},
4 year={2017},
5 eprint={1705.00652},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL}
8}