bge-base-en-v1.5-ft / README.md
aritrasen's picture
Add new SentenceTransformer model.
e84ed2e verified
---
base_model: BAAI/bge-base-en-v1.5
datasets: []
language: []
library_name: sentence-transformers
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:21
- loss:MultipleNegativesRankingLoss
widget:
- source_sentence: '| Config | Model |
Epochs | Max seq length | Micro batch size | Machine | Training runtime | Cost
| Peak memory | Validation loss | Validation perplexity | Multitask score (MMLU)
|
| --------------------------------- | ---------------------- | ------ | --------------
| ---------------- | ------- | ---------------- | ---- | ----------- | ---------------
| --------------------- | --------------- |
| falcon-7b/lora.yaml | falcon-7b | 4 | 512 |
1 | 1xA10G | 24.84 min | $0.7 | 16.69 GB | 0.945 |
2.573 | 26.2% |
| falcon-7b/lora.yaml | falcon-7b | 4 | 512 |
1 | 4xA10G | 24.94 min | $2.0 | 16.69 GB | 0.945 |
2.573 | 26.4% |
| falcon-7b/qlora.yaml | falcon-7b | 4 | 512 |
1 | 1xA10G | 50.85 min | $1.5 | 9.44 GB | 0.993 |
2.699 | 26.3% |
| falcon-7b/qlora.yaml | falcon-7b | 4 | 512 |
1 | 4xA10G | 50.88 min | $4.1 | 9.44 GB | 0.993 |
2.699 | 26.3% |
| | | | | | | | | | | | |
| gemma-2b/full.yaml | gemma-2b | 1 | 512 |
1 | 4xA10G | 14.06 min | $1.1 | 17.43 GB | 1.021 |
2.777 | 32.4% |
| gemma-2b/lora.yaml | gemma-2b | 2 | 512 |
2 | 1xA10G | 9.41 min | $0.3 | 12.62 GB | 0.981 |
2.666 | 34.4% |'
sentences:
- 'What is the command to download the pretrained model weights for the Llama-2-7b-hf
model?
'
- 'What is the version of nvfuser\_cu121 used?
'
- 'What is the training runtime for the gemma-2b model with the lora configuration?
'
- source_sentence: "# Serve and Deploy LLMs\n\nThis document shows how you can serve\
\ a LitGPT for deployment. \n\n \n## Serve an LLM\n\nThis section illustrates\
\ how we can set up an inference server for a phi-2 LLM using `litgpt serve` that\
\ is minimal and highly scalable.\n\n\n \n## Step 1: Start the inference\
\ server\n\n\n```bash\n# 1) Download a pretrained model (alternatively, use your\
\ own finetuned model)\nlitgpt download --repo_id microsoft/phi-2\n\n# 2) Start\
\ the server\nlitgpt serve --checkpoint_dir checkpoints/microsoft/phi-2\n```\n\
\n> [!TIP]\n> Use `litgpt serve --help` to display additional options, including\
\ the port, devices, LLM temperature setting, and more.\n\n\n \n## Step 2:\
\ Query the inference server\n\nYou can now send requests to the inference server\
\ you started in step 2. For example, in a new Python session, we can send requests\
\ to the inference server as follows:\n\n\n```python\nimport requests, json\n\n\
response = requests.post(\n \"http://127.0.0.1:8000/predict\", \n json={\"\
prompt\": \"Fix typos in the following sentence: Exampel input\"}\n)\n\nprint(response.json()[\"\
output\"])\n```\n\nExecuting the code above prints the following output:\n\n```\n\
Instruct: Fix typos in the following sentence: Exampel input\nOutput: Example\
\ input.\n```"
sentences:
- 'What command do I use to convert the finetuned model to a HF transformer model?
'
- 'How do you merge LoRA weights into the original model''s checkpoint?
'
- 'How can I start an inference server for a phi-2 LLM using litgpt serve?
'
---
# SentenceTransformer based on BAAI/bge-base-en-v1.5
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5). 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:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
- **Maximum Sequence Length:** 512 tokens
- **Output Dimensionality:** 768 tokens
- **Similarity Function:** Cosine Similarity
<!-- - **Training Dataset:** Unknown -->
<!-- - **Language:** Unknown -->
<!-- - **License:** Unknown -->
### 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': True}) with Transformer model: BertModel
(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()
)
```
## 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("aritrasen/bge-base-en-v1.5-ft")
# Run inference
sentences = [
'# Serve and Deploy LLMs\n\nThis document shows how you can serve a LitGPT for deployment. \n\n&nbsp;\n## Serve an LLM\n\nThis section illustrates how we can set up an inference server for a phi-2 LLM using `litgpt serve` that is minimal and highly scalable.\n\n\n&nbsp;\n## Step 1: Start the inference server\n\n\n```bash\n# 1) Download a pretrained model (alternatively, use your own finetuned model)\nlitgpt download --repo_id microsoft/phi-2\n\n# 2) Start the server\nlitgpt serve --checkpoint_dir checkpoints/microsoft/phi-2\n```\n\n> [!TIP]\n> Use `litgpt serve --help` to display additional options, including the port, devices, LLM temperature setting, and more.\n\n\n&nbsp;\n## Step 2: Query the inference server\n\nYou can now send requests to the inference server you started in step 2. For example, in a new Python session, we can send requests to the inference server as follows:\n\n\n```python\nimport requests, json\n\nresponse = requests.post(\n "http://127.0.0.1:8000/predict", \n json={"prompt": "Fix typos in the following sentence: Exampel input"}\n)\n\nprint(response.json()["output"])\n```\n\nExecuting the code above prints the following output:\n\n```\nInstruct: Fix typos in the following sentence: Exampel input\nOutput: Example input.\n```',
'How can I start an inference server for a phi-2 LLM using litgpt serve?\n',
'What command do I use to convert the finetuned model to a HF transformer model?\n',
]
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]
```
<!--
### Direct Usage (Transformers)
<details><summary>Click to see the direct usage in Transformers</summary>
</details>
-->
<!--
### Downstream Usage (Sentence Transformers)
You can finetune this model on your own dataset.
<details><summary>Click to expand</summary>
</details>
-->
<!--
### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->
<!--
## Bias, Risks and Limitations
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
-->
<!--
### Recommendations
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
-->
## Training Details
### Training Dataset
#### Unnamed Dataset
* Size: 21 training samples
* Columns: <code>anchor</code> and <code>positive</code>
* Approximate statistics based on the first 1000 samples:
| | anchor | positive |
|:--------|:-------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
| type | string | string |
| details | <ul><li>min: 51 tokens</li><li>mean: 424.62 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 12 tokens</li><li>mean: 17.19 tokens</li><li>max: 26 tokens</li></ul> |
* Samples:
| anchor | positive |
|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
| <code>| 7 B | Llama 2 | bnb.nf4 | 1 | 4,194,304 | 14.14 GB | 3.68 min |<br>| 7 B | Llama 2 | bnb.nf4-dq | 1 | 4,194,304 | 13.84 GB | 3.83 min |<br>| 7 B | Llama 2 | None | 2 | 4,194,304 | 29.07 GB | 2.52 min |<br>| 7 B | Llama 2 | None | 4 | 4,194,304 | OOM | - |<br>| | | | | | | |<br>| 13 B | Llama 2 | None | 1 | 6,553,600 | 38.12 GB | 3.19 min |<br>| 13 B | Llama 2 | bnb.nf4 | 1 | 6,553,600 | 23.14 GB | 6.38 min |<br>| 13 B | Llama 2 | bnb.nf4-dq | 1 | 6,553,600 | 22.55 GB | 6.55 min |<br>| 13 B | Llama 2 | None | 2 | 6,553,600 | OOM | - |<br>| 13 B | Llama 2 | None | 4 | 6,553,600 | OOM | - |<br>| | | | | | | |<br>| 40 B | Falcon | None | 1 | 12,042,240 | OOM | - |<br>| 40 B | Falcon | bnb.nf4 | 1 | 12,042,240 | OOM | - |<br>| 40 B | Falcon | bnb.nf4-dq | 1 | 12,042,240 | OOM | - |</code> | <code>What is the memory usage of Llama 2 with 7B when using bnb.nf4-dq?<br></code> |
| <code>1. Follow the instructions above to load the model into a Hugging Face transformers model.<br><br>2. Create a `model.safetensor` file:<br><br>```python<br>model.save_pretrained("out/hf-tinyllama/converted/")<br>```<br><br>3. Copy the tokenizer files into the model-containing directory:<br><br>```bash<br>cp checkpoints/$repo_id/tokenizer* out/hf-tinyllama/converted<br>```<br><br>4. Run the evaluation harness, for example:<br><br>```bash<br>lm_eval --model hf \<br> --model_args pretrained=out/hf-tinyllama/converted \<br> --tasks "hellaswag,gsm8k,truthfulqa_mc2,mmlu,winogrande,arc_challenge" \<br> --device "cuda:0" \<br> --batch_size 4<br>```</code> | <code>What is the command to run the evaluation harness?<br></code> |
| <code>The LM Evaluation Harness requires a tokenizer to be present in the model checkpoint folder, which we can copy from the original download checkpoint:<br><br>```bash<br># Copy the tokenizer needed by the Eval Harness<br>cp checkpoints/microsoft/phi-2/tokenizer*<br>out/converted_model<br>```<br><br>Then, we can run the Evaluation Harness as follows:<br><br>```bash<br>lm_eval --model hf \<br> --model_args pretrained="out/converted_model" \<br> --tasks "hellaswag,gsm8k,truthfulqa_mc2,mmlu,winogrande,arc_challenge" \<br> --device "cuda:0" \<br> --batch_size 4<br>```<br><br>&nbsp;<br><br>> [!TIP]<br>> The Evaluation Harness tasks above are those used in Open LLM Leaderboard. You can find a list all supported tasks [here](https://github.com/EleutherAI/lm-evaluation-harness/blob/master/docs/task_table.md).<br><br><br><br>&nbsp;<br>**More information and additional resources**<br><br>- [tutorials/convert_lit_models](./convert_lit_models.md): Tutorial on converting LitGPT weights<br><br><br><br>&nbsp;<br><br>## Get involved!<br><br>We appreciate your feedback and contributions. If you have feature requests, questions, or want to contribute code or config files, please don't hesitate to use the [GitHub Issue](https://github.com/Lightning-AI/litgpt/issues) tracker.<br><br>We welcome all individual contributors, regardless of their level of experience or hardware. Your contributions are valuable, and we are excited to see what you can accomplish in this collaborative and supportive environment.<br><br>&nbsp;<br><br>> [!TIP]<br>> Unsure about contributing? Check out our [How to Contribute to LitGPT](https://lightning.ai/pages/community/tutorial/how-to-contribute-to-litgpt/) guide.<br><br>&nbsp;<br><br>If you have general questions about building with LitGPT, please [join our Discord](https://discord.gg/VptPCZkGNa).</code> | <code>What is the command to run the Evaluation Harness?<br></code> |
* Loss: [<code>MultipleNegativesRankingLoss</code>](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: 10 evaluation samples
* Columns: <code>anchor</code> and <code>positive</code>
* Approximate statistics based on the first 1000 samples:
| | anchor | positive |
|:--------|:-------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
| type | string | string |
| details | <ul><li>min: 273 tokens</li><li>mean: 460.8 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 10 tokens</li><li>mean: 20.1 tokens</li><li>max: 34 tokens</li></ul> |
* Samples:
| anchor | positive |
|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------|
| <code>(this table was sourced from the author's [README](https://github.com/jzhang38/TinyLlama/))<br><br>&nbsp;<br>## Download datasets<br><br>You can download the data using git lfs:<br><br>```bash<br># Make sure you have git-lfs installed (https://git-lfs.com):<br>sudo apt install git-lfs<br>```<br><br>```bash<br>git clone https://huggingface.co/datasets/cerebras/slimpajama-627b data/slimpajama-raw<br>git clone https://huggingface.co/datasets/bigcode/starcoderdata data/starcoderdata-raw<br>```<br><br>Around 1.2 TB of disk space is required to store both datasets.<br><br>&nbsp;<br>## Prepare the datasets for training<br><br>In order to start pretraining litgpt on it, you need to read, tokenize, and write the data in binary chunks. This will leverage the `litdata` optimization pipeline and streaming dataset.<br><br>First, install additional dependencies for preprocessing:<br><br>```bash<br>pip install '.[all]'<br>```<br><br>You will need to have the tokenizer config available:<br><br>```bash<br>litgpt download \<br> --repo_id meta-llama/Llama-2-7b-hf \<br> --access_token your_hf_token \<br> --tokenizer_only true<br>```<br><br>Then, run the preprocessing script for each dataset and split.<br>You will require **1.1 TB** of disk space for Starcoder and **2.5** TB of space for the SlimPajama dataset.<br><br>**Starcoder:**<br><br>```bash<br>python litgpt/data/prepare_starcoder.py \<br> --input_dir data/starcoderdata-raw \<br> --output_dir data/starcoder \<br> --tokenizer_path checkpoints/meta-llama/Llama-2-7b-hf<br>```<br><br>**SlimPajama:**<br><br>```bash<br>python litgpt/data/prepare_slimpajama.py \<br> --input_dir data/slimpajama-raw/validation \<br> --output_dir data/slimpajama/val \<br> --tokenizer_path checkpoints/meta-llama/Llama-2-7b-hf<br><br>python litgpt/data/prepare_slimpajama.py \<br> --input_dir data/slimpajama-raw/test \<br> --output_dir data/slimpajama/test \<br> --tokenizer_path checkpoints/meta-llama/Llama-2-7b-hf<br><br>python litgpt/data/prepare_slimpajama.py \<br> --input_dir data/slimpajama-raw/train \<br> --output_dir data/slimpajama/train \<br> --tokenizer_path checkpoints/meta-llama/Llama-2-7b-hf<br>```</code> | <code>How much disk space is required to store the SlimPajama dataset?<br></code> |
| <code># Serve and Deploy LLMs<br><br>This document shows how you can serve a LitGPT for deployment. <br><br>&nbsp;<br>## Serve an LLM<br><br>This section illustrates how we can set up an inference server for a phi-2 LLM using `litgpt serve` that is minimal and highly scalable.<br><br><br>&nbsp;<br>## Step 1: Start the inference server<br><br><br>```bash<br># 1) Download a pretrained model (alternatively, use your own finetuned model)<br>litgpt download --repo_id microsoft/phi-2<br><br># 2) Start the server<br>litgpt serve --checkpoint_dir checkpoints/microsoft/phi-2<br>```<br><br>> [!TIP]<br>> Use `litgpt serve --help` to display additional options, including the port, devices, LLM temperature setting, and more.<br><br><br>&nbsp;<br>## Step 2: Query the inference server<br><br>You can now send requests to the inference server you started in step 2. For example, in a new Python session, we can send requests to the inference server as follows:<br><br><br>```python<br>import requests, json<br><br>response = requests.post(<br> "http://127.0.0.1:8000/predict", <br> json={"prompt": "Fix typos in the following sentence: Exampel input"}<br>)<br><br>print(response.json()["output"])<br>```<br><br>Executing the code above prints the following output:<br><br>```<br>Instruct: Fix typos in the following sentence: Exampel input<br>Output: Example input.<br>```</code> | <code>How can I start an inference server for a phi-2 LLM using litgpt serve?<br></code> |
| <code># TPU support<br><br>This project utilizes [`Fabric`](https://lightning.ai/docs/fabric/stable), which supports TPUs via [PyTorch XLA](https://github.com/pytorch/xla).<br><br>> [!NOTE]<br>> This guide assumes that you have already set-up your [Google Cloud environment](https://cloud.google.com/run/docs/setup).<br><br>To set up a Google Cloud instance with a TPU v4 VM, run the following commands:<br><br>```shell<br>gcloud compute tpus tpu-vm create litgpt --version=tpu-vm-v4-base --accelerator-type=v4-8 --zone=us-central2-b<br>gcloud compute tpus tpu-vm ssh litgpt --zone=us-central2-b<br>```<br><br>You can also choose a different TPU type. To do so, change the `version`, `accelerator-type`, and `zone` arguments. Find all regions and zones [here](https://cloud.google.com/tpu/docs/regions-zones).<br><br><details><br><summary>Multihost caveats</summary><br><br>TPU v4-8 uses a single host. SSH'ing into the machine and running commands manually will only work when using a single host (1 slice in the TPU pod).<br>In multi-host environments, such as larger TPU pod slices, it's necessary to launch all commands on all hosts simultaneously to avoid hangs.<br>For local development, it is advisable to upload a zip file containing all your current changes and execute it inside the VM from your personal computer:<br><br>```shell<br># Zip the local directory, excluding large directories from the zip. You may want to keep them.<br>zip -r local_changes.zip . -x ".git/*" "checkpoints/*" "data/*" "out/*"<br># Copy the .zip file to the TPU VM<br>gcloud compute tpus tpu-vm scp --worker=all local_changes.zip "litgpt:~"<br># Unzip on each host<br>gcloud compute tpus tpu-vm ssh litgpt --worker=all --command="cd ~; unzip -q -o local_changes.zip"<br><br># Example of a typical workflow<br>gcloud compute tpus tpu-vm ssh tmp --worker=all --command="cd ~; bash install_dependencies.sh"<br>gcloud compute tpus tpu-vm ssh tmp --worker=all --command="cd ~; bash prepare_checkpoints.sh"<br>gcloud compute tpus tpu-vm ssh tmp --worker=all --command="cd ~; bash run_desired_script.sh"</code> | <code>How does this project support TPUs?<br></code> |
* Loss: [<code>MultipleNegativesRankingLoss</code>](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
- `eval_strategy`: steps
- `per_device_train_batch_size`: 5
- `per_device_eval_batch_size`: 5
- `num_train_epochs`: 5
- `warmup_ratio`: 0.1
- `fp16`: True
- `batch_sampler`: no_duplicates
#### All Hyperparameters
<details><summary>Click to expand</summary>
- `overwrite_output_dir`: False
- `do_predict`: False
- `eval_strategy`: steps
- `prediction_loss_only`: True
- `per_device_train_batch_size`: 5
- `per_device_eval_batch_size`: 5
- `per_gpu_train_batch_size`: None
- `per_gpu_eval_batch_size`: None
- `gradient_accumulation_steps`: 1
- `eval_accumulation_steps`: None
- `learning_rate`: 5e-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`: 5
- `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`: 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`: 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`: False
- `resume_from_checkpoint`: None
- `hub_model_id`: None
- `hub_strategy`: every_save
- `hub_private_repo`: False
- `hub_always_push`: False
- `gradient_checkpointing`: False
- `gradient_checkpointing_kwargs`: None
- `include_inputs_for_metrics`: False
- `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
- `batch_sampler`: no_duplicates
- `multi_dataset_batch_sampler`: proportional
</details>
### Training Logs
| Epoch | Step | Training Loss | loss |
|:-----:|:----:|:-------------:|:------:|
| 0.4 | 2 | 0.6407 | 0.4190 |
| 0.8 | 4 | 0.7873 | 0.2789 |
| 1.2 | 6 | 0.1871 | 0.2089 |
| 1.6 | 8 | 0.2125 | 0.1718 |
| 2.0 | 10 | 0.0374 | 0.1648 |
| 2.4 | 12 | 0.1923 | 0.1695 |
| 2.8 | 14 | 0.0183 | 0.1723 |
| 3.2 | 16 | 0.1582 | 0.1770 |
| 3.6 | 18 | 0.0032 | 0.1824 |
| 4.0 | 20 | 0.0015 | 0.1870 |
| 4.4 | 22 | 0.1399 | 0.1901 |
| 4.8 | 24 | 0.002 | 0.1914 |
### Framework Versions
- Python: 3.10.12
- Sentence Transformers: 3.0.1
- Transformers: 4.41.2
- PyTorch: 2.3.0+cu121
- Accelerate: 0.27.0
- Datasets: 2.20.0
- Tokenizers: 0.19.1
## 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",
}
```
#### MultipleNegativesRankingLoss
```bibtex
@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}
}
```
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->