metadata
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:3503
- loss:MultipleNegativesRankingLoss
base_model: BAAI/bge-base-en-v1.5
widget:
- source_sentence: >-
###Question###:Factorising into a Double Bracket-Factorise a quadratic
expression in the form x² + bx - c-If
\(
m^{2}+5 m-14 \equiv(m+a)(m+b)
\)
then \( a \times b= \)
###Correct Answer###:\( -14 \)
###Misconcepted Incorrect answer###:\( 5 \)
sentences:
- Does not know that units of volume are usually cubed
- >-
Believes the coefficent of x in an expanded quadratic comes from
multiplying the two numbers in the brackets
- Does not copy a given method accurately
- source_sentence: >-
###Question###:Rounding to the Nearest Whole (10, 100, etc)-Round
non-integers to the nearest 10-What is \( \mathbf{8 6 9 8 . 9} \) rounded
to the nearest ten?
###Correct Answer###:\( 8700 \)
###Misconcepted Incorrect answer###:\( 8699 \)
sentences:
- Rounds to the wrong degree of accuracy (rounds too much)
- 'Believes division is commutative '
- Believes that a number divided by itself equals 0
- source_sentence: >-
###Question###:Simultaneous Equations-Solve linear simultaneous equations
requiring a scaling of both expressions-If five cups of tea and two cups
of coffee cost \( £ 3.70 \), and two cups of tea and five cups of coffee
cost \( £ 4.00 \), what is the cost of a cup of tea and a cup of coffee?
###Correct Answer###:Tea \( =50 \mathrm{p} \) coffee \( =60 p \)
###Misconcepted Incorrect answer###:\( \begin{array}{l}\text { Tea }=0.5
\\ \text { coffee }=0.6\end{array} \)
sentences:
- Misinterprets the meaning of angles on a straight line angle fact
- Does not include units in answer.
- Believes midpoint calculation is just half of the difference
- source_sentence: >-
###Question###:Quadratic Sequences-Find the nth term rule for ascending
quadratic sequences in the form ax² + bx + c-\(
6,14,28,48,74, \ldots
\)
When calculating the nth-term rule of this sequence, what should replace
the triangle?
nth-term rule: \( 3 n^{2} \)\( \color{red}\triangle \) \(n\) \(
\color{purple}\square \)
###Correct Answer###:\( -1 \)
(or just a - sign)
###Misconcepted Incorrect answer###:\[
+1
\]
(or just a + sign)
sentences:
- >-
When finding the differences between terms in a sequence, believes they
can do so from right to left
- >-
When solving an equation forgets to eliminate the coefficient in front
of the variable in the last step
- >-
Believes parallelogram is the term used to describe two lines at right
angles
- source_sentence: >-
###Question###:Written Multiplication-Multiply 2 digit integers by 2 digit
integers using long multiplication-Which working out is correct for $72
\times 36$?
###Correct Answer###:![ Long multiplication for 72 multiplied by 36 with
correct working and correct final answer. First row of working is correct:
4 3 2. Second row of working is correct: 2 1 6 0. Final answer is correct:
2 5 9 2.]()
###Misconcepted Incorrect answer###:![ Long multiplication for 72
multiplied by 36 with incorrect working and incorrect final answer. First
row of working is incorrect: 4 2 2. Second row of working is incorrect: 2
7. Final answer is incorrect: 4 4 9.]()
sentences:
- >-
When solving an equation forgets to eliminate the coefficient in front
of the variable in the last step
- >-
Thinks a variable next to a number means addition rather than
multiplication
- >-
When two digits multiply to 10 or more during a multiplication problem,
does not add carried value to the preceding digit
pipeline_tag: sentence-similarity
library_name: sentence-transformers
SentenceTransformer based on BAAI/bge-base-en-v1.5
This is a sentence-transformers model finetuned from 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
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 768 tokens
- Similarity Function: Cosine Similarity
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': 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:
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("sentence_transformers_model_id")
# Run inference
sentences = [
'###Question###:Written Multiplication-Multiply 2 digit integers by 2 digit integers using long multiplication-Which working out is correct for $72 \\times 36$?\n###Correct Answer###:![ Long multiplication for 72 multiplied by 36 with correct working and correct final answer. First row of working is correct: 4 3 2. Second row of working is correct: 2 1 6 0. Final answer is correct: 2 5 9 2.]()\n###Misconcepted Incorrect answer###:![ Long multiplication for 72 multiplied by 36 with incorrect working and incorrect final answer. First row of working is incorrect: 4 2 2. Second row of working is incorrect: 2 7. Final answer is incorrect: 4 4 9.]()',
'When two digits multiply to 10 or more during a multiplication problem, does not add carried value to the preceding digit',
'Thinks a variable next to a number means addition rather than multiplication',
]
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
Unnamed Dataset
- Size: 3,503 training samples
- Columns:
anchor
andpositive
- Approximate statistics based on the first 1000 samples:
anchor positive type string string details - min: 60 tokens
- mean: 122.66 tokens
- max: 415 tokens
- min: 6 tokens
- mean: 14.9 tokens
- max: 39 tokens
- Samples:
- Loss:
MultipleNegativesRankingLoss
with these parameters:{ "scale": 20.0, "similarity_fct": "cos_sim" }
Training Hyperparameters
Non-Default Hyperparameters
num_train_epochs
: 10fp16
: Truepush_to_hub
: Truebatch_sampler
: no_duplicates
All Hyperparameters
Click to expand
overwrite_output_dir
: Falsedo_predict
: Falseeval_strategy
: noprediction_loss_only
: Trueper_device_train_batch_size
: 8per_device_eval_batch_size
: 8per_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
: 10max_steps
: -1lr_scheduler_type
: linearlr_scheduler_kwargs
: {}warmup_ratio
: 0.0warmup_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
: Trueresume_from_checkpoint
: Nonehub_model_id
: Nonehub_strategy
: every_savehub_private_repo
: Falsehub_always_push
: Falsegradient_checkpointing
: Falsegradient_checkpointing_kwargs
: Noneinclude_inputs_for_metrics
: Falseeval_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
: Falsebatch_sampler
: no_duplicatesmulti_dataset_batch_sampler
: proportional
Training Logs
Epoch | Step | Training Loss |
---|---|---|
1.1416 | 500 | 0.341 |
2.2831 | 1000 | 0.1082 |
3.4247 | 1500 | 0.0485 |
4.5662 | 2000 | 0.0226 |
5.7078 | 2500 | 0.0133 |
6.8493 | 3000 | 0.0066 |
7.9909 | 3500 | 0.0042 |
9.1324 | 4000 | 0.0017 |
Framework Versions
- Python: 3.10.12
- Sentence Transformers: 3.1.1
- Transformers: 4.45.2
- PyTorch: 2.5.1+cu121
- Accelerate: 1.1.1
- Datasets: 3.1.0
- Tokenizers: 0.20.3
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}
}