SentenceTransformer(
(0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 384, '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})
(2): Normalize()
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("minsuas/Misconceptions_1")
5# Run inference
6sentences = [
7 'Subject: Construct Triangle\nConstruct: Construct a triangle using Side-Side-Side\nQuestion: Tom and Katie are arguing about constructing triangles.\n\nTom says you can construct a triangle with lengths \\( 11 \\mathrm{~cm}, 10 \\mathrm{~cm} \\) and \\( 2 \\mathrm{~cm} \\).\n\nKatie says you can construct a triangle with lengths \\( 8 \\mathrm{~cm}, 5 \\mathrm{~cm} \\) and \\( 3 \\mathrm{~cm} \\).\n\nWho is correct?\nIncorrect Answer: Neither is correct',
8 'Does not realise that the sum of the two shorter sides must be greater than the third side for it to be a possible triangle\nThe passage is discussing a common misconception about the properties required to form a triangle. The misconception is that one might think any three given side lengths can form a triangle. However, for three lengths to actually form a triangle, they must satisfy the triangle inequality theorem. This theorem states that the sum of the lengths of any two sides of a triangle must be greater than the length of the remaining side. This rule must hold true for all three combinations of added side lengths. \n\nTo apply this to the misconception: one does not realize that the sum of the lengths of the two shorter sides must be greater than the length of the longest side to form a possible triangle. This ensures that the sides can actually meet to form a closed figure with three angles.',
9 'Draws both angles at the same end of the line when constructing a triangle\nThe misconception described refers to a common error in geometry when students are constructing a triangle based on given angles and a line segment. The mistake is to draw both given angles at the same end of the given line segment. This is incorrect because in a triangle, each angle is located at a different vertex, and each vertex connects two sides. To correctly construct the triangle, each given angle should be drawn at different ends of the line segment (if constructing based on one line segment and two angles) or at vertices defined by the construction steps (if additional sides are given). This ensures that the three angles are positioned to form the corners of the triangle, with each angle at a distinct vertex, thereby creating a proper triangle.',
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13# [3, 384]
14
15# Get the similarity scores for the embeddings
16similarities = model.similarity(embeddings, embeddings)
17print(similarities.shape)
18# [3, 3]anchor, positive, and negative| anchor | positive | negative | |
|---|---|---|---|
| type | string | string | string |
| details |
|
|
|
| anchor | positive | negative |
|---|---|---|
Subject: Cubics and Reciprocals[object Object]Construct: Given a positive x value, find the corresponding y value for reciprocal graphs[object Object]Question: This is a part of the table of values for the equation ( y=\frac{3}{x} ) \begin{tabular}{ | l | l |
Subject: Angle Facts with Parallel Lines[object Object]Construct: Identify a transversal[object Object]Question: What is the name given to the red line that intersects the two dashed lines? [object Object][object Object]Incorrect Answer: Parallel | Does not know the meaning of the word parallel[object Object]The passage is indicating a misconception related to a math problem, specifically one that involves the concept of "parallel." In mathematics, particularly in geometry, "parallel" refers to lines or planes that are equidistant from each other at every point and never intersect, no matter how far they are extended. A misunderstanding or lack of knowledge about this definition can lead to errors when solving problems that involve parallel lines or planes, such as determining angles or distances. Thus, to correctly interpret and solve problems involving parallel lines or planes, one must understand that they maintain a constant distance from each other and never meet. | Does not know the term transversal[object Object]The passage is indicating a common pitfall in geometry where a student may not be familiar with the term "transversal." A transversal is a line that passes through two or more other lines, often creating several angles with them. When discussing parallel lines and the angles formed when a transversal intersects them, understanding the term and its implications is crucial. The misconception here is likely that without knowing what a transversal is, a student might struggle to identify the relationships between the angles formed (such as alternate interior angles, corresponding angles, etc.), which are fundamental concepts in solving geometry problems involving parallel lines. |
Subject: Sharing in a Ratio[object Object]Construct: Divide a quantity into two parts for a given a ratio, where each part is an integer[object Object]Question: Share ( £360 ) in the ratio ( 2: 7 )[object Object]Incorrect Answer: ( £ 180: £ 51 ) | Divides total amount by each side of the ratio instead of dividing by the sum of the parts[object Object]The misconception described refers to a mistake made when dividing a total amount according to a given ratio. For instance, if someone has to divide $100 in the ratio 2:3, a correct approach would be to first add the parts of the ratio (2+3=5) to find the total number of parts. Then, divide the total amount by this sum ($100 ÷ 5 = $20) to determine the value of one part. This $20 can then be multiplied by each number in the ratio (2 and 3) to correctly distribute the $100.[object Object][object Object]The misconception occurs when someone divides the total amount ($100) by each individual number in the ratio (2 and 3) rather than by the sum of the parts (5). This method would incorrectly distribute the $100, as it does not account for the proportional relationship that the ratio is meant to establish. | Estimates shares of a ratio instead of calculating[object Object]The passage is discussing a common mistake made in mathematics, particularly when dealing with ratio problems. The misconception lies in estimating the shares or parts of a ratio rather than calculating them accurately. For example, if a problem involves dividing a quantity in the ratio of 2:3, the misconception would be to guess or estimate what parts of the quantity correspond to 2 and 3, instead of using the correct method to find the exact shares. The correct approach involves first adding the parts of the ratio (in this case, 2 + 3 = 5) and then using this sum to calculate each part's exact share of the total quantity. Thus, it's important to calculate each part of the ratio precisely rather than estimating. |
CachedMultipleNegativesRankingLoss with these parameters:
1{
2 "scale": 20.0,
3 "similarity_fct": "cos_sim"
4}per_device_train_batch_size: 512num_train_epochs: 1lr_scheduler_type: cosinewarmup_ratio: 0.1fp16: Trueoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: noprediction_loss_only: Trueper_device_train_batch_size: 512per_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: 1max_steps: -1lr_scheduler_type: cosinelr_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: proportional1@inproceedings{reimers-2019-sentence-bert,
2 title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
3 author = "Reimers, Nils and Gurevych, Iryna",
4 booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
5 month = "11",
6 year = "2019",
7 publisher = "Association for Computational Linguistics",
8 url = "https://arxiv.org/abs/1908.10084",
9}1@misc{gao2021scaling,
2 title={Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup},
3 author={Luyu Gao and Yunyi Zhang and Jiawei Han and Jamie Callan},
4 year={2021},
5 eprint={2101.06983},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG}
8}