Gte Multilingual Base V2.1 Similarity
This is a fine-tuned SentenceTransformer model based on BookingCare/gte-multilingual-base-v2.1, designed for calculating sentence similarity and semantic search tasks.
Downloads 21
Release Time : 2/18/2025
Model Overview
The model maps sentences and paragraphs into a 768-dimensional dense vector space, suitable for semantic text similarity, semantic search, paraphrase mining, text classification, clustering, and other tasks.
Model Features
High Accuracy
Achieves 96.9% cosine accuracy on the test set.
Long Text Support
Supports a maximum sequence length of 8192 tokens.
Multilingual Capability
Based on a multilingual foundation model, supporting sentence similarity calculation in multiple languages.
Efficient Training
Optimized using triplet loss function to effectively distinguish between positive and negative samples.
Model Capabilities
Calculate Sentence Similarity
Semantic Search
Paraphrase Mining
Text Classification
Text Clustering
Use Cases
Medical Information Retrieval
Hospital Service Query
Helps users find information about medical services provided by specific hospitals.
Accurately matches similar but differently phrased medical queries.
Symptom Matching
Matches patient symptom descriptions with professional descriptions in medical knowledge bases.
Improves the accuracy of medical information retrieval.
Customer Service
FAQ Matching
Matches customer questions with frequently asked questions in knowledge bases.
Improves the accuracy of automated Q&A systems.
🚀 SentenceTransformer based on BookingCare/gte-multilingual-base-v2.1
This is a sentence-transformers model finetuned from BookingCare/gte-multilingual-base-v2.1 on the train and test datasets. 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.
✨ Features
- Maps sentences and paragraphs to a 768 - dimensional dense vector space.
- Applicable for various NLP tasks such as semantic textual similarity, semantic search, etc.
📦 Installation
First install the Sentence Transformers library:
pip install -U sentence-transformers
💻 Usage Examples
Basic Usage
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("BookingCare/gte-multilingual-base-v2.1-similarity")
# Run inference
sentences = [
'Tôi muốn tìm hiểu về dịch vụ khám chữa bệnh tại phòng khám đa khoa Cầu Giấy.',
'Cho tôi biết thông tin về phòng khám đa khoa Cầu Giấy, cụ thể là dịch vụ khám chữa bệnh.',
'Những dịch vụ y tế nào được cung cấp tại bệnh viện Đa khoa Hà Nộ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]
📚 Documentation
Model Details
Model Description
Property | Details |
---|---|
Model Type | Sentence Transformer |
Base model | BookingCare/gte-multilingual-base-v2.1 |
Maximum Sequence Length | 8192 tokens |
Output Dimensionality | 768 dimensions |
Similarity Function | Cosine Similarity |
Training Datasets | train, test |
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: NewModel
(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): Normalize()
)
🔧 Technical Details
Evaluation
Metrics
Triplet
- Evaluated with
TripletEvaluator
Metric | Value |
---|---|
cosine_accuracy | 0.969 |
Training Details
Training Datasets
train
- Dataset: train at 54473e6
- Size: 46,571 training samples
- Columns:
query
,answer
, andnegative
- Approximate statistics based on the first 1000 samples:
query answer negative type string string string details - min: 3 tokens
- mean: 19.92 tokens
- max: 72 tokens
- min: 9 tokens
- mean: 21.43 tokens
- max: 75 tokens
- min: 9 tokens
- mean: 20.46 tokens
- max: 58 tokens
- Samples:
query answer negative Các bác sĩ đã đề nghị phẫu thuật để điều trị bệnh nhân bị ung thư gan giai đoạn cuối.
Bệnh nhân bị ung thư gan giai đoạn cuối đã được bác sĩ đề nghị phẫu thuật.
Bệnh nhân được chẩn đoán mắc bệnh ung thư giai đoạn cuối, và cơ hội phục hồi là rất thấp.
Cơn đau đầu của tôi bắt đầu vào sáng nay và đã trở nên tồi tệ hơn trong suốt cả ngày.
Tôi đã phải chịu đựng cơn đau đầu dữ dội suốt cả ngày, bắt đầu từ sáng sớm.
Tôi bị đau đầu nghiêm trọng, nên làm gì?
Mẹ tôi phải nhập viện vì bệnh tim.
Mẹ tôi bị bệnh tim và phải nhập viện để điều trị.
Bệnh nhân đã được chẩn đoán mắc bệnh tim trước đây.
- Loss:
TripletLoss
with these parameters:{ "distance_metric": "TripletDistanceMetric.EUCLIDEAN", "triplet_margin": 5 }
test
- Dataset: test at 54473e6
- Size: 46,571 training samples
- Columns:
query
,answer
, andnegative
- Approximate statistics based on the first 1000 samples:
query answer negative type string string string details - min: 3 tokens
- mean: 20.12 tokens
- max: 62 tokens
- min: 9 tokens
- mean: 21.51 tokens
- max: 54 tokens
- min: 9 tokens
- mean: 20.19 tokens
- max: 56 tokens
- Samples:
query answer negative Tôi cần tìm hiểu về bệnh u nang buồng trứng, triệu chứng, phương pháp điều trị và những lưu ý
Cho tôi biết thông tin về bệnh u nang buồng trứng, bao gồm các triệu chứng, cách điều trị và những điểm cần chú ý
Cho tôi thông tin về bệnh ung thư vú
Tôi muốn tìm hiểu về các loại thuốc trị bệnh dạ dày
Cho tôi biết thông tin về thuốc điều trị bệnh dạ dày
Làm ơn cho tôi biết về các loại thuốc điều trị bệnh tiểu đường
Viêm khớp tâm bình có thể bị thu hồi hoàn toàn không?
Liệu viêm khớp tâm bình có thể khỏi hẳn hay không?
Viêm khớp dạng thấp có khả năng chữa khỏi hoàn toàn hay không?
- Loss:
TripletLoss
with these parameters:{ "distance_metric": "TripletDistanceMetric.EUCLIDEAN", "triplet_margin": 5 }
Evaluation Dataset
sts-hard-negatives
- Dataset: sts-hard-negatives at 54473e6
- Size: 46,571 evaluation samples
- Columns:
query
,answer
, andnegative
- Approximate statistics based on the first 1000 samples:
query answer negative type string string string details - min: 3 tokens
- mean: 20.12 tokens
- max: 62 tokens
- min: 9 tokens
- mean: 21.51 tokens
- max: 54 tokens
- min: 9 tokens
- mean: 20.19 tokens
- max: 56 tokens
- Samples:
query answer negative Tôi cần tìm hiểu về bệnh u nang buồng trứng, triệu chứng, phương pháp điều trị và những lưu ý
Cho tôi biết thông tin về bệnh u nang buồng trứng, bao gồm các triệu chứng, cách điều trị và những điểm cần chú ý
Cho tôi thông tin về bệnh ung thư vú
Tôi muốn tìm hiểu về các loại thuốc trị bệnh dạ dày
Cho tôi biết thông tin về thuốc điều trị bệnh dạ dày
Làm ơn cho tôi biết về các loại thuốc điều trị bệnh tiểu đường
Viêm khớp tâm bình có thể bị thu hồi hoàn toàn không?
Liệu viêm khớp tâm bình có thể khỏi hẳn hay không?
Viêm khớp dạng thấp có khả năng chữa khỏi hoàn toàn hay không?
- Loss:
TripletLoss
with these parameters:{ "distance_metric": "TripletDistanceMetric.EUCLIDEAN", "triplet_margin": 5 }
Training Hyperparameters
Non - Default Hyperparameters
eval_strategy
: stepsper_device_train_batch_size
: 16per_device_eval_batch_size
: 16num_train_epochs
: 4warmup_ratio
: 0.1fp16
: True
All Hyperparameters
Click to expand
overwrite_output_dir
: Falsedo_predict
: Falseeval_strategy
: stepsprediction_loss_only
: Trueper_device_train_batch_size
: 16per_device_eval_batch_size
: 16per_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
: 1.0num_train_epochs
: 4max_steps
: -1lr_scheduler_type
: linearlr_scheduler_kwargs
: {}warmup_ratio
: 0.1warmup_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
: Falseuse_ipex
: Falsebf16
: Falsefp16
: Truefp16_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}deepspeed
: Nonelabel_smoothing_factor
: 0.0optim
: adamw_torchoptim_args
: Noneadafactor
: Falsegroup_by_length
: Falselength_column_name
: lengthddp_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
: Falsegradient_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
: Nonedispatch_batches
: Nonesplit_batches
: Noneinclude_tokens_per_second
: Falseinclude_num_input_tokens_seen
: Falseneftune_noise_alpha
: Noneoptim_target_modules
: Nonebatch_eval_metrics
: Falseeval_on_start
: Falseuse_liger_kernel
: Falseeval_use_gather_object
: Falseaverage_tokens_across_devices
: Falseprompts
: Nonebatch_sampler
: batch_samplermulti_dataset_batch_sampler
: proportional
Jina Embeddings V3
Jina Embeddings V3 is a multilingual sentence embedding model supporting over 100 languages, specializing in sentence similarity and feature extraction tasks.
Text Embedding
Transformers Supports Multiple Languages

J
jinaai
3.7M
911
Ms Marco MiniLM L6 V2
Apache-2.0
A cross-encoder model trained on the MS Marco passage ranking task for query-passage relevance scoring in information retrieval
Text Embedding English
M
cross-encoder
2.5M
86
Opensearch Neural Sparse Encoding Doc V2 Distill
Apache-2.0
A sparse retrieval model based on distillation technology, optimized for OpenSearch, supporting inference-free document encoding with improved search relevance and efficiency over V1
Text Embedding
Transformers English

O
opensearch-project
1.8M
7
Sapbert From PubMedBERT Fulltext
Apache-2.0
A biomedical entity representation model based on PubMedBERT, optimized for semantic relation capture through self-aligned pre-training
Text Embedding English
S
cambridgeltl
1.7M
49
Gte Large
MIT
GTE-Large is a powerful sentence transformer model focused on sentence similarity and text embedding tasks, excelling in multiple benchmark tests.
Text Embedding English
G
thenlper
1.5M
278
Gte Base En V1.5
Apache-2.0
GTE-base-en-v1.5 is an English sentence transformer model focused on sentence similarity tasks, excelling in multiple text embedding benchmarks.
Text Embedding
Transformers Supports Multiple Languages

G
Alibaba-NLP
1.5M
63
Gte Multilingual Base
Apache-2.0
GTE Multilingual Base is a multilingual sentence embedding model supporting over 50 languages, suitable for tasks like sentence similarity calculation.
Text Embedding
Transformers Supports Multiple Languages

G
Alibaba-NLP
1.2M
246
Polybert
polyBERT is a chemical language model designed to achieve fully machine-driven ultrafast polymer informatics. It maps PSMILES strings into 600-dimensional dense fingerprints to numerically represent polymer chemical structures.
Text Embedding
Transformers

P
kuelumbus
1.0M
5
Bert Base Turkish Cased Mean Nli Stsb Tr
Apache-2.0
A sentence embedding model based on Turkish BERT, optimized for semantic similarity tasks
Text Embedding
Transformers Other

B
emrecan
1.0M
40
GIST Small Embedding V0
MIT
A text embedding model fine-tuned based on BAAI/bge-small-en-v1.5, trained with the MEDI dataset and MTEB classification task datasets, optimized for query encoding in retrieval tasks.
Text Embedding
Safetensors English
G
avsolatorio
945.68k
29
Featured Recommended AI Models