SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
This is a sentence-transformers model finetuned from sentence-transformers/all-MiniLM-L6-v2. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for retrieval.
Model Details
Model Description
- Model Type: Sentence Transformer
- Base model: sentence-transformers/all-MiniLM-L6-v2
- Maximum Sequence Length: 256 tokens
- Output Dimensionality: 384 dimensions
- Similarity Function: Cosine Similarity
- Supported Modality: Text
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'BertModel'})
(1): Pooling({'embedding_dimension': 384, 'pooling_mode': 'mean', '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("nishp24/legalmind-embedder")
# Run inference
sentences = [
'How does the requirement to implement a system preventing closure of the secondary air control slots beyond the 7mm open position, as specified in the legislation, align with the principles of interpretation outlined in the court judgment, specifically in relation to the reasoning behind European Court rulings?',
'down by any relevant decision of the European Court. I am cautious about accepting Mr. Lawson\'s dichotomy between the rulings of the European Court and its reasoning. It is true that the formal rulings are set out at the end of the judgments and to that extent stand apart from the Court\'s reasons, but the reasoning is in most cases essential to an understanding of the principles which the ruling seeks to encapsulate. In the cases to which I have referred the Court has held that the loss of time inherent in flight delay constitutes an inconvenience that cannot be categorised as "damage occasioned by delay" within the meaning of article 19 and does not come within the scope of article 29 (or, therefore, article 35): Nelson, paragraph 55. It has also held that the obligation to pay compensation for delay under Regulation 261 operates at an earlier stage than the system laid down in article 29: Nelson, paragraph 57. The Court\'s decision in Moré is, of course, consistent with that analysis. Moreover, in the light of the competing arguments in that case it cannot have contemplated that national courts would resort to the Convention in preference to the domestic law of limitation. In my view, therefore, we are bound to follow and apply the decisions of the European Court in relation to the nature of the claim for compensation under article 7 and its compatibility with the Montreal Convention. That includes the Court\'s ruling that the obligation in question lies outside the scope of the Convention. If that be correct, the Convention has no application to it. Insofar as it is said that that involves a departure from Sidhu, it is no more than a consequence of the decisions in IATA, Sturgeon, Nelson and Moré. The European Court has ruled on the nature of the obligations created by Regulation 261 and its decisions have to be taken into account when deciding whether the claim falls within the scope of the Convention. In those circumstances I do not think it is helpful to embark on a discussion of the doctrine of precedent as it applies in the context of conflicting decisions of the House of Lords or Supreme Court and the European Court of Human Rights, to which we were referred. Apart from anything else, the statutory provisions are too dissimilar for the authorities to provide much assistance. I acknowledge a system that prevents closure of the secondary air control slots beyond the 7mm open position must be implemented. Wood logs Fireline FPi5T, FGi5T, FXi5T Taper inset stoves manufactured by Charlton & Jenrick Ltd, Unit D Stafford Park 2, Telford, Shropshire. TF3 3AR Instruction manual reference “FXiT.FPiT.FGiT Issue 01” dated 03/12. The fitting of a system that prevents closure of the secondary air control slots beyond the 5mm open position must be implemented Wood logs Fireline FPi5W, FGi5W, FXi5W Wide inset stoves manufactured by Charlton & Jenrick Ltd, Unit D Stafford Park 2, Telford, Shropshire. TF3 3AR Instruction manual reference “FGi.FPi.FXi Issue 06” dated 03/12. The fitting of a system that prevents closure of the secondary air control slots beyond the 9mm open position must be implemented Wood logs Firematic 25, 50, 90 and 150 manufactured by HERZ Armaturen Ges.m.b.H, Geschäftsbereich HERZ, Feuerungstechnik, A-8272 Sebersdorf 138, Austria The manufacturer’s instructions dated June 2005, reference Bedienungsanleitung Firematic V 1.1 ENG doc Chipped wood, wood pellets or planed wood shavings Firematic 45 and 60 manufactured by HERZ Armaturen Ges.m.b.H, Geschäftsbereich HERZ Feuerungstechnik, A-8272 Sebersdorf 138, Austria Instruction manual references “05.007 .Operating instructions - FM (1Ph) 20 35 45 60 v2.3” dated “08/2009” Wood pellets conforming to ÖNORM M7135 with diameter of 6 mm or Wood chips up to a maximum size of 50mm and maximum water content 35% Firematic FM 130, FM 151, FM180, FM199 boilers manufactured by Herz Energietechnik GmbH, Herzstraße, 1, 7423 Pinkafeld, Österreich/Austria Instruction manual reference “Operating Instructions Herz firematic 130 – 199 BioControl” version Betriebsanleitung firematic 20-201 BioControl Englisch V 3.1 Wood Chips and Wood Pellets Firestorm 10 SE stove manufactured by The Heat Resistant Glass Company Limited, Unit 2 Bracewell Avenue, Poulton Industrial Estate, Poulton Le Fylde. FY6 8JF Instruction manual reference “10 KW SE Issue (6928)',
'you want the court to consider allowing you to pay the arrears by instalments?" On 10 January 2011 there was an application by the solicitors for Ms Sawyer to transfer the Barons Finance proceedings in the Bromley County Court to the Medway County Court. That application was put forward on the footing that Ms Sawyer should be allowed to repay the principal sum after the charges were removed, less the total payments already made. The claim in the application was that the credit agreements failed to comply with the rules under the 1974 Act and the associated regulations and that Ms Sawyer intended to apply to the court for an order that the agreements were invalid as there was a unfair relationship between the parties under section 140A of the 1974 Act. I use the expression "agreements" because there appears to have been an earlier Credit Agreement of 20 February 2007. On 28 January 2011 a review hearing took place before District Judge Liston in the Medway County Court and the two proceedings were consolidated and directions were given for trial. It is not wholly clear to me why this form of order was made when the possession orders had already been made and the next step was an appeal. Be that as it may, on 7 February 2011, a defence and counterclaim was pleaded in the now consolidated actions. That pleading alleged that neither Ghana Commercial Bunks nor Barons Finance were the holders of a credit licence under section 21 of the 1974 Act and that the agreements were unenforceable since no order had been obtained under section 40 of the Act. The pleading also alleged that Barons Finance was an unlicensed credit broker and that the agreements failed to comply with the regulations and had been improperly executed. The defence denied that the claimants were entitled to any relief. There was a counterclaim which contained the contentions that the agreements were unenforceable without a court order under section 5 and that the court should not make one, and that the relationship arising out of the agreements was an unfair one. The counterclaim sought an order for the agreements to be set aside and for the defendant to repay the principal, less what had already been paid. On 16 February 2011 the claimants gave notice of appeal from the order of District Judge Liston. On 18 May 2011, HHJ',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.3817, 0.1037],
# [0.3817, 1.0000, 0.0274],
# [0.1037, 0.0274, 1.0000]])
Training Details
Training Dataset
Unnamed Dataset
- Size: 1,933 training samples
- Columns: sentence_0 and sentence_1
- Approximate statistics based on the first 100 samples:
sentence_0 sentence_1 type string string modality text text details min: 13 tokensmean: 32.27 tokensmax: 79 tokens min: 256 tokensmean: 256.0 tokensmax: 256 tokens - Samples:
sentence_0 sentence_1 What standard of proof must be applied when establishing any fact in relation to the exercise of powers or functions under the regulations mentioned in section 51A(1) of the Act? and d the SEN expert. Exclusions: standard of proof 28 Where it falls to — a the principal, in exercise of the power conferred by section 51A(1) of the Act (as modified); b the proprietor, in exercise of its functions for the purposes of regulations 24 and 26; or c the review panel, in exercise of its functions for the purposes of regulation 25, to establish any fact, any question as to whether that fact is established is to be decided on a balance of probabilities. Information 29 The local authority must, on request, forward to the Secretary of State any information they have received from a principal, a proprietor or a review panel under this Part or Schedule 1. Nick Gibb Minister of State for Schools Department for Education 3rd April 2012 SCHEDULE 1 Constitution and procedure of review panels Regulation 3 Interpretation 1 1 In this Schedule — “arrangements for a review” means arrangements under paragraph (1) of regulation 7, 16 or 25; “arranging authority” means — where the relevan... What is the list of schools in this section of the legislation, and what type of organisations are they? Day Schools Advisory Board Akiva School, London N3 2SY Clore Shalom Primary School, Shenley WD7 9BL Clore Tikvah Primary School, Ilford IG6 2JN Jewish Community Secondary School, New Barnet EN4 9GE The Lubavitch Foundation Lubavitch Ruth Lunzer Girls Primary School, London N16 5RP Machzikei Hadass Synagogue, Manchester Beis Yaakov High School, Salford M7 4FF Yesoiday Hatorah School, Manchester M25 OJW The Union of Orthodox Hebrew Congregations Avigdor Hirsch Torah Temimah Primary School, London NW2 6RJ Menorah Foundation School, Edgware HA8 0QS Pardes House Primary School, London N3 1SA Yesodey Hatorah Senior Girls School, London N16 6UB Va’ad HaChinuch, London Beis Yaakov Primary School, London NW9 6NQ Va’ad HaChinuch, Manchester Broughton Jewish Cassel Fox Primary School, Salford M7 4RT Bury and Whitefield Jewish Primary School, Bury BL9 8JT The Dean of Gateshead Talmudical College Manchester Mesivta School, Prestwich M25 0PH What is the specified amount for a charity that runs charitable activities in one or more community buildings in a tax year? unless, at that time, the purposes and activities of the charities are the same or substantially similar. 8 The Treasury may by order amend this Act so as to change the circumstances in which a charity is connected with another charity in a tax year for the purposes of the Act. Charities running charitable activities in community buildings 6 1 This section determines the specified amount for the purposes of section 1(4) for a charity that runs charitable activities in one or more community buildings in a tax year (see sections 7 and 8 for the meaning of certain terms used in this section). 2 The specified amount for the charity for the tax year is an amount equal to — a the sum of the amounts which, for each community building in which the charitable activities are run, is the community building amount, plus b the remaining amount. 3 The “community building amount”, in relation to a community building, means — a the sum of the small donations that are made to the charity in the communi... - Loss: MultipleNegativesRankingLoss with these parameters:
{ "scale": 20.0, "similarity_fct": "cos_sim", "gather_across_devices": false, "directions": [ "query_to_doc" ], "partition_mode": "joint", "hardness_mode": null, "hardness_strength": 0.0 }
Training Hyperparameters
Non-Default Hyperparameters
num_train_epochs: 1multi_dataset_batch_sampler: round_robin
All Hyperparameters
per_device_train_batch_size: 8num_train_epochs: 1max_steps: -1learning_rate: 5e-05lr_scheduler_type: linearlr_scheduler_kwargs: Nonewarmup_steps: 0optim: adamw_torch_fusedoptim_args: Noneweight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08optim_target_modules: Nonegradient_accumulation_steps: 1average_tokens_across_devices: Truemax_grad_norm: 1label_smoothing_factor: 0.0bf16: Falsefp16: Falsebf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Nonetorch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneuse_liger_kernel: Falseliger_kernel_config: Noneuse_cache: Falseneftune_noise_alpha: Nonetorch_empty_cache_steps: Noneauto_find_batch_size: Falselog_on_each_node: Truelogging_nan_inf_filter: Trueinclude_num_input_tokens_seen: nolog_level: passivelog_level_replica: warningdisable_tqdm: Falseproject: huggingfacetrackio_space_id: Nonetrackio_bucket_id: Nonetrackio_static_space_id: Noneper_device_eval_batch_size: 8prediction_loss_only: Trueeval_on_start: Falseeval_do_concat_batches: Trueeval_use_gather_object: Falseeval_accumulation_steps: Noneinclude_for_metrics: []batch_eval_metrics: Falsesave_only_model: Falsesave_on_each_node: Falseenable_jit_checkpoint: Falsepush_to_hub: Falsehub_private_repo: Nonehub_model_id: Nonehub_strategy: every_savehub_always_push: Falsehub_revision: Noneload_best_model_at_end: Falseignore_data_skip: Falserestore_callback_states_from_checkpoint: Falsefull_determinism: Falseseed: 42data_seed: Noneuse_cpu: Falseaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}parallelism_config: Nonedataloader_drop_last: Falsedataloader_num_workers: 0dataloader_pin_memory: Truedataloader_persistent_workers: Falsedataloader_prefetch_factor: Noneremove_unused_columns: Truelabel_names: Nonetrain_sampling_strategy: randomlength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falseddp_static_graph: Noneddp_backend: Noneddp_timeout: 1800fsdp: Nonefsdp_config: Nonedeepspeed: Nonedebug: []skip_memory_metrics: Truedo_predict: Falseresume_from_checkpoint: Nonewarmup_ratio: Nonelocal_rank: -1prompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: round_robinrouter_mapping: {}learning_rate_mapping: {}
Training Time
- Training: 25.2 seconds
Framework Versions
- Python: 3.12.13
- Sentence Transformers: 5.5.1
- Transformers: 5.10.2
- PyTorch: 2.11.0+cu128
- Accelerate: 1.13.0
- Datasets: 4.0.0
- Tokenizers: 0.22.2
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{oord2019representationlearningcontrastivepredictive,
title={Representation Learning with Contrastive Predictive Coding},
author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
year={2019},
eprint={1807.03748},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/1807.03748},
}