Downloads · 30 days
11
3% of all-time downloads
Tejasw1/gte-base-legal-matryoshka-v1
gte-base-legal-matryoshka-v1 is a sentence similarity model from Tejasw1. Use it when you need a score for how close two texts are. It is set up for sentence-transformers. The card lists the license as apache-2.0.
This is a sentence-transformers model finetuned from Alibaba-NLP/gte-base-en-v1.5. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic searc…
Downloads · 30 days
11
3% of all-time downloads
All-time downloads
381
Public
Parameters
137M
547 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors547 MB · 100%
From the Hugging Face model README
This is a sentence-transformers model finetuned from Alibaba-NLP/gte-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.
SentenceTransformer(
(0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: NewModel
(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})
)
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("Tejasw1/gte-base-legal-matryoshka-v1")
# Run inference
sentences = [
'(1) Save as otherwise provided in the Insolvency and Bankruptcy Code, 2016 (31 of 2016), where a person, liable to pay tax, interest or penalty under this Act, dies, then (a) if a business carried on by the person is continued after his death by his legal representative or any other person, such legal representative or other person, shall be liable to pay tax, interest or penalty due from such person under this Act; and (b) if the business carried on by the person is discontinued, whether before or after his death, his legal representative shall be liable to pay, out of the estate of the deceased, to the extent to which the estate is capable of meeting the charge, the tax, interest or penalty due from such person under this Act, whether such tax, interest or penalty has been determined before his death but has remained unpaid or is determined after his death. (2) Save as otherwise provided in the Insolvency and Bankruptcy Code, 2016 (31 of 2016), where a taxable person, liable to pay tax, interest or penalty under this Act, is a Hindu Undivided Family or an association of persons and the property of the Hindu Undivided Family or the association of persons is partitioned amongst the various members or groups of members, then, each member or group of members shall, jointly and severally, be liable to pay the tax, interest or penalty due from the taxable person under this Act up to the time of the partition whether such tax, penalty or interest has been determined before partition but has remained unpaid or is determined after the partition. (3) Save as otherwise provided in the Insolvency and Bankruptcy Code, 2016 (31 of 2016), where a taxable person, liable to pay tax, interest or penalty under this Act, is a firm, and the firm is dissolved, then, every person who was a partner shall, jointly and severally, be liable to pay the tax, interest or penalty due from the firm under this Act up to the time of dissolution whether such tax, interest or penalty has been determined before the dissolution, but has remained unpaid or is determined after dissolution. (4) Save as otherwise provided in the Insolvency and Bankruptcy Code, 2016 (31 of 2016), where a taxable person liable to pay tax, interest or penalty under this Act,-- (a) is the guardian of a ward on whose behalf the business is carried on by the guardian; or (b) is a trustee who carries on the business under a trust for a beneficiary, then, if the guardianship or trust is terminated, the ward or the beneficiary shall be liable to pay the tax, interest or penalty due from the taxable person upto the time of the termination of the guardianship or trust, whether such tax, interest or penalty has been determined before the termination of guardianship or trust but has remained unpaid or is determined thereafter.',
'Under the Central Goods and Services Tax Act, 2017, what are the tax liabilities of a legal representative if a business continues after the death of a person liable to pay tax, interest, or penalty?',
'According to The Insolvency and Bankruptcy Code, 2016, Section 160(2), can a bankruptcy trustee give a notice of disclaimer for onerous property even if they have taken possession of it or tried to sell it?',
]
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.*
-->
dim_768| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.0193 |
| cosine_accuracy@3 | 0.1213 |
| cosine_accuracy@5 | 0.3456 |
| cosine_accuracy@10 | 0.614 |
| cosine_precision@1 | 0.0193 |
| cosine_precision@3 | 0.0404 |
| cosine_precision@5 | 0.0691 |
| cosine_precision@10 | 0.0614 |
| cosine_recall@1 | 0.0193 |
| cosine_recall@3 | 0.1213 |
| cosine_recall@5 | 0.3456 |
| cosine_recall@10 | 0.614 |
| cosine_ndcg@10 | 0.2539 |
| cosine_mrr@10 | 0.1458 |
| cosine_map@100 | 0.1624 |
dim_512| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.0129 |
| cosine_accuracy@3 | 0.125 |
| cosine_accuracy@5 | 0.3511 |
| cosine_accuracy@10 | 0.6176 |
| cosine_precision@1 | 0.0129 |
| cosine_precision@3 | 0.0417 |
| cosine_precision@5 | 0.0702 |
| cosine_precision@10 | 0.0618 |
| cosine_recall@1 | 0.0129 |
| cosine_recall@3 | 0.125 |
| cosine_recall@5 | 0.3511 |
| cosine_recall@10 | 0.6176 |
| cosine_ndcg@10 | 0.2532 |
| cosine_mrr@10 | 0.1437 |
| cosine_map@100 | 0.1594 |
| positive | anchor | |
|---|---|---|
| type | string | string |
| details | <ul><li>min: 16 tokens</li><li>mean: 769.8 tokens</li><li>max: 7913 tokens</li></ul> | <ul><li>min: 13 tokens</li><li>mean: 32.89 tokens</li><li>max: 77 tokens</li></ul> |
| positive | anchor |
|---|---|
| <code>A party to any proceeding or appeal before the Tribunal or the Appellate Tribunal, as the case may be, may either appear in person or authorise one or more chartered accountants or company secretaries or cost accountants or legal practitioners or any other person to present his case before the Tribunal or the Appellate Tribunal, as the case may be</code> |
The model card is truncated. Read the rest on Hugging Face.