Downloads · 30 days
7
5% of all-time downloads
Sayyam9/legal-bert-aila-finetuned
legal-bert-aila-finetuned is a sentence similarity model from Sayyam9. Use it when you need a score for how close two texts are. It is set up for sentence-transformers.
This is a sentence-transformers model finetuned from law-ai/InLegalBERT. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for retrieval.
Downloads · 30 days
7
5% of all-time downloads
All-time downloads
149
Public
Parameters
109M
438 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors438 MB · 100%
From the Hugging Face model README
This is a sentence-transformers model finetuned from law-ai/InLegalBERT. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for retrieval.
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': 768, 'pooling_mode': 'mean', 'include_prompt': True})
)
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("Sayyam9/legal-bert-aila-finetuned")
# Run inference
sentences = [
'Challenge in this appeal is to the judgment of a learned Single Judge of the High Court by which two Writ Petitions filed by the respondent were disposed of. The controversy lies within a very narrow compass. Before dealing with the rival contentions the factual background needs to be noted. Respondent was appointed on 3.9.1980 as a daily-rated worker in the Horticulture Department of the State. In the Writ Petition the prayer was for regularization as a clerk on completion of ten years of service on daily wages basis. It is to be noted that the union of the employees had moved the Labour Court for regularization of all daily wagers. The same was adjudicated by the Industrial Disputes Tribunal. A reference was made to the Labour Court and the State filed its response questioning maintainability of the reference. Initially the Labour Court had decided in favour of the workers but on a Writ Petition being filed, the High Court held in favour of the State holding that the claim for regularization was not maintainable. It was noted that no appointment order was issued and the case of the respondent was not sponsored by the employment exchange. It was also noted that the claim for equal work for equal pay was not maintainable as daily-rated persons were not required to perform duties at par with those in regular service and they did not also fulfil the procedure at the time of recruitment. Two Writ Petitions were filed; in one the challenge was to the order of the Industrial Disputes Tribunal while the Writ Petition to which this Appeal relates to the Award by the Labour Court. It is to be noted that the Labour Court had observed that the employer had regularized the respondent as a Chowkidar with effect from',
'Secretary, State of Karnataka and Others v Umadevi and Others Supreme Court of India 10 April 2006 Appeal (Civil) 3595-3612 of 1999 with C.A. No. 1861-2063/2001, 3849/2001, 3520-3524/2002 and C.A. No. 1968 of 2006 Arising out of S.L.P.(C) 9103-9105 of 2001 The Judgment was delivered by: P. K. Balasubramanyan, J. Leave granted in SLP(C) Nos.9103-9105 of 2001. 1. Public employment in a sovereign socialist secular democratic re public has to be as set down by Constitution and the laws made there under. Our constitutional scheme envisages employment by the Government and its instrumentalities on the basis of a procedure established in that behalf. Equality of opportunity is the hallmark, and the Constitution has provided also for affirmative action to ensure that un equals are not treated equals. Thus, any public employment has to be in terms of the Constitutional scheme. 2. A sovereign government, considering the economic situation in the country and the work to be got done, is not precluded from making temporary appointments or engaging workers on daily wages. Going by a law newly enacted, The National Rural Employment Guarantee Act, 2005, the object is to give employment to at least one member of a family for hundred days in an year, on paying wages as fixed under that Act. But, a regular process of recruitment or appointment has to be resorted to, when regular vacancies in posts, at a particular point of time, are to be filled up and the filling up of those vacancies cannot be done in a haphazard manner or based on patronage or other considerations. Regular appointment must be the rule. 3. But, sometimes this process is not adhered to and the Constitutional scheme of public employment is by-passed. The Union, the States, their departments and instrumentalities have resorted to irregular appointments, especially',
'Zafar v State of U.P. Supreme Court of India 15 January 2003 Appeal (Cr.) 498 of 2000 The Judgment was delivered by : P. Venkatarama Reddi, J. 1. This appeal by Special leave is preferred by the sole accused in the Sessions Trial No. 583 of 1980 on the file of the Additional District & Sessions Judge, Gorakhpur. The accused was convicted u/s. 302 I.P.C. on the charge of murdering his relation by name Hidayat Hussain at about 8 A.M. on 28.6.1980 on a public street. The accused was sentenced to life imprisonment. On appeal the High Court confirmed the conviction and sentence. 2. The prosecution case is that on the crucial day at about 8 A.M. the deceased was going to a meat shop with his son Aizaz @ Guddu (P.W.2). As they came close to the meat shop, the accused fired a shot from his country-made pistol in front of the house of one Sidhu. The victim collapsed before the meat shop of Achhan (P.W.3) and succumbed to the injuries then and there. Though some people tried to overpower the accused, he reloaded his pistol and threatened them not to risk their lives. Thereafter, he fled away from the scene. P.W.I, the father of the deceased, on coming to know of the incident came to the spot immediately. He saw the son of the deceased (P.W.2) weeping by the side of the dead body. His clothes were blood-stained. After some time he got a complaint drafted by one Yusuf and handed over the same in the police station at 9.15 A.M. The Head Constable registered the F.I.R. P.W. 6, the sub-Inspector of police immediately went to the scene of offence, took custody of the dead body after having it photographed and prepared a Panchnama. Thereafter, P.W.7, the Senior',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[ 1.0000, 0.4801, -0.0883],
# [ 0.4801, 1.0000, 0.0949],
# [-0.0883, 0.0949, 1.0000]])
<!--
### 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.*
-->
legal_eval| Metric | Value |
|---|---|
| cosine_accuracy | 0.9667 |
| sentence_0 | sentence_1 | sentence_2 | |
|---|---|---|---|
| type | string | string | string |
| details | <ul><li>min: 226 tokens</li><li>mean: 381.25 tokens</li><li>max: 447 tokens</li></ul> | <ul><li>min: 357 tokens</li><li>mean: 415.93 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 344 tokens</li><li>mean: 415.61 tokens</li><li>max: 512 tokens</li></ul> |
| sentence_0 | sentence_1 | sentence_2 |
|---|---|---|
| <code>Transfer Petition have been filed to transfer the petitions filed pending before the High Court of S1 to the High Court of S2. The petitioner got married to Lt. P1 on 09.03.2012 as per Hindu rites and customs. Petitioner's husband Lt. P1 is a naval officer who was then posted at S1. After marriage, the petitioner was residing with her husband at S1. As brought on record, the relationship between the petitioner and her husband was not very cordial. On 22.02.2013, the petitioner gave an oral complaint that her husband was withholding her identity card, laptop, mobile phone, original marriage certificate etc. The respondent was called to the police station and directed to handover the belongings to the petitioner. On 04.04.2013, the petitioner lodged a complaint against her husband, her parents-in-law and sister-in-law alleging that they have subjected her to physical and mental cruelty. The petitioner had also levelled charge of sexual abuse against five naval officers and wife of one of...</code> | <code>State of West Bengal and Others v Committee For Protection of Democratic Rights, West Bengal and Others Supreme Court of India 17 February 2010 C.A. Nos. 6249-6250 of 2001 With W.P. (Cr.) 24 of 2008, S.L.P. (Cr.) No. 4096 of 2007 and W.P. (C) No. 573 of 2006 [From the Judgement and Order Dt. 30.03.2001 of the High Court of Calcutta in Civil Rule No. 1601 (W) of 2001 with W.P. No. 450 (W) of 2001] The Judgment was delivered by: K. G. Balakrishnan, J. 1. The issue which has been referred for the opinion of the Constitution Bench is whether the High Court, in exercise of its jurisdiction u/art. 226 of the Constitution of India, can direct the Central Bureau of Investigation (for short "the CBI"), established under the Delhi Special Police Establishment Act, 1946 (for short "the Special Police Act"), to investigate a cognizable offence, which is alleged to have taken place within the territorial jurisdiction of a State, without the consent of the State Government. 2. For the determination ...</code> | <code>Manchegowda Etc. v State Of Karnataka Etc. Supreme Court of India 17 April 1984 CIVIL APPELLATE JURISDICTION : Civil Appeal Nos. 3116 and 2608 of 1983 etc. etc. (From the Judgments and orders dated 30th September,1982 & 5th October, 1981 of the Karnataka High Court in Writ Petition Nos. 12680 and 12681/1979 etc. etc. The Judgment was delivered by : Amarendra Nath Sen, J. 1. The question for consideration in Civil Appeal No.3116 of 1983 by certificate granted by the High Court is, whether the Karnataka Scheduled Castes and Scheduled Tribes (Prohibition of Transfer of Certain Lands) Act, 1978 (hereinafter referred to as the Act for the sake of brevity) is constitutionally valid or not. 2. The writ petition out of which this appeal arises was filed in the High Court along with a number of other writ petitions filed by various other parties challenging the validity of the Act. The High Court for reasons recorded in the judgment upheld the validity of the Act and dismissed this writ petitio...</code> |
| <code>Appellant calls in question legality of the judgment rendered by High Court confirming his conviction for offence and sentence of imprisonment for life as awarded by the learned Sessions Judge. Background facts as unfolded during trial by the prosecution are essentially as follows. One P1 (hereinafter referred to as the 'deceased') was having industry and he employed a number of girls. The accused used to make fun of the girls/workers outside the factory and this was objected to by the deceased several times. On that score, there had been enmity between the deceased and the accused. At about 8.30 p.m. on 1.5.1990, PW-1, PW-2 and one P2 were standing in front of L1 ground, south of Mail Road. The accused was sitting on the eastern side of a culvert. There was a tube light burning and hence there was enough light at that place. At that time, the deceased, who came in a bicycle proceeding from east to west, took a turn towards south. The accused rushed to the deceased saying "you die, old...</code> | <code>Virsa Singh. v The State Of Punjab Supreme Court of India 11 March 1958 Criminal Appeal No. 90 of 1957. The Judgment was delivered by: Vivian Bose, J. 1. The appellant Virsa Singh has been sentenced to imprisonment for life under s. 302 of the Indian Penal Code for the murder of one Khem Singh. He was granted special leave to appeal by this Court but the leave is limited to "the question that on the finding accepted by the Punjab High Court what offence is made out as having been committed by the petitioner." 2. The appellant was tried with five others under sss. 302/49, 324/149 and 323/149 Indian Penal Code. He was also charged individually under s. 302. 3. The other, were acquitted of the murder charge by the first Court but were convicted under ss. 326, 324 and 323 read with s. 149, Indian Penal Code. On appeal to the High Court they were all acquitted. 4. The appellant was convicted by the first Court under s. 302 and his conviction and sentence were upheld by the High Court. 5. Th...</code> | <code>State Of Uttar Pradesh & Anr. v Janki Saran Kailash Chandra & Anr. Supreme Court of India 23 April 1973 Civil Appeal No. 1701 of 1971 The Judgment was delivered by : I. D. Dua, J. 1. In this appeal by special leave the State of U.P. and the Divisional Forest Officer, Bijnor (defendants in the trial court in the plaintiff-respondents' suit) challenge the judgment and order of a learned Single Judge of the Allahabad High Court, allowing the plaintiff-respondents' appeal and setting aside the order of the trial court staying the suit under s. 34 of the Arbitration Act. 2. The plaintiffs had instituted a suit for the recovery of Rs. 69,556.27 by way of damages for breach of contract impleading the, State of U.P. (through the Collector of Bijnor as the first defendant and the Divisional Forest Officer, Bijnor as the second defendant. The summons in the suit issued to the State of U.P. were served on the District Government Counsel. On September 2, 1966 the said counsel filed an appearance s...</code> |
| <code>This appeal has been preferred against the judgment and order dated 5.8.2008, passed by the High Court reversing the judgment of acquittal dated 8.4.2003 recorded by the Sessions Court wherein the appellant was charge sheeted for murdering his wife, P1, by giving her Sodium Cyanide. This is a most unfortunate case, in which, a young, B.Com 2nd year student, P1 died under mysterious circumstances within 15 days of her marriage in her parent's house at L1. The appellant, P2, is post-graduate and at relevant time had been employed in the Gulf in a firm, namely, CompanyC1 dealing with golden Jewellery. The couple, after marriage on 15.5.2000, stayed for two days with the brother of the appellant at Ollur and they came back to L1 on 17.5.2000, as the parents of P1 had arranged a reception for them at their house. The couple stayed there for two days and left for L2 on 19.5.2000 and stayed in the house of PW.10, a friend of the appellant. The couple came back on 22.5.2000 to L1, the family h...</code> | <code>Rajinder Kumar Kindra v Delhi Administration Through Secretary (Labour) and Others Supreme Court of India 27 September 1984 CIVIL APPELLATE JURISDICTION: Civil Appeal No. 2386 of 1984. Appeal by Special leave from the Judgment and Order dated the 2nd March, 1983 of the Delhi High Court in Writ Petition No. 314 of 1983. The Judgment was delivered by : D. A. Desai, J. 1. Appellant Rajinder Kumar Kindra was inducted as a peon by M/s Raymond Woolen Mills Ltd. ('employer' for short). In 1972 he was promoted as a salesman and at the relevant time he was serving at the Raymond's retail showroom in Karol Bagh, New Delhi. One Shri R.S. Negi was the Manager-cum-Cashier of the Karol Bagh Show-room of the employer under whom the appellant was working. He was served with a charge-sheet dated December 11, 1975 which reads as under: "That you, Shri Rajinder Kindra, is hereby informed that you, while working as a salesman at Raymonds' Retail Show-room, 2397/1, Hardhian Singh Road, New Delhi-5 have mis...</code> | <code>Bahadursinh Lakhubhai Gohil v Jagdishbhai M. Kamalia and Others Supreme Court of India 17 December 2003 Appeal (civil) 32 of 1999 The Judgment was delivered by : S. B. Sinha, J. 1. A Public interest litigation was filed by the first respondent herein questioning an action of the respondent-Corporation and its chairman of the Standing Committee insofar as incorporation of the name of the -respondent No. 7 in the municipal register was allowed. FACT: 2. An auction was held by the respondent No. 3 herein for granting a vacant land and bearing plot No. 2557 admeasuring 90 x 150 feet (1500 square yards) for a period of 99 years on or about 7.11.1951. One Shri Vajubha (since deceased), the predecessor in interest of the appellant herein became the highest bidder by offering a sum of Rs. 360 being the one time premium. The said Shri Vajubha deposited a sum of Rs. 270 on or about 14.2.1952 and prayed for grant of three months' further time for paying the balance sum of Rs. 90. The respondent N...</code> |
{
"distance_metric": "TripletDistanceMetric.EUCLIDEAN",
"triplet_margin": 5
}
num_train_epochs: 10multi_dataset_batch_sampler: round_robinper_device_train_batch_size: 8num_train_epochs: 10max_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: trackioper_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_backend: Noneddp_timeout: 1800fsdp: []fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}deepspeed: 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: {}| Epoch | Step | legal_eval_cosine_accuracy |
|---|---|---|
| 1.0 | 21 | 0.8667 |
| 2.0 | 42 | 0.9000 |
| 3.0 | 63 | 0.9667 |
@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",
}
@misc{hermans2017defense,
title={In Defense of the Triplet Loss for Person Re-Identification},
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
year={2017},
eprint={1703.07737},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
<!--
## 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.*
-->