--- language: - vi license: apache-2.0 tags: - sentence-transformers - sentence-similarity - feature-extraction - dense - generated_from_trainer - dataset_size:162512 - loss:MatryoshkaLoss - loss:CachedMultipleNegativesSymmetricRankingLoss base_model: bkai-foundation-models/vietnamese-bi-encoder widget: - source_sentence: Quy_định về sử_dụng hè phố sentences: - Có văn_bản nào quy_định cấm cho những gia_đình nhà mặt đường_phố làm rạp để tổ_chức làm_ma , đám_cưới không ? - Nội_dung quản_lý nhà_nước về quốc_phòng trên không_gian mạng và công_nghệ thông_tin là gì và được quy_định ở văn_bản nào ? - Lấy cắp thông_tin của người khác đi vay tiền bị phạt thế_nào ? - source_sentence: TPHCM trả_lời về việc hỗ_trợ gia_đình ông Phan Trọng_Đồng sentences: - Doanh_nghiệp tôi thành_lập tháng 10 / 2022 , hoạt_động xuất_khẩu 100 % . Đến tháng 3 , số thuế GTGT đầu_vào là 2 tỷ đồng . Vậy_doanh_nghiệp có đủ điều_kiện hoàn thuế theo quy_định của Luật thuế GTGT không ? Theo quy_định tại Điều 18 Thông_tư 219 yêu_cầu doanh_nghiệp phải hoạt_động 12 tháng liên_tục , nhưng theo Thông_tư 130 sửa_đổi thì không nhắc đến điều_kiện này nữa . Vậy_liệu doanh_nghiệp có đủ điều_kiện hoàn thuế không ? Luật thuế 2016 sửa_đổi đã bác_bỏ điều 13 tại Luật thuế 2013 , vậy có đúng là doanh_nghiệp vẫn đủ điều_kiện hoàn thuế không ? - 'Tôi mắc COVID - 19 ( F0 ) vào tháng 11 / 2021 và có nhận được thông_báo từ UBND phường về việc hỗ_trợ F0 , F1 . Tháng 12 / 2021 , tôi đã nộp đầy_đủ hồ_sơ cho cán_bộ phường và có ký nhận hồ_sơ . Đến nay , tôi đã nhiều lần đến UBND phường hỏi về việc hỗ_trợ , nhưng đều nhận được câu trả_lời là chưa có . Tôi đề_nghị cơ_quan_chức_năng có câu trả_lời về chính_sách hỗ_trợ cho F0 , F1 . UBND Phường 19 , quận Bình_Thạnh , TPHCM trả_lời vấn_đề này như sau : Ông Phan_Trọng Đồng có nộp hồ_sơ ( hỗ_trợ đối_tượng F1 , F0 phải điều_trị , cách_ly y_tế đủ điều_kiện nhận hỗ_trợ theo Nghị_quyết số68 / NQ - CP , Quyết_định số23 / 2021 / QĐ - TTg , Quyết_định số33 / 2021 / QĐ - TTg ) tại UBND Phường 19 . UBND Phường 19 đã tổng_hợp hồ_sơ trình UBND quận thẩm_định , phê_duyệt theo quy_định . Khi nào được cấp kinh_phí hỗ_trợ từ cơ_quan có thẩm_quyền , UBND phường sẽ thông_tin đến ông Đồng và nhân_dân trên địa_bàn phường sớm nhất có_thể .' - Một giáo_viên được trường phân_công dạy môn tin_học nhưng hè năm_học 2020 - 2021 có dạy thêm 01 nhóm học_sinh " Môn toán " và thu học_phí trọn_gói đến khi thi tốt_nghiệp lớp 12 năm_học 2021 - 2022 là 2.000.000 đ / hs . Vậy_giáo_viên này có vi_phạm không , nếu có thì nội_dung vi_phạm là gì , hướng xử_lý như thế_nào ? Nếu là đảng_viên thì mặt Đảng xử_lý ra sao ? Trước đó hiệu_trưởng đã có thông_báo trên hội_đồng sư_phạm trường là không cho dạy thêm dưới mọi hình_thức . - source_sentence: "\n \" Quy_định về thời_hạn và hiệu_lực giấy chứng_nhận đủ điều_kiện\ \ sản_xuất kinh_doanh hóa_chất có điều_kiện trong lĩnh_vực công_nghiệp \" , \n\ \ \" Thủ_tục bổ_sung danh_mục_hóa_chất của doanh_nghiệp sau khi được cấp giấy\ \ chứng_nhận đủ điều_kiện sản_xuất kinh_doanh hóa_chất có điều_kiện \" \n" sentences: - "Điều 226 Bộ_luật hình_sự 2015 số 100 / 2015 / QH13 mới nhất có nội_dung như sau\ \ : \n \n Điều 226 . Tội xâm_phạm quyền sở_hữu công_nghiệp \n 1 . Người nào cố_ý\ \ xâm_phạm quyền sở_hữu công_nghiệp đối_với nhãn_hiệu hoặc chỉ_dẫn địa_lý đang\ \ được bảo_hộ tại Việt_Nam , thu lợi bất_chính từ 100.000.000 đồng đến dưới 300.000.000\ \ đồng hoặc gây thiệt_hại cho chủ sở_hữu nhãn_hiệu hoặc chỉ_dẫn địa_lý từ 200.000.000\ \ đồng đến dưới 500.000.000 đồng hoặc hàng_hóa vi_phạm trị_giá từ 200.000.000\ \ đồng đến dưới 500.000.000 đồng , thì bị phạt tiền từ 50.000.000 đồng đến 500.000.000\ \ đồng hoặc phạt cải_tạo không giam_giữ đến 03 năm . \n 2 . Phạm_tội thuộc một\ \ trong các trường_hợp sau đây , thì bị phạt tiền từ 500.000.000 đồng đến 1.000.000.000\ \ đồng hoặc phạt tù từ 06 tháng đến 03 năm : \n a ) Có tổ_chức ; \n b ) Phạm_tội\ \ 02 lần trở lên ; \n c ) Thu_lợi bất_chính 300.000.000 đồng trở lên ; \n d )\ \ Gây thiệt_hại cho chủ sở_hữu nhãn_hiệu hoặc chỉ_dẫn địa_lý 500.000.000 đồng\ \ trở lên ; \n đ ) Hàng_hóa vi_phạm trị_giá 500.000.000 đồng trở lên . \n 3 .\ \ Người phạm_tội còn có_thể bị phạt tiền từ 20.000.000 đồng đến 200.000.000 đồng\ \ , cấm đảm_nhiệm chức_vụ , cấm hành_nghề hoặc làm công_việc nhất_định từ 01 năm\ \ đến 05 năm . \n 4 . Pháp_nhân thương_mại phạm_tội quy_định tại Điều này , thì\ \ bị phạt như sau : \n a ) Pháp_nhân thương_mại thực_hiện_hành_vi quy_định tại\ \ khoản 1 Điều này , đã bị xử_phạt vi_phạm hành_chính về hành_vi này hoặc đã bị\ \ kết_án về tội này , chưa được xóa_án tích mà còn vi_phạm , thì bị phạt tiền\ \ từ 500.000.000 đồng đến 2.000.000.000 đồng ; \n b ) Phạm_tội thuộc trường_hợp\ \ quy_định tại khoản 2 Điều này , thì bị phạt tiền từ 2.000.000.000 đồng đến 5.000.000.000\ \ đồng hoặc đình_chỉ hoạt_động có thời_hạn từ 06 tháng đến 02 năm ; \n c ) Pháp_nhân\ \ thương_mại còn có_thể bị phạt tiền từ 100.000.000 đồng đến 500.000.000 đồng\ \ , cấm kinh_doanh , cấm hoạt_động trong một_số lĩnh_vực nhất_định hoặc cấm huy_động\ \ vốn từ 01 năm đến 03 năm ." - Em cho chị công_văn nào của Bộ y_tế về quy_định xin giấy_phép cho mặt_hàng nhập_khẩu khẩu_trang nha . - Có phải trước đây giấy chứng_nhận đủ điều_kiện sản_xuất kinh_doanh hóa_chất có điều_kiện trong lĩnh_vực công_nghiệp có_hạn 5 năm nhưng từ năm 2022 giấy chứng_nhận này sẽ chỉ cấp 1 lần và sử_dụng mãi theo vòng đời của doanh_nghiệp đúng không ? Khi có phát_sinh danh_mục_hóa_chất mới , doanh_nghiệp xin bổ_sung như thế_nào ? - source_sentence: Dự_án điều_chỉnh tổng mức đầu_tư nhưng không điều_chỉnh giấy chứng_nhận đầu_tư mà chỉ có quyết_định phê_duyệt điều_chỉnh quy_hoạch thì có đúng quy_định không ? sentences: - 'Căn_cứ theo văn_bản pháp_luật nào quy_định về giá_trị của công_trình bao_nhiêu là phải thực_hiện đấu_thầu công_khai ? Việc nhà_thầu thi_công trúng_thầu có cần hồ_sơ năng_lực hay không ? Ví_dụ : Công_trình mục_đích xây_dựng nông_thôn mới ở địa_phương thuộc xã , lắp_đặt hệ_thống đèn_điện chiếu sáng ở đường nông_thôn .' - "Điều 13 . Báo tin , xử_lý tin báo và lập hồ_sơ vụ_việc về sự_cố giao_thông đường_sắt\ \ 1 . Doanh_nghiệp kinh_doanh kết_cấu_hạ_tầng đường_sắt quy_định việc báo tin\ \ , xử_lý tin báo , lập Hồ_sơ vụ_việc , giải_quyết sự_cố giao_thông đường_sắt\ \ xảy ra trên đường_sắt quốc_gia . \n 2 . Chủ sở_hữu đường_sắt chuyên_dùng quy_định\ \ việc báo tin , xử_lý tin báo , lập Hồ_sơ vụ_việc , giải_quyết sự_cố giao_thông\ \ đường xảy ra trên đường_sắt chuyên_dùng ." - "Nhờ bạn tư_vấn giúp mình trường_hợp : Về việc xin cấp giấy chứng_nhận đầu_tư\ \ điều_chỉnh : \n \n Công_ty đã được cấp giấy chứng_nhận đầu_tư lần đầu là 80\ \ tỷ đồng . Sau đó có thực_hiện điều_chỉnh tổng mức đầu_tư lần 2 lên 153 tỷ đồng\ \ và điều_chỉnh lần 3 xuống 140 tỷ đồng . Tuy_nhiên , phía công_ty cho biết họ\ \ không thực_hiện xin cấp giấy chứng_nhận đầu_tư điều_chỉnh mà chỉ có quyết_định\ \ phê_duyệt điều_chỉnh quy_hoạch 1 / 500 về thay_đổi tổng mức đầu_tư \n Hỏi :\ \ việc khách_hàng không xin giấy chứng_nhận đầu_tư điều_chỉnh có đúng không .\ \ Với hồ_sơ hiện_tại có đủ tính pháp_lý không . \n Văn_bản pháp_luật nào quy_định\ \ về việc phải thực_hiện xin giấy chứng_nhận đầu_tư điều_chỉnh" - source_sentence: Ngân_hàng hợp_tác_xã có nhu_cầu thành_lập chi_nhánh để làm gì ? sentences: - Vừa_rồi Tôi và em_trai có ra vịnh gần nhà và có đánh_bắt khoảng trên 20kg cá_bỗng , và đã bị lập biên_bản về hành_vi này anh_chị cho tôi hỏi trường_hợp này gia_đình tôi sẽ bị xử_phạt như thế_nào ? Tôi cảm_ơn rất nhiều . - Khi thanh_toán tiền_lương cho người lao_động bảng thanh_toán tiền_lương có phải lấy chữ_ký của người lao_động không ? - Thông_tư 09 / 2018 / TT - NHNN quy_định về mạng_lưới hoạt_động của tổ_chức tín_dụng là hợp_tác_xã do Ngân_hàng Nhà_nước Việt_Nam ban_hành Điều 10 Điều_kiện thành_lập chi_nhánh Khoản 1 Có nhu_cầu thành_lập chi_nhánh để phục_vụ các quỹ tín_dụng nhân_dân trên địa_bàn dự_kiến thành_lập chi_nhánh . pipeline_tag: sentence-similarity library_name: sentence-transformers metrics: - cosine_accuracy@1 - cosine_accuracy@3 - cosine_accuracy@5 - cosine_accuracy@10 - cosine_precision@1 - cosine_precision@3 - cosine_precision@5 - cosine_precision@10 - cosine_recall@1 - cosine_recall@3 - cosine_recall@5 - cosine_recall@10 - cosine_ndcg@10 - cosine_mrr@10 - cosine_map@100 model-index: - name: bkai-fine-tuned-legal results: - task: type: information-retrieval name: Information Retrieval dataset: name: dim 768 type: dim_768 metrics: - type: cosine_accuracy@1 value: 0.4284237471694398 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.592842374716944 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.6512257556365069 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.7233435069410259 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.4284237471694398 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.19761412490564798 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.13024515112730137 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.0723343506941026 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.4284237471694398 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.592842374716944 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.6512257556365069 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.7233435069410259 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.5720350375528778 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.5240482168056819 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.5316054651429374 name: Cosine Map@100 - task: type: information-retrieval name: Information Retrieval dataset: name: dim 512 type: dim_512 metrics: - type: cosine_accuracy@1 value: 0.42704538741754455 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.5921531948409964 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.6504381214925667 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.7216205572511568 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.42704538741754455 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.1973843982803321 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.1300876242985133 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.07216205572511569 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.42704538741754455 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.5921531948409964 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.6504381214925667 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.7216205572511568 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.570587688327153 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.522662492518264 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.5302971341510442 name: Cosine Map@100 - task: type: information-retrieval name: Information Retrieval dataset: name: dim 256 type: dim_256 metrics: - type: cosine_accuracy@1 value: 0.42010436152407205 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.5870828000393817 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.6473860391847986 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.7164517081815497 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.42010436152407205 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.1956942666797939 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.12947720783695973 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.07164517081815495 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.42010436152407205 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.5870828000393817 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.6473860391847986 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.7164517081815497 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.5648933784570224 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.51674314453556 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.524464620400421 name: Cosine Map@100 - task: type: information-retrieval name: Information Retrieval dataset: name: dim 128 type: dim_128 metrics: - type: cosine_accuracy@1 value: 0.41404942404253225 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.576498966230186 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.6385251550654721 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.7102490892980211 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.41404942404253225 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.19216632207672868 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.12770503101309444 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.07102490892980211 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.41404942404253225 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.576498966230186 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.6385251550654721 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.7102490892980211 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.5578687503059883 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.5095590499006912 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.5172301211992038 name: Cosine Map@100 - task: type: information-retrieval name: Information Retrieval dataset: name: dim 64 type: dim_64 metrics: - type: cosine_accuracy@1 value: 0.39829674116372943 name: Cosine Accuracy@1 - type: cosine_accuracy@3 value: 0.5587279708575367 name: Cosine Accuracy@3 - type: cosine_accuracy@5 value: 0.6187358471989761 name: Cosine Accuracy@5 - type: cosine_accuracy@10 value: 0.6914935512454465 name: Cosine Accuracy@10 - type: cosine_precision@1 value: 0.39829674116372943 name: Cosine Precision@1 - type: cosine_precision@3 value: 0.18624265695251221 name: Cosine Precision@3 - type: cosine_precision@5 value: 0.1237471694397952 name: Cosine Precision@5 - type: cosine_precision@10 value: 0.06914935512454463 name: Cosine Precision@10 - type: cosine_recall@1 value: 0.39829674116372943 name: Cosine Recall@1 - type: cosine_recall@3 value: 0.5587279708575367 name: Cosine Recall@3 - type: cosine_recall@5 value: 0.6187358471989761 name: Cosine Recall@5 - type: cosine_recall@10 value: 0.6914935512454465 name: Cosine Recall@10 - type: cosine_ndcg@10 value: 0.5402002340134702 name: Cosine Ndcg@10 - type: cosine_mrr@10 value: 0.49229386332985225 name: Cosine Mrr@10 - type: cosine_map@100 value: 0.5004018695881347 name: Cosine Map@100 --- # bkai-fine-tuned-legal This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [bkai-foundation-models/vietnamese-bi-encoder](https://huggingface.co/bkai-foundation-models/vietnamese-bi-encoder) on the json dataset. 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:** [bkai-foundation-models/vietnamese-bi-encoder](https://huggingface.co/bkai-foundation-models/vietnamese-bi-encoder) - **Maximum Sequence Length:** 256 tokens - **Output Dimensionality:** 768 dimensions - **Similarity Function:** Cosine Similarity - **Training Dataset:** - json - **Language:** vi - **License:** apache-2.0 ### 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': 256, 'do_lower_case': False, 'architecture': 'RobertaModel'}) (1): Pooling({'word_embedding_dimension': 768, '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}) ) ``` ## 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 = [ 'Ngân_hàng hợp_tác_xã có nhu_cầu thành_lập chi_nhánh để làm gì ?', 'Thông_tư 09 / 2018 / TT - NHNN quy_định về mạng_lưới hoạt_động của tổ_chức tín_dụng là hợp_tác_xã do Ngân_hàng Nhà_nước Việt_Nam ban_hành Điều 10 Điều_kiện thành_lập chi_nhánh Khoản 1 Có nhu_cầu thành_lập chi_nhánh để phục_vụ các quỹ tín_dụng nhân_dân trên địa_bàn dự_kiến thành_lập chi_nhánh .', 'Vừa_rồi Tôi và em_trai có ra vịnh gần nhà và có đánh_bắt khoảng trên 20kg cá_bỗng , và đã bị lập biên_bản về hành_vi này anh_chị cho tôi hỏi trường_hợp này gia_đình tôi sẽ bị xử_phạt như thế_nào ? Tôi cảm_ơn rất nhiều .', ] embeddings = model.encode(sentences) print(embeddings.shape) # [3, 768] # Get the similarity scores for the embeddings similarities = model.similarity(embeddings, embeddings) print(similarities) # tensor([[ 1.0000, 0.8501, -0.0413], # [ 0.8501, 1.0000, -0.0990], # [-0.0413, -0.0990, 1.0000]]) ``` ## Evaluation ### Metrics #### Information Retrieval * Dataset: `dim_768` * Evaluated with [InformationRetrievalEvaluator](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters: ```json { "truncate_dim": 768 } ``` | Metric | Value | |:--------------------|:----------| | cosine_accuracy@1 | 0.4284 | | cosine_accuracy@3 | 0.5928 | | cosine_accuracy@5 | 0.6512 | | cosine_accuracy@10 | 0.7233 | | cosine_precision@1 | 0.4284 | | cosine_precision@3 | 0.1976 | | cosine_precision@5 | 0.1302 | | cosine_precision@10 | 0.0723 | | cosine_recall@1 | 0.4284 | | cosine_recall@3 | 0.5928 | | cosine_recall@5 | 0.6512 | | cosine_recall@10 | 0.7233 | | **cosine_ndcg@10** | **0.572** | | cosine_mrr@10 | 0.524 | | cosine_map@100 | 0.5316 | #### Information Retrieval * Dataset: `dim_512` * Evaluated with [InformationRetrievalEvaluator](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters: ```json { "truncate_dim": 512 } ``` | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.427 | | cosine_accuracy@3 | 0.5922 | | cosine_accuracy@5 | 0.6504 | | cosine_accuracy@10 | 0.7216 | | cosine_precision@1 | 0.427 | | cosine_precision@3 | 0.1974 | | cosine_precision@5 | 0.1301 | | cosine_precision@10 | 0.0722 | | cosine_recall@1 | 0.427 | | cosine_recall@3 | 0.5922 | | cosine_recall@5 | 0.6504 | | cosine_recall@10 | 0.7216 | | **cosine_ndcg@10** | **0.5706** | | cosine_mrr@10 | 0.5227 | | cosine_map@100 | 0.5303 | #### Information Retrieval * Dataset: `dim_256` * Evaluated with [InformationRetrievalEvaluator](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters: ```json { "truncate_dim": 256 } ``` | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.4201 | | cosine_accuracy@3 | 0.5871 | | cosine_accuracy@5 | 0.6474 | | cosine_accuracy@10 | 0.7165 | | cosine_precision@1 | 0.4201 | | cosine_precision@3 | 0.1957 | | cosine_precision@5 | 0.1295 | | cosine_precision@10 | 0.0716 | | cosine_recall@1 | 0.4201 | | cosine_recall@3 | 0.5871 | | cosine_recall@5 | 0.6474 | | cosine_recall@10 | 0.7165 | | **cosine_ndcg@10** | **0.5649** | | cosine_mrr@10 | 0.5167 | | cosine_map@100 | 0.5245 | #### Information Retrieval * Dataset: `dim_128` * Evaluated with [InformationRetrievalEvaluator](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters: ```json { "truncate_dim": 128 } ``` | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.414 | | cosine_accuracy@3 | 0.5765 | | cosine_accuracy@5 | 0.6385 | | cosine_accuracy@10 | 0.7102 | | cosine_precision@1 | 0.414 | | cosine_precision@3 | 0.1922 | | cosine_precision@5 | 0.1277 | | cosine_precision@10 | 0.071 | | cosine_recall@1 | 0.414 | | cosine_recall@3 | 0.5765 | | cosine_recall@5 | 0.6385 | | cosine_recall@10 | 0.7102 | | **cosine_ndcg@10** | **0.5579** | | cosine_mrr@10 | 0.5096 | | cosine_map@100 | 0.5172 | #### Information Retrieval * Dataset: `dim_64` * Evaluated with [InformationRetrievalEvaluator](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters: ```json { "truncate_dim": 64 } ``` | Metric | Value | |:--------------------|:-----------| | cosine_accuracy@1 | 0.3983 | | cosine_accuracy@3 | 0.5587 | | cosine_accuracy@5 | 0.6187 | | cosine_accuracy@10 | 0.6915 | | cosine_precision@1 | 0.3983 | | cosine_precision@3 | 0.1862 | | cosine_precision@5 | 0.1237 | | cosine_precision@10 | 0.0691 | | cosine_recall@1 | 0.3983 | | cosine_recall@3 | 0.5587 | | cosine_recall@5 | 0.6187 | | cosine_recall@10 | 0.6915 | | **cosine_ndcg@10** | **0.5402** | | cosine_mrr@10 | 0.4923 | | cosine_map@100 | 0.5004 | ## Training Details ### Training Dataset #### json * Dataset: json * Size: 162,512 training samples * Columns: anchor and positive * Approximate statistics based on the first 1000 samples: | | anchor | positive | |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------| | type | string | string | | details | | | * Samples: | anchor | positive | |:----------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Có được ghi_nhận chi_phí cước đường_bộ của theo hoá_đơn của bên thuê xe ? | Công_ty A sử_dụng dịch_vụ thuê xe theo tháng của công_ty B. Công_ty B có nhận được hóa đơn đầu_vào là cước đường_bộ . Vậy công_ty A có được ghi_nhận chi_phí hợp_lý cho các hóa_đơn cước đường_bộ này không ? | | Làm thêm có phải đóng BHXH không ? | Luật Bảo_hiểm xã_hội 2014 Điều 85 Mức đóng và phương_thức đóng của người lao_động tham_gia_bảo_hiểm xã_hội bắt_buộc Khoản 3 Người lao_động không làm_việc và không hưởng tiền_lương từ 14 ngày làm_việc trở lên trong tháng thì không đóng bảo_hiểm xã_hội tháng đó . Thời_gian này không được tính để hưởng bảo_hiểm xã_hội , trừ trường_hợp nghỉ_việc hưởng chế_độ thai_sản . | | Chủ đầu_tư tự_lập hồ_sơ thiết_kế có cần phải có chứng_chỉ năng_lực không ? | 1 / Chủ đầu_tư tự_lập hồ_sơ thiết_kế báo_cáo kinh_tế kỹ_thuật thì yêu_cầu phải có chứng_chỉ hành_nghề không ? hay_là chỉ cần nhân_viên có bằng kỹ_sư theo đúng chuyên_ngành ?
2 / Trong trường_hợp chủ đầu_tư tự_lập hồ_sơ thiết_kế báo_cáo kinh_tế kỹ_thuật có được thực_hiện gói_thầu thi_công theo hình_thức tự thực_hiện không ?
Kính nhờ LVPL tư_vấn giúp .
| * Loss: [MatryoshkaLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters: ```json { "loss": "CachedMultipleNegativesSymmetricRankingLoss", "matryoshka_dims": [ 768, 512, 256, 128, 64 ], "matryoshka_weights": [ 1, 1, 1, 1, 1 ], "n_dims_per_step": -1 } ``` ### Evaluation Dataset #### json * Dataset: json * Size: 20,315 evaluation samples * Columns: anchor and positive * Approximate statistics based on the first 1000 samples: | | anchor | positive | |:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------| | type | string | string | | details | | | * Samples: | anchor | positive | |:------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Chính_sách bồi_thường , giải_phóng mặt_bằng đối_với dự_án trạm biến_áp theo pháp_luật Việt_Nam | Chính_sách bồi_thường , giải_phóng mặt_bằng của dự_án trạm biến_áp đi qua phần đất của gia_đình có được pháp_luật quy_định không hay chỉ là thỏa_thuận giữa người dân và chủ đầu_tư dự_án ? | | Chi_phí nhận tiền USD hoặc phí ngân_hàng ngoại_tệ sẽ ghi theo tỷ_giá nào ? | Khi em giao_dịch phát_sinh chi_phí nhận tiền USD hoặc phí ngân_hàng ngoại_tệ thì em đọc theo Thông_tư 200 / 2014 / TT - BTC thì tỷ_giá ghi_nhận là tỷ_giá bán của ngân_hàng phải không ? | | Đơn_vị sự_nghiệp có được ban_hành danh_mục mua_sắm tập_trung không ? | Đơn_vị sự_nghiệp có tự ban_hành danh_mục mua_sắm tập_trung để thực_hiện việc mua_sắm theo phương_thức tập_trung được hay không
| * Loss: [MatryoshkaLoss](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters: ```json { "loss": "CachedMultipleNegativesSymmetricRankingLoss", "matryoshka_dims": [ 768, 512, 256, 128, 64 ], "matryoshka_weights": [ 1, 1, 1, 1, 1 ], "n_dims_per_step": -1 } ``` ### Training Hyperparameters #### Non-Default Hyperparameters - `eval_strategy`: epoch - `per_device_train_batch_size`: 12 - `per_device_eval_batch_size`: 12 - `gradient_accumulation_steps`: 24 - `learning_rate`: 3e-05 - `weight_decay`: 0.15 - `max_grad_norm`: 0.65 - `num_train_epochs`: 12 - `lr_scheduler_type`: cosine - `warmup_ratio`: 0.15 - `fp16`: True - `load_best_model_at_end`: True - `group_by_length`: True - `batch_sampler`: no_duplicates #### All Hyperparameters
Click to expand - `overwrite_output_dir`: False - `do_predict`: False - `eval_strategy`: epoch - `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`: 24 - `eval_accumulation_steps`: None - `torch_empty_cache_steps`: None - `learning_rate`: 3e-05 - `weight_decay`: 0.15 - `adam_beta1`: 0.9 - `adam_beta2`: 0.999 - `adam_epsilon`: 1e-08 - `max_grad_norm`: 0.65 - `num_train_epochs`: 12 - `max_steps`: -1 - `lr_scheduler_type`: cosine - `lr_scheduler_kwargs`: {} - `warmup_ratio`: 0.15 - `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`: True - `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_fused - `optim_args`: None - `adafactor`: False - `group_by_length`: True - `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 - `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`: False - `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`: False - `prompts`: None - `batch_sampler`: no_duplicates - `multi_dataset_batch_sampler`: proportional - `router_mapping`: {} - `learning_rate_mapping`: {}
### Training Logs | Epoch | Step | Training Loss | Validation Loss | dim_768_cosine_ndcg@10 | dim_512_cosine_ndcg@10 | dim_256_cosine_ndcg@10 | dim_128_cosine_ndcg@10 | dim_64_cosine_ndcg@10 | |:-------:|:--------:|:-------------:|:---------------:|:----------------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:| | 1.0 | 565 | 0.4082 | 0.1543 | 0.5250 | 0.5228 | 0.5179 | 0.5031 | 0.4774 | | 2.0 | 1130 | 0.1442 | 0.1137 | 0.5340 | 0.5311 | 0.5238 | 0.5085 | 0.4847 | | 3.0 | 1695 | 0.0898 | 0.0849 | 0.5440 | 0.5426 | 0.5361 | 0.5245 | 0.5034 | | 4.0 | 2260 | 0.0612 | 0.0819 | 0.5458 | 0.5442 | 0.5378 | 0.5280 | 0.5063 | | 5.0 | 2825 | 0.048 | 0.0778 | 0.5490 | 0.5463 | 0.5408 | 0.5323 | 0.5133 | | **6.0** | **3390** | **0.0415** | **0.0679** | **0.5685** | **0.567** | **0.5614** | **0.5525** | **0.5331** | | 7.0 | 3955 | 0.0324 | 0.0690 | 0.5720 | 0.5706 | 0.5649 | 0.5579 | 0.5402 | * The bold row denotes the saved checkpoint. ### Framework Versions - Python: 3.10.12 - Sentence Transformers: 5.1.0 - Transformers: 4.55.0 - PyTorch: 2.8.0+cu128 - Accelerate: 1.10.0 - Datasets: 4.0.0 - Tokenizers: 0.21.4 ## 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", } ``` #### MatryoshkaLoss ```bibtex @misc{kusupati2024matryoshka, title={Matryoshka Representation Learning}, author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi}, year={2024}, eprint={2205.13147}, archivePrefix={arXiv}, primaryClass={cs.LG} } ```