---
base_model: huudan123/stage1
datasets: []
language: []
library_name: sentence-transformers
metrics:
- pearson_cosine
- spearman_cosine
- pearson_manhattan
- spearman_manhattan
- pearson_euclidean
- spearman_euclidean
- pearson_dot
- spearman_dot
- pearson_max
- spearman_max
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:254546
- loss:MultipleNegativesRankingLoss
widget:
- source_sentence: em_gái grany người da trắng cô ấy muốn đi học
sentences:
- bà thường kể câu_chuyện về chị_gái bà người chồng quyết_định chuyển đến thành_phố
augusta chuyển sang màu trắng
- thêm thời_gian thông_thường thêm phát_triển kế_hoạch hành_động
- em_gái grany người da trắng
- source_sentence: hãy họ biết họ cố_gắng cản_trở_việc chèo thuyền chúng_tôi chúng_tôi
treo đầu_tiên doxy chiến_đấu nó
sentences:
- tôi biết mình hướng tới mục_đích báo_cáo một địa_chỉ ở washington
- chúng_ta cố_gắng chiến_đấu nó một_khi chúng_ta bắt_đầu_ra khơi
- cách nào biết liệu con thuyền đi thẳng
- source_sentence: louisa may alcot nathaniel hawthorne sống phố pinckney trong phố
beacon oliver wendel holmes gọi con đường đầy nắng nhà sử_học wiliam prescot
sentences:
- hawthorne sống phố pinckney trong 7 năm
- hawthorne sống phố pinckney
- dùng tất_cả hiệu_quả trong phòng_chống thói_quen xấu nó hiệu_quả trong điều_trị
nói_chung
- source_sentence: hình 6 hiển_thị chi_phí đơn_vị trung_bình tạo hàm chi_phí usps
sentences:
- chi_phí trung_bình usps thể_hiện trong hình 6
- chi_phí trung_bình usps thể_hiện trong hình 6 thấy tất_cả lợi_nhuận
- cấp đại_úy blod một khoản hoa_hồng một sai_lầm sai_lầm đấy tôi
- source_sentence: bạn tiếp_tục nhập thông_tin cơ_sở dữ_liệu
sentences:
- mặc_dù dứa hương_vị tuyệt_vời chi_phí vận_chuyển quá cao đưa chúng thị_trường
- bạn tiếp_tục bạn nhập mọi thứ
- bạn mọi thứ bạn bắt_đầu_từ
model-index:
- name: SentenceTransformer based on huudan123/stage1
results:
- task:
type: semantic-similarity
name: Semantic Similarity
dataset:
name: sts dev
type: sts-dev
metrics:
- type: pearson_cosine
value: 0.7132925999347621
name: Pearson Cosine
- type: spearman_cosine
value: 0.7139908860784119
name: Spearman Cosine
- type: pearson_manhattan
value: 0.6924068767142901
name: Pearson Manhattan
- type: spearman_manhattan
value: 0.6987187512790664
name: Spearman Manhattan
- type: pearson_euclidean
value: 0.6927853521211202
name: Pearson Euclidean
- type: spearman_euclidean
value: 0.6988256048265301
name: Spearman Euclidean
- type: pearson_dot
value: 0.6562289766339777
name: Pearson Dot
- type: spearman_dot
value: 0.6552808237632588
name: Spearman Dot
- type: pearson_max
value: 0.7132925999347621
name: Pearson Max
- type: spearman_max
value: 0.7139908860784119
name: Spearman Max
---
# SentenceTransformer based on huudan123/stage1
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [huudan123/stage1](https://huggingface.co/huudan123/stage1). 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:** [huudan123/stage1](https://huggingface.co/huudan123/stage1)
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 768 tokens
- **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: 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("huudan123/stage2")
# Run inference
sentences = [
'bạn tiếp_tục nhập thông_tin cơ_sở dữ_liệu',
'bạn mọi thứ bạn bắt_đầu_từ',
'bạn tiếp_tục bạn nhập mọi thứ',
]
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]
```
## Evaluation
### Metrics
#### Semantic Similarity
* Dataset: `sts-dev`
* Evaluated with [EmbeddingSimilarityEvaluator
](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
| Metric | Value |
|:--------------------|:----------|
| pearson_cosine | 0.7133 |
| **spearman_cosine** | **0.714** |
| pearson_manhattan | 0.6924 |
| spearman_manhattan | 0.6987 |
| pearson_euclidean | 0.6928 |
| spearman_euclidean | 0.6988 |
| pearson_dot | 0.6562 |
| spearman_dot | 0.6553 |
| pearson_max | 0.7133 |
| spearman_max | 0.714 |
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 254,546 training samples
* Columns: anchor
, positive
, and negative
* Approximate statistics based on the first 1000 samples:
| | anchor | positive | negative |
|:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | string | string | string |
| details |
conceptualy kem skiming hai kích_thước cơ_bản sản_phẩm địa_lý
| sản_phẩm địa_lý làm kem skiming làm_việc
| kem skiming hai tập_trung sản_phẩm địa_lý
|
| sản_phẩm địa_lý làm kem skiming làm_việc
| conceptualy kem skiming hai kích_thước cơ_bản sản_phẩm địa_lý
| kem skiming hai tập_trung sản_phẩm địa_lý
|
| bạn biết trong mùa giải tôi đoán ở mức_độ bạn bạn mất chúng đến mức_độ tiếp_theo họ quyết_định nhớ đội_ngũ cha_mẹ chiến_binh quyết_định gọi nhớ một người ba a một người đàn_ông đi đến thay_thế anh ta một người đàn_ông nào đi thay_thế anh ta
| recals thực_hiện thứ sáu
| anh mất mọi thứ ở mức_độ người dân nhớ
|
* Loss: [MultipleNegativesRankingLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Evaluation Dataset
#### Unnamed Dataset
* Size: 1,660 evaluation samples
* Columns: anchor
, positive
, and negative
* Approximate statistics based on the first 1000 samples:
| | anchor | positive | negative |
|:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
| type | string | string | string |
| details | anh ấy nói mẹ con về nhà
| xuống xe_buýt trường anh ấy gọi mẹ
| anh nói mẹ anh về nhà
|
| xuống xe_buýt trường anh ấy gọi mẹ
| anh ấy nói mẹ con về nhà
| anh nói mẹ anh về nhà
|
| tôi biết mình hướng tới mục_đích báo_cáo một địa_chỉ ở washington
| tôi bao_giờ đến washington tôi chỉ_định ở tôi lạc cố_gắng tìm
| tôi hoàn_toàn chắc_chắn tôi làm tôi đi đến washington tôi giao báo_cáo
|
* Loss: [MultipleNegativesRankingLoss
](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
```json
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
```
### Training Hyperparameters
#### Non-Default Hyperparameters
- `overwrite_output_dir`: True
- `eval_strategy`: epoch
- `per_device_train_batch_size`: 256
- `per_device_eval_batch_size`: 256
- `num_train_epochs`: 20
- `lr_scheduler_type`: cosine
- `warmup_ratio`: 0.05
- `fp16`: True
- `load_best_model_at_end`: True
- `gradient_checkpointing`: True
#### All Hyperparameters