SentenceTransformer based on iambestfeed/phobert-base-v2-Vietnamese-Ecommerce-Alpaca-raw_data_wseg-lr2e-05-1-epochs-bs-48

This is a sentence-transformers model finetuned from iambestfeed/phobert-base-v2-Vietnamese-Ecommerce-Alpaca-raw_data_wseg-lr2e-05-1-epochs-bs-48 on the vnexpress-data-similarity 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 Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: 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:

pip install -U sentence-transformers

Then you can load this model and run inference.

from sentence_transformers import SentenceTransformer

# Download from the 🤗 Hub
model = SentenceTransformer("iambestfeed/phobert-base-v2-ft-eco-vnexpress-data-similarity-raw_data_wseg-lr2e-05-1-epochs-bs-64")
# Run inference
sentences = [
    'Sau 27 năm gia_nhập làng giải_trí , MC - diễn_viên Thanh_Mai hiện hoạt_động nghệ_thuật cầm_chừng , chủ_yếu tập_trung kinh_doanh . - Ngôi_sao',
    'Anh_Tuấn \n - Showbiz \n - Thời_trang \n - Làm_đẹp \n - Xem \n - Ăn_chơi \n - Lối_sống \n - Thể_thao \n - Thời_cuộc \n - Podcasts \n - Thương_trường \n - Trắc_nghiệm \n - Video \n - Ảnh \n - Reviews & Deals \n Sau 27 năm gia_nhập làng giải_trí , MC - diễn_viên Thanh_Mai hiện hoạt_động nghệ_thuật cầm_chừng , chủ_yếu tập_trung kinh_doanh . \n Anh_Tuấn',
    'Phòng Cảnh_sát hình_sự Công_an tỉnh Quảng_Nam cho biết Vũ_Viết Hải , trú thị_trấn Trà_My , huyện Bắc_Trà_My , bị bắt 7h sáng nay khi đang trốn ở phường Trường_Xuân , thành_phố Tam_Kỳ . \n Hải đang đối_mặt với cáo_buộc cướp tài_sản . \n Trước đó , tối 26 / 11 , Hải đi xe_máy mang biển số giả đến cây_xăng bán_lẻ Tiên_Cảnh ở xã Tiên_Cảnh , huyện Tiên_Phước , chờ khách vãn mới đi vào , đề_nghị đổ xăng cho xe_máy của mình . Khi chủ cây_xăng đang bơm xăng , nghi can rút liềm trong người , từ phía sau quàng tay dí vào cổ uy_hiếp . \n Thời_điểm này , cây_xăng có một nhân_viên ngồi phía trong kiểm_đếm tiền và ghi sổ_sách . Hải yêu_cầu chủ cây_xăng đưa hết tiền trong túi , tổng_cộng hơn 15 triệu đồng . \n Theo đại_tá Trần_Văn_Xuân , Trưởng_Phòng Cảnh_sát hình_sự Công_an tỉnh Quảng_Nam , Hải khai trốn ở nhiều nơi . Sáng 5 / 12 , Hải về thành_phố Tam_Kỳ , mượn xe_máy và giật túi_xách của một phụ_nữ trên đường Bạch_Đằng , bên trong có 100.000 đồng và một điện_thoại . \n Nghi_vụ cướp này và cướp tiền ở cây_xăng Tiên_Cảnh có liên_quan , Công_an thành_phố Tam_Kỳ lần theo dấu_vết đã phát_hiện ra Hải . \n Hải không nghề_nghiệp ổn_định , theo cha_mẹ từ huyện Chương Mỹ , Hà_Nội vào lập_nghiệp ở thị_trấn Trà_My , huyện Bắc_Trà_My theo diện kinh_tế mới .',
]
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

vnexpress-data-similarity

  • Dataset: vnexpress-data-similarity at 9547fde
  • Size: 349,711 training samples
  • Columns: anchor and positive
  • Approximate statistics based on the first 1000 samples:
    anchor positive
    type string string
    details
    • min: 5 tokens
    • mean: 29.65 tokens
    • max: 70 tokens
    • min: 22 tokens
    • mean: 205.8 tokens
    • max: 256 tokens
  • Samples:
    anchor positive
    Tôi ở chung_cư , dịp cuối tuần hoặc ngày lễ là người hàng_xóm lại rủ bạn_bè đến nhậu , lôi loa kẹo kéo ra hành_lang hát , & quot ; tra_tấn & quot ; cả tầng trong nhiều giờ . - VnExpress Họ vặn loa hết cỡ , hát từ trưa đến chiều . Căn_hộ tôi ở sát bên , dù đã đóng hết cửa nhưng các con tôi vẫn không ngủ được .
    Trước đó , trưởng tầng từng góp_ý với gia_đình này , tôi cũng báo bảo_vệ chung_cư lên nhắc_nhở , nhưng họ vẫn tái_diễn . Tôi không biết hành_vi này có bị xử_phạt vì gây ô_nhiễm tiếng ồn không ? Tôi nên làm gì để tình_trạng này được xử_lý dứt_điểm ? ( Ngọc_Dung )
    Việt_Nam nằm trong số năm nước có khối_lượng giao_dịch lớn nhất trên sàn Binance với số tiền 20 tỷ USD trong tháng 5 . - VnExpress Theo thống_kê của WSJ , các nhà đầu_tư Việt_Nam giao_dịch khoảng 20 tỷ USD trên sàn tiền số lớn nhất thế_giới và hình_thức chiếm 90 % là Future ( hợp_đồng tương_lai ) . Con_số này đạt gần 5 % trong tổng khối_lượng giao_dịch toàn_cầu của Binance .
    Nước có lượng giao_dịch hàng tháng cao nhất là Trung_Quốc với 90 tỷ USD , tiếp_theo là Hàn_Quốc và Thổ_Nhĩ_Kỳ với 60 tỷ và 45 tỷ USD. Khu_vực còn lại trong top 5 là Quần_đảo Virgin của Anh với 18 tỷ USD.
    Số_liệu thống_kê gây bất_ngờ khi Trung_Quốc chiếm 20 % tổng khối_lượng giao_dịch toàn_cầu của Binance , trong khi chính_phủ nước này cấm tất_cả hoạt_động giao_dịch và đầu_tư tiền số từ 2021 . Bên cạnh đó , Binance cũng tuyên_bố không còn hoạt_động tại đây . Theo nguồn tin nội_bộ , hiện có 900.000 nhà đầu_tư Trung_Quốc hoạt_động trên Binance , còn tổng_số nhà đầu_tư tiền số nói_chung tại quốc_gia này là 5,6 triệu . Để lách luật , Binance điều hướng người dùng Trung_Quốc đến các trang_web có tên_miền thuộc quốc_gia này trước khi chuyển tới s...
    Màn giả gái của Jang_Dong_Yoon trong ' The_Tale of Nokdu ' lên top tìm_kiếm mạng xã_hội Hàn . Drama_cổ trang The_Tale of Nokdu lên sóng 2 tập đầu_vào thứ hai - thứ ba vừa_qua . Phim của đài KBS có rating đứng đầu trong các phim cùng khung giờ . Theo chỉ_số từ Nielsen_Korea , hai tập đầu The_Tale of Nokdu có rating trung_bình lần_lượt là 6,5 % và 8,3 % , thời_điểm rating cao nhất lên 9,6 % . Đã lâu rồi đài KBS mới có phim đạt rating cao như_vậy . Tác_phẩm trước của đài này là I Wanna Hear Your Song chỉ có rating ở mức 3,6 - 4.0 % .
    The_Tale of Nokdu kể về Jeon Nok_Du ( do Jang_Dong_Yoon_thủ vai ) , một chàng trai lưu_lạc đến ngôi làng toàn góa phụ . Để sống được ở đây , Nok_Du phải giả gái và nhận Dong_Dong_Joo ( Kim So_Hyun ) làm con gái nuôi , hướng_dẫn cô các kỹ_năng để trở_thành một kỹ_nữ .
    Trong 2 tập đầu , Nok_Du đã tìm đến ngôi làng . Vì phải giả gái , anh_chàng tạo ra biết_bao tình_huống dở khóc dở cười . Nam diễn_viên Jang_Dong_Yoon nhận được lời khen qua cách thể_hiện sự bối_rối khi phải mặc trang_phục nữ_giới , đồng_thời diễn_vẻ điệu_đà , tinh_tế của phụ_nữ ở từng...
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim"
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • per_device_train_batch_size: 64
  • learning_rate: 2e-05
  • num_train_epochs: 1
  • warmup_ratio: 0.1
  • save_safetensors: False
  • fp16: True
  • push_to_hub: True
  • hub_model_id: iambestfeed/phobert-base-v2-ft-eco-vnexpress-data-similarity-raw_data_wseg-lr2e-05-1-epochs-bs-64
  • batch_sampler: no_duplicates

All Hyperparameters

Click to expand
  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: no
  • prediction_loss_only: True
  • per_device_train_batch_size: 64
  • per_device_eval_batch_size: 8
  • 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: 2e-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: 1
  • 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: False
  • 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: True
  • 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: True
  • resume_from_checkpoint: None
  • hub_model_id: iambestfeed/phobert-base-v2-ft-eco-vnexpress-data-similarity-raw_data_wseg-lr2e-05-1-epochs-bs-64
  • 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: no_duplicates
  • multi_dataset_batch_sampler: proportional

Training Logs

Click to expand
Epoch Step Training Loss
0.0037 10 0.2596
0.0073 20 0.2345
0.0110 30 0.2043
0.0146 40 0.1738
0.0183 50 0.1735
0.0220 60 0.1544
0.0256 70 0.158
0.0293 80 0.1031
0.0329 90 0.1065
0.0366 100 0.1281
0.0403 110 0.1397
0.0439 120 0.0989
0.0476 130 0.0861
0.0512 140 0.0913
0.0549 150 0.0808
0.0586 160 0.0872
0.0622 170 0.0645
0.0659 180 0.079
0.0695 190 0.1105
0.0732 200 0.0793
0.0769 210 0.0782
0.0805 220 0.0744
0.0842 230 0.0653
0.0878 240 0.0695
0.0915 250 0.0635
0.0952 260 0.0643
0.0988 270 0.0936
0.1025 280 0.0778
0.1061 290 0.0543
0.1098 300 0.0711
0.1135 310 0.0616
0.1171 320 0.0675
0.1208 330 0.0625
0.1245 340 0.0817
0.1281 350 0.0491
0.1318 360 0.0586
0.1354 370 0.0795
0.1391 380 0.0538
0.1428 390 0.0614
0.1464 400 0.0625
0.1501 410 0.0628
0.1537 420 0.0617
0.1574 430 0.0715
0.1611 440 0.045
0.1647 450 0.0595
0.1684 460 0.0541
0.1720 470 0.0438
0.1757 480 0.0466
0.1794 490 0.061
0.1830 500 0.039
0.1867 510 0.0453
0.1903 520 0.0521
0.1940 530 0.0449
0.1977 540 0.0699
0.2013 550 0.0508
0.2050 560 0.048
0.2086 570 0.0607
0.2123 580 0.0505
0.2160 590 0.0634
0.2196 600 0.0562
0.2233 610 0.0424
0.2269 620 0.0406
0.2306 630 0.0576
0.2343 640 0.0557
0.2379 650 0.0455
0.2416 660 0.0402
0.2452 670 0.0477
0.2489 680 0.051
0.2526 690 0.0633
0.2562 700 0.0567
0.2599 710 0.0415
0.2635 720 0.0544
0.2672 730 0.0552
0.2709 740 0.0376
0.2745 750 0.0474
0.2782 760 0.051
0.2818 770 0.0399
0.2855 780 0.0481
0.2892 790 0.0497
0.2928 800 0.0427
0.2965 810 0.0346
0.3001 820 0.0366
0.3038 830 0.0449
0.3075 840 0.0427
0.3111 850 0.0662
0.3148 860 0.0415
0.3184 870 0.0474
0.3221 880 0.0508
0.3258 890 0.0449
0.3294 900 0.0497
0.3331 910 0.0442
0.3367 920 0.0549
0.3404 930 0.0592
0.3441 940 0.0584
0.3477 950 0.0437
0.3514 960 0.0399
0.3551 970 0.0406
0.3587 980 0.0545
0.3624 990 0.0561
0.3660 1000 0.0371
0.3697 1010 0.042
0.3734 1020 0.0525
0.3770 1030 0.0434
0.3807 1040 0.0441
0.3843 1050 0.0478
0.3880 1060 0.0624
0.3917 1070 0.0485
0.3953 1080 0.0484
0.3990 1090 0.0312
0.4026 1100 0.0406
0.4063 1110 0.0401
0.4100 1120 0.0504
0.4136 1130 0.0353
0.4173 1140 0.0353
0.4209 1150 0.0451
0.4246 1160 0.0477
0.4283 1170 0.0431
0.4319 1180 0.0404
0.4356 1190 0.0401
0.4392 1200 0.0414
0.4429 1210 0.0415
0.4466 1220 0.047
0.4502 1230 0.0369
0.4539 1240 0.0511
0.4575 1250 0.0478
0.4612 1260 0.0543
0.4649 1270 0.0429
0.4685 1280 0.0385
0.4722 1290 0.0394
0.4758 1300 0.038
0.4795 1310 0.04
0.4832 1320 0.0513
0.4868 1330 0.0439
0.4905 1340 0.0415
0.4941 1350 0.0431
0.4978 1360 0.033
0.5015 1370 0.0517
0.5051 1380 0.0478
0.5088 1390 0.0363
0.5124 1400 0.0477
0.5161 1410 0.0598
0.5198 1420 0.0395
0.5234 1430 0.0392
0.5271 1440 0.0499
0.5307 1450 0.045
0.5344 1460 0.0475
0.5381 1470 0.0366
0.5417 1480 0.0423
0.5454 1490 0.0417
0.5490 1500 0.0504
0.5527 1510 0.0378
0.5564 1520 0.0456
0.5600 1530 0.0481
0.5637 1540 0.0596
0.5673 1550 0.0304
0.5710 1560 0.0386
0.5747 1570 0.0436
0.5783 1580 0.0419
0.5820 1590 0.0264
0.5857 1600 0.0308
0.5893 1610 0.0614
0.5930 1620 0.0389
0.5966 1630 0.0254
0.6003 1640 0.0365
0.6040 1650 0.0244
0.6076 1660 0.0422
0.6113 1670 0.03
0.6149 1680 0.0325
0.6186 1690 0.0428
0.6223 1700 0.0419
0.6259 1710 0.0379
0.6296 1720 0.039
0.6332 1730 0.0443
0.6369 1740 0.0347
0.6406 1750 0.0276
0.6442 1760 0.0485
0.6479 1770 0.0459
0.6515 1780 0.0292
0.6552 1790 0.0362
0.6589 1800 0.0398
0.6625 1810 0.0313
0.6662 1820 0.0287
0.6698 1830 0.0241
0.6735 1840 0.0401
0.6772 1850 0.0294
0.6808 1860 0.0238
0.6845 1870 0.0398
0.6881 1880 0.0418
0.6918 1890 0.0369
0.6955 1900 0.0393
0.6991 1910 0.0584
0.7028 1920 0.0322
0.7064 1930 0.0488
0.7101 1940 0.0452
0.7138 1950 0.0284
0.7174 1960 0.0402
0.7211 1970 0.0344
0.7247 1980 0.0308
0.7284 1990 0.0385
0.7321 2000 0.0436
0.7357 2010 0.0402
0.7394 2020 0.0292
0.7430 2030 0.0392
0.7467 2040 0.034
0.7504 2050 0.0458
0.7540 2060 0.0295
0.7577 2070 0.031
0.7613 2080 0.0308
0.7650 2090 0.0305
0.7687 2100 0.0322
0.7723 2110 0.0461
0.7760 2120 0.0315
0.7796 2130 0.044
0.7833 2140 0.0307
0.7870 2150 0.039
0.7906 2160 0.0323
0.7943 2170 0.0391
0.7980 2180 0.038
0.8016 2190 0.0256
0.8053 2200 0.0331
0.8089 2210 0.0453
0.8126 2220 0.0281
0.8163 2230 0.0328
0.8199 2240 0.0339
0.8236 2250 0.0436
0.8272 2260 0.044
0.8309 2270 0.0354
0.8346 2280 0.0417
0.8382 2290 0.0345
0.8419 2300 0.0356
0.8455 2310 0.0391
0.8492 2320 0.0384
0.8529 2330 0.0331
0.8565 2340 0.0275
0.8602 2350 0.038
0.8638 2360 0.0349
0.8675 2370 0.0445
0.8712 2380 0.0464
0.8748 2390 0.0493
0.8785 2400 0.0367
0.8821 2410 0.0248
0.8858 2420 0.0374
0.8895 2430 0.0294
0.8931 2440 0.0328
0.8968 2450 0.0385
0.9004 2460 0.0509
0.9041 2470 0.0322
0.9078 2480 0.0357
0.9114 2490 0.0392
0.9151 2500 0.0403
0.9187 2510 0.028
0.9224 2520 0.0324
0.9261 2530 0.0242
0.9297 2540 0.0264
0.9334 2550 0.04
0.9370 2560 0.0262
0.9407 2570 0.0475
0.9444 2580 0.0311
0.9480 2590 0.0361
0.9517 2600 0.0315
0.9553 2610 0.0408
0.9590 2620 0.0278
0.9627 2630 0.0269
0.9663 2640 0.0386
0.9700 2650 0.0284
0.9736 2660 0.0332
0.9773 2670 0.0275
0.9810 2680 0.0404
0.9846 2690 0.0267
0.9883 2700 0.0427
0.9919 2710 0.0278
0.9956 2720 0.0195
0.9993 2730 0.0259

Framework Versions

  • Python: 3.10.12
  • Sentence Transformers: 3.3.1
  • Transformers: 4.47.0
  • PyTorch: 2.5.1+cu121
  • Accelerate: 1.2.1
  • Datasets: 3.3.1
  • Tokenizers: 0.21.0

Citation

BibTeX

Sentence Transformers

@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

@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}
}
Downloads last month
4
Safetensors
Model size
135M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for iambestfeed/phobert-base-v2-ft-eco-vnexpress-data-similarity-raw_data_wseg-lr2e-05-1-epochs-bs-64

Dataset used to train iambestfeed/phobert-base-v2-ft-eco-vnexpress-data-similarity-raw_data_wseg-lr2e-05-1-epochs-bs-64